Changeset 20003


Ignore:
Timestamp:
2009-07-17T10:19:54+12:00 (15 years ago)
Author:
davidb
Message:

Some minor tweaks to better align the audio and video plugins

Location:
extensions/gsdl-video/trunk/perllib/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/gsdl-video/trunk/perllib/plugins/AudioPlugin.pm

    r18556 r20003  
    153153
    154154
    155     # Convert the video to a new type (if required).
     155    # Convert the audio to a new type (if required).
    156156    my $converttotype = $self->{'converttotype'};
    157157    my $converttosize = $self->{'converttosize'};
     
    333333
    334334
     335sub read_into_doc_obj {
     336    my $self = shift (@_); 
     337    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
     338
     339    $self->{'media_type'} = "audio";
     340
     341    my ($rv,$doc_obj) = $self->SUPER::read_into_doc_obj(@_);
     342
     343    if ($rv != 1) {
     344    return ($rv,$doc_obj);
     345    }
     346   
     347    $self->{'media_type'} = undef;
     348
     349    return ($rv,$doc_obj);
     350}
     351
    335352
    336353
  • extensions/gsdl-video/trunk/perllib/plugins/VideoConverter.pm

    r19828 r20003  
    394394
    395395    my $s_opt = "";
    396     if ($self->{'media_type'} ne "audio") {
     396    my $media_type = $self->{'media_type'};
     397    if ($media_type ne "audio") {
    397398    $s_opt = $self->optional_frame_scale($streaming_size,$video_width,$video_height);
    398399    }
  • extensions/gsdl-video/trunk/perllib/plugins/VideoPlugin.pm

    r19828 r20003  
    602602    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
    603603
     604    $self->{'media_type'} = "video";
     605
    604606    my ($rv,$doc_obj) = $self->SUPER::read_into_doc_obj(@_);
    605607
     
    624626    }
    625627   
     628    $self->{'media_type'} = undef;
     629
    626630    return ($rv,$doc_obj);
    627631}
Note: See TracChangeset for help on using the changeset viewer.