Fix a small typo in gst-launch-ext.

Original commit message from CVS:
Fix a small typo in gst-launch-ext.
Add gst-visualise, together with a manpage.
This commit is contained in:
Richard Boulton 2002-03-02 16:24:00 +00:00
parent 70763ce811
commit 5f00adbc77
4 changed files with 117 additions and 3 deletions

View file

@ -1,5 +1,5 @@
bin_SCRIPTS = gst-launch-ext
bin_SCRIPTS = gst-launch-ext gst-visualise
man_MANS = gst-launch-ext.1
man_MANS = gst-launch-ext.1 gst-visualise.1
EXTRA_DIST = $(bin_SCRIPTS) $(man_MANS)

View file

@ -2,7 +2,7 @@
.SH "NAME"
gst\-launch\-ext \- Run a predefined GStreamer pipeline
.SH "SYNOPSIS"
\fBgst\-launch\-ext\fR \fI[OPTION...]\fR PIPELINE\-DESCRIPTION
\fBgst\-launch\-ext\fR \fIfilename [filename...]\fR
.SH "DESCRIPTION"
.LP
\fIgst\-launch\-ext\fP is a tool that is used to run a basic predefined \fIGStreamer\fP pipeline.

79
tools/gst-visualise Executable file
View file

@ -0,0 +1,79 @@
#!/usr/bin/perl -w
# launch a gst-launch pipeline to display a visualisation of the
# input audio.
# make use of default input srcs.
# visualisation plugin is specified on command line.
### packages
use File::Basename;
my (%pipes, %cfg);
sub read_config
{
my $config_file = `echo -n ~`."/.gst";
if (-e $config_file)
{
open CONFIG, $config_file;
while (<CONFIG>)
{
chomp;
s/#.*//;
s/\s+$//;
next unless length;
my ($var, $value) = split (/\s*=\s*/, $_, 2);
$cfg{$var} = $value;
}
if (!($cfg{AUDIOSRC}))
{
print "Please add an AUDIOSRC to $config_file !\n";
}
if (!($cfg{VIDEOSINK}))
{
print "Please add a VIDEOSINK to $config_file !\n";
}
}
else
{
print "No configuration file $config_file found. You might want to create one.\n";
}
if (!defined $cfg{AUDIOSRC}) { $cfg{AUDIOSRC} = "esdmon"; }
if (!defined $cfg{VIDEOSINK}) { $cfg{VIDEOSINK} = "sdlvideosink"; }
if (!defined $cfg{CVS_PATH}) { $cfg{CVS_PATH} = `echo -n ~`."/gst/cvs"; }
}
sub visualise(@)
{
my $vis = $cfg{VISUALIZER};
$vis = shift() if ($#_ != -1);
$vis = "goom" unless $vis;
my $pipe;
$pipe = $vis unless $pipe = $pipes{$vis};
$command = "gst-launch $cfg{AUDIOSRC} ! $pipe ! { queue ! colorspace ! $cfg{VIDEOSINK} }";
print "Running $command\n";
system ("PATH=\$PATH:".$cfg{CVS_PATH}."/gstreamer/tools $command");
}
### main
read_config ();
%pipes = (
"goom", "goom",
"chart", "chart",
"synaesthesia", "synaesthesia",
"monoscope", "monoscope"
);
if ($#ARGV > 0) {
print STDERR "Usage: gst-visualise [visualiser]\n";
exit 1;
}
visualise(@ARGV);

35
tools/gst-visualise.1 Normal file
View file

@ -0,0 +1,35 @@
.TH "GStreamer" "1" "February 2002" "" ""
.SH "NAME"
gst\-visualise \- Run a GStreamer pipeline to display an audio visualisation
.SH "SYNOPSIS"
\fBgst\-visualise\fR \fI[visualiser]\fR
.SH "DESCRIPTION"
.LP
\fIgst\-visualise\fP is a tool that is used to run a basic \fIGStreamer\fP pipeline, to display a graphical visualisation of an audio stream.
By default, the audio stream is read from ESD (the Enlightened Sound Daemon),
but this can be changed by setting the AUDIOSRC parameter in ~/.gst. For
example, you might set "AUDIOSRC=osssrc" to display a visualisation of the
sound input to your soundcard.
You can select a visualiser by providing a parameter naming the visualiser.
For example:
gst\-visualise synaesthesia
will use the synaesthesia plugin. If no visualiser is named, the VISUALIZER
property in ~/.gst will be used. If this is not specified either, the goom
visualiser will be used.
The videosink to use to display the visualisation will be read from the
VIDEOSINK parameter in ~/.gst, defaulting to sdlvideosink.
.SH "SEE ALSO"
.BR gst\-launch\-ext (1),
.BR gst\-guilaunch (1),
.BR gst\-complete (1),
.BR gst\-register (1),
.BR gst\-inspect (1),
.BR gst\-launch (1),
.SH "AUTHOR"
The GStreamer team at http://gstreamer.net/