3 # launch a gst-launch pipeline to display a visualisation of the
5 # make use of default input srcs.
6 # visualisation plugin is specified on command line.
15 my $config_file = `echo -n ~`."/.gst";
18 open CONFIG, $config_file;
25 my ($var, $value) = split (/\s*=\s*/, $_, 2);
28 if (!($cfg{AUDIOSRC}))
30 print "Please add an AUDIOSRC to $config_file !\n";
32 if (!($cfg{VIDEOSINK}))
34 print "Please add a VIDEOSINK to $config_file !\n";
39 print "No configuration file $config_file found. You might want to create one.\n";
41 if (!defined $cfg{AUDIOSRC}) { $cfg{AUDIOSRC} = "osssrc"; }
42 if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "xvimagesink"; }
43 if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; }
48 my $vis = $cfg{VISUALIZER};
49 $vis = shift() if ($#_ != -1);
50 $vis = "goom" unless $vis;
53 $pipe = $vis unless $pipe = $pipes{$vis};
55 $command = "gst-launch-@GST_API_VERSION@ $cfg{AUDIOSRC} ! $pipe ! { queue ! videoconvert ! $cfg{VIDEOSINK} }";
56 print "Running $command\n";
57 system ("PATH=\$PATH:".$cfg{CVS_PATH}."/gstreamer/tools $command");
66 "chart", "audioconvert ! chart",
67 "synaesthesia", "synaesthesia",
68 "monoscope", "audioconvert ! monoscope"
72 print STDERR "Usage: gst-visualise [visualiser]\n";