Changeset 18995

Show
Ignore:
Timestamp:
16.04.2009 00:04:40 (11 years ago)
Author:
davidb
Message:

Minor mods to VideoPlugin? support for Windows

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

Legend:

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

    r18982 r18995  
    226226 
    227227    my $filename_gsdlenv = $filename; 
    228     $filename_gsdlenv =~ s@^$gsdlhome@\$GSDLHOME@; 
     228 
     229    if ($ENV{'GSDLOS'} =~ /^windows$/i) { 
     230    $filename_gsdlenv =~ s@^$gsdlhome@%GSDLHOME%@; 
     231    } 
     232    else { 
     233    $filename_gsdlenv =~ s@^$gsdlhome@\$GSDLHOME@; 
     234    } 
    229235 
    230236    return $filename_gsdlenv; 
  • extensions/gsdl-video/trunk/perllib/plugins/VideoConverter.pm

    r18982 r18995  
    426426 
    427427    my $ffmpeg_cmd_pass2 = "ffmpeg -pass 2 -i \"$ivideo_filename_gsdlenv\" $all_opts $bitrate_opt -y \"$oflash_filename_gsdlenv\""; 
    428     $ffmpeg_cmd = "( $ffmpeg_cmd_pass1 ; $ffmpeg_cmd_pass2 )"; 
     428    $ffmpeg_cmd = "( $ffmpeg_cmd_pass1 && $ffmpeg_cmd_pass2 )"; 
    429429    } 
    430430    else { 
  • extensions/gsdl-video/trunk/perllib/plugins/VideoPlugin.pm

    r18958 r18995  
    442442    if ((defined $excerpt_duration) && ($excerpt_duration ne "")) { 
    443443    $exp_duration = $excerpt_duration; 
    444     my ($hh,$mm,$ss,$ms) = ($exp_duration =~ m/^(\d\d):(\d\d):(\d\d)\.?(\d\d)?/); 
     444    my ($hh,$mm,$ss,$ms); 
     445 
     446    if ($exp_duration =~ m/^(\d\d):(\d\d):(\d\d)\.?(\d\d)?/) { 
     447        $hh = $1; 
     448        $mm = $2; 
     449        $ss = $3; 
     450        $ms = $4; 
     451    } 
     452    else { 
     453        # assume value is in seconds 
     454        $hh = 0; 
     455        $mm = 0; 
     456        $ss = $exp_duration; 
     457        $ms = 0; 
     458    } 
     459 
    445460    my $excerpt_dur_in_secs = $hh * 3600 + $mm * 60 + $ss; 
    446461 
     
    618633    } 
    619634     
     635    # for some video formats, extracted size needs to be multiple of 2 
     636    $thumbnail_width  = int($thumbnail_width/2) * 2; 
     637    $thumbnail_height = int($thumbnail_height/2) * 2; 
    620638 
    621639    $self->extract_thumbnail($doc_obj,$filename,$convertto_regenerated, 
     
    653671 
    654672 
     673    # for some video formats, extracted size needs to be multiple of 2 
     674    $screenview_width  = int($screenview_width/2) * 2; 
     675    $screenview_height = int($screenview_height/2) * 2; 
     676     
    655677    $self->extract_screenview($doc_obj,$filename, 
    656678                  $screenviewtype,