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.
17 my $config_file = `echo -n ~`."/.gst";
20 open CONFIG, $config_file;
27 my ($var, $value) = split (/\s*=\s*/, $_, 2);
30 if (!($cfg{AUDIOSRC}))
32 print "Please add an AUDIOSRC to $config_file !\n";
34 if (!($cfg{VIDEOSINK}))
36 print "Please add a VIDEOSINK to $config_file !\n";
41 print "No configuration file $config_file found. You might want to create one.\n";
43 if (!defined $cfg{AUDIOSRC}) { $cfg{AUDIOSRC} = "osssrc"; }
44 if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "xvimagesink"; }
45 if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; }
50 my $vis = $cfg{VISUALIZER};
51 $vis = shift() if ($#_ != -1);
52 $vis = "goom" unless $vis;
55 $pipe = $vis unless $pipe = $pipes{$vis};
57 $command = "gst-launch-@GST_MAJORMINOR@ $cfg{AUDIOSRC} ! $pipe ! { queue ! ffmpegcolorspace ! $cfg{VIDEOSINK} }";
58 print "Running $command\n";
59 system ("PATH=\$PATH:".$cfg{CVS_PATH}."/gstreamer/tools $command");
68 "chart", "audioconvert ! chart",
69 "synaesthesia", "synaesthesia",
70 "monoscope", "audioconvert ! monoscope"
74 print STDERR "Usage: gst-visualise [visualiser]\n";