Changeset 26532

Show
Ignore:
Timestamp:
27.11.2012 06:36:24 (7 years ago)
Author:
davidb
Message:

enable-streaming-list added to allow 'mp3' as a streamable target. Updated call to audio_convertto_cmd to be consistent with the newer cached_cmd API.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/video-and-audio/trunk/src/perllib/plugins/AudioPlugin.pm

    r25346 r26532  
    3939} 
    4040 
     41 
     42my $enable_streaming_list = 
     43    [{'name' => "disabled", 'desc' => "Do not create any audio file optimised for streaming over the Internet."}, 
     44     {'name' => "flv", 'desc' => "Uses the FLV format for streaming media. Better to target old computers."}, 
     45     {'name' => "mp4", 'desc' => "Uses the MP4 container with H264 and AAC codecs. Better quality at very low bitrates but more ressources intensive."}, 
     46     {'name' => "mp3", 'desc' => "(audio only) Uses MP3 for psuedo streaming."} 
     47     ]; 
     48 
     49my $streaming_mime_types = { "flv" => "video/flv", 
     50                 "mp4" => "video/mp4", 
     51                 "mp3" => "audio/mpeg" }; 
    4152 
    4253my $arguments = 
     
    6071    'type' => "string", 
    6172    'deft' => "200k", 
    62     'reqd' => "no" } ]; 
     73    'reqd' => "no" }, 
     74 
     75      { 'name' => "enable_streaming", 
     76        'desc' => "{MultimediaPlug.enable_streaming}", 
     77        'type' => "enum", 
     78        'list' => $enable_streaming_list, 
     79    'deft' => "disabled", 
     80    'reqd' => "no" }  
     81 
     82]; 
    6383 
    6484my $options = { 'name'     => "AudioPlugin", 
     
    202222    $originalfilename = $filename; 
    203223 
    204     my $convertto_command = $self->audio_convertto_cmd($filename,$converttotype); 
     224    my ($convertto_command,$ofilename,$ofile) = $self->audio_convertto_cmd($filename,$converttotype); 
    205225 
    206226    my $convertto_result; 
     
    212232 
    213233    ($convertto_regenerated,$convertto_result,$convertto_error) 
    214         = $self->run_cached_general_cmd($convertto_command,$filename,$convertto_options); 
     234        = $self->run_cached_general_cmd($convertto_command,$filename,$ofilename,$convertto_options); 
    215235                             
    216236    $type = $converttotype;