Changeset 20540

Show
Ignore:
Timestamp:
07.09.2009 11:44:10 (10 years ago)
Author:
davidb
Message:

Support for cache mode in image converter (currently used in Video extension)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ImageConverter.pm

    r19540 r20540  
    339339    my $convert_options  = shift(@_) || ""; 
    340340    my $convert_id       = shift(@_) || ""; 
     341    my $cache_mode       = shift(@_) || ""; 
    341342 
    342343    my $outhandle = $self->{'outhandle'}; 
     
    370371    my $print_info = { 'message_prefix' => $convert_id, 
    371372               'message' => "Converting image $source_file_no_path to: $convert_id $target_file_type" }; 
    372   
     373    $print_info->{'cache_mode'} = $cache_mode if ($cache_mode ne ""); 
     374 
    373375    my ($regenerated,$result,$had_error)  
    374376    = $self->autorun_general_cmd($convert_command,$target_file_path,$print_info); 
    375377 
    376378    return ($result,$target_file_path); 
     379} 
     380 
     381sub convert_without_result { 
     382    my $self = shift(@_); 
     383 
     384    my $source_file_path = shift(@_); 
     385    my $target_file_type = shift(@_); 
     386    my $convert_options  = shift(@_) || ""; 
     387    my $convert_id       = shift(@_) || ""; 
     388 
     389    return $self->convert($source_file_path,$target_file_type, 
     390              $convert_options,$convert_id,"without_result"); 
    377391} 
    378392