diff options
Diffstat (limited to 'abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl')
-rwxr-xr-x | abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl index 2d823d9..646b675 100755 --- a/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl +++ b/abs/core-testing/mplayer-wrapper/mplayer-wrapper.pl @@ -38,9 +38,28 @@ sub run () { my $mediafile = @ARGV[$#ARGV]; my $player = &pick_player(); + # mplayer evaluates configuration options in the following order, with + # later-evaluated options overriding earlier-evaluated ones, both within + # a given configuration location and between them: + # 1) system-wide configuration/profiles, /etc/mplayer/mplayer.conf + # 2) user-specific configuration/profiles, ~/.mplayer/config + # 3) commandline configuration parameters + # 4) file-specific configuration, ~/.mplayer/[filename].conf + # 5) any nonstandard configuration file, included via "-include" parameter + # + # This script's dynamic configuration options fall in at 2.5 above, + # so commandline options, file-specific configuration options, + # or a nonstandard configuration file will override the options that + # the script creates, but system-wide and user-specific configuration + # will be overridden by the dynamic configuration options. + # + # This is sub-optimal, as the easiest way for a user to compensate for + # a misfiring configuration rule would be to override it in a configuration + # file. Instead, they will have to change the way they run this script. + my $player_parameters = join(' ', - &translate_parameters($player,@ARGV[0..$#ARGV-1]), - &dynamic_parameters($mediafile)); + &dynamic_parameters($mediafile), + &translate_parameters($player,@ARGV[0..$#ARGV-1])); &player($player,$player_parameters,$mediafile); } @@ -98,13 +117,13 @@ sub dynamic_parameters () { push(@parameters, "-vo vdpau"); push(@parameters, "-vc ffmpeg12vdpau"); - # problems reported with WMV3 support + # problems have been reported with WMV3 support # } elsif ($codec eq "ffwmv3") { # WMV3 # push(@parameters, "-vo vdpau"); # push(@parameters, "-vc ffwmv3vdpau"); - # problems reported with WVC1 support + # problems have been reported with WVC1 support # } elsif ($codec eq "ffvc1") { # WVC1 # push(@parameters, "-vo vdpau"); @@ -144,7 +163,7 @@ sub player () { my($player,$parameters,$mediafile)=@_; my $command = "$player $parameters \"$mediafile\" 2>&1 |"; - print "DEBUG: command is:\n$command\n"; + print "DEBUG: $0's player command is: *** $command ***\n"; open(SHELL, $command); while (<SHELL>) { print $_; |