summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2002-03-02 00:31:56 +0000
committerAndy Wingo <wingo@pobox.com>2002-03-02 00:31:56 +0000
commite46a5b02a275e203ea0884b626c26151e56b1115 (patch)
tree66fdd40e333b92f3fee41843c85827cf59eb1a2a
parent16d635f2fd9ef080bddd7525ef7b547972f7bfde (diff)
downloadgstreamer-plugins-base-e46a5b02a275e203ea0884b626c26151e56b1115.tar.gz
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-xtools/gst-launch-ext20
1 files changed, 13 insertions, 7 deletions
diff --git a/tools/gst-launch-ext b/tools/gst-launch-ext
index d1808e01b..8f41244b5 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;