diff options
author | Andy Wingo <wingo@pobox.com> | 2002-03-02 00:31:56 +0000 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2002-03-02 00:31:56 +0000 |
commit | c07cec3dba8bd819f1992f9f0d34d7d1d8b7d731 (patch) | |
tree | 570c49d2f0071b080dee413db034e23730087a64 | |
parent | b89b3f5f092fe2d6cbe160a3b0651b568fdf99c0 (diff) |
get rid of some warnings if you don't have a config file
Original commit message from CVS:
get rid of some warnings if you don't have a config file
-rwxr-xr-x | tools/gst-launch-ext | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/gst-launch-ext b/tools/gst-launch-ext index d1808e01..8f41244b 100755 --- a/tools/gst-launch-ext +++ b/tools/gst-launch-ext @@ -9,7 +9,7 @@ use File::Basename; -my %pipes; +my (%pipes, %cfg); sub extension { @@ -47,9 +47,9 @@ sub read_config { print "No configuration file $config_file found. You might want to create one.\n"; } - if (!defined $cfg{AUDIOSINK}) { $cfg{AUDIOSINK} = "osssink"; } - if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "sdlvideosink"; } - if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; } + if (!defined $cfg{AUDIOSINK}) { $cfg{AUDIOSINK} = "osssink"; } + if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "sdlvideosink"; } + if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; } } sub playfile($$) @@ -81,18 +81,24 @@ read_config (); %pipes = ( "mp3", "mad ! $cfg{AUDIOSINK}", - "vis.mp3", "mad ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", "ogg", "vorbisdec ! $cfg{AUDIOSINK}", - "vis.ogg", "vorbisdec ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", "mpg", "mpegdemux video_00! { queue ! mpeg2dec ! $cfg{VIDEOSINK} } mpegdemux0.audio_00! { queue ! mad ! $cfg{AUDIOSINK} }", "avi", "avidemux video_00! { queue ! windec ! $cfg{VIDEOSINK} } avidemux0.audio_00! { queue ! mad ! $cfg{AUDIOSINK} }", "vob", "mpegdemux video_00! { queue ! mpeg2dec ! $cfg{VIDEOSINK} } mpegdemux0.audio_00! { queue ! a52dec ! $cfg{AUDIOSINK} }", "wav", "wavparse ! $cfg{AUDIOSINK}", - "vis.wav", "wavparse ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", "fli", "flxdec ! colorspace ! $cfg{VIDEOSINK}" ); +if ($cfg{VISUALIZER}) { + %pipes = ( + %pipes, + "vis.mp3", "mad ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", + "vis.ogg", "vorbisdec ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", + "vis.wav", "wavparse ! tee silent=true 'tee1.src0!' queue leaky=1 ! { $cfg{VISUALIZER} ! colorspace ! $cfg{VIDEOSINK} } 'tee1.src1!' $cfg{AUDIOSINK}", + ); +} + if ($#ARGV == -1) { print STDERR "Usage: gst-launch-ext filename[s]\n"; exit 1; |