gstreamer/tools
Wim Taymans 2153c45964 check/: Check fixes, use API as stated in design docs, remove hacks.
Original commit message from CVS:
* check/Makefile.am:
* check/generic/states.c: (GST_START_TEST):
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
* check/states/sinks.c: (GST_START_TEST):
* check/states/sinks2.c: (GST_START_TEST), (gst_object_suite),
(main):
Check fixes, use API as stated in design docs, remove hacks.

* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Catch stopping our task while we're shutting down.

* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_init),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state), (gst_element_change_state),
(gst_element_change_state_func):
* gst/gstelement.h:
New state change algorithm (see #318116)

* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
* gst/gstpipeline.h:
Remove crude state change hacks.

* gst/gstutils.h:
Remove crude hacks.

* tools/gst-launch.c: (main):
Fixes for state change. Needs some more work to fully use the
new stuff.
2005-10-10 16:38:26 +00:00
..
.gitignore ignore more 2005-06-17 09:12:33 +00:00
BUGS gstreamer-register -> gst-register gstreamer-launch -> gst-launch etc. 2002-02-04 20:33:14 +00:00
gst-complete.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
gst-complete.c gst/: fix a bunch of unchecked return values 2005-09-02 12:08:45 +00:00
gst-compprep.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
gst-compprep.c remove 2005-09-15 00:13:26 +00:00
gst-feedback-0.7 version gst-feedback 2004-02-11 12:48:09 +00:00
gst-feedback-m.m g_error fix, m/m version fix 2004-03-14 17:54:22 +00:00
gst-feedback.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
gst-indent don't mix tabs and spaces 2004-03-15 19:27:17 +00:00
gst-inspect.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
gst-inspect.c Merged in popt removal + GOption addition patch from Ronald, bug #169772. 2005-10-10 15:53:59 +00:00
gst-launch.1.in Correct syntax for debug option in gst-launch manpage 2005-09-26 13:40:21 +00:00
gst-launch.c check/: Check fixes, use API as stated in design docs, remove hacks. 2005-10-10 16:38:26 +00:00
gst-md5sum.1.in check for md5sink in pipeline 2003-09-11 22:44:58 +00:00
gst-md5sum.c GstBusHandler -> GstBusFunc, return value has the same meaning as any other GSource (FALSE == remove source). 2005-09-19 11:18:03 +00:00
gst-run.c Merged in popt removal + GOption addition patch from Ronald, bug #169772. 2005-10-10 15:53:59 +00:00
gst-typefind.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
gst-typefind.c gst/gstelement.h (GstState): Renamed from GstElementState, changed to be a normal enum instead of flags. 2005-09-02 15:42:00 +00:00
gst-xmlinspect.1.in tools/: Add man page. (bug #140219) 2004-07-04 23:36:29 +00:00
gst-xmlinspect.c Merged in popt removal + GOption addition patch from Ronald, bug #169772. 2005-10-10 15:53:59 +00:00
gst-xmllaunch.1.in Move man pages from %.1 to %.1.in, and add a rule to make .1 files from .1.in, replacing program names with their ver... 2003-08-15 20:25:40 +00:00
Makefile.am Merged in popt removal + GOption addition patch from Ronald, bug #169772. 2005-10-10 15:53:59 +00:00
README hum, vorbisfile => oggdemux ! vorbisdec ! audioconvert 2004-05-02 23:49:11 +00:00
xml2text.xsl - indentation fixes 2003-02-21 19:41:02 +00:00

gst-launch
================

This is a tool that will construct pipelines based on a command-line
syntax.  The syntax is rather complex to enable all the features I want it
to have, but should be easy to use for most people.  Multi-pathed and
feedback pipelines are the most complex.

A simple commandline looks like:

 gst-launch filesrc location=music.mp3 ! mad ! osssink

This plays an mp3 music file music.mp3 using libmad, and:

 gst-launch filesrc location=music.mp3 ! mp3parse ! mpg123 ! osssink

Plays and mp3 music file using mpg123

You can also stream files over http:

 gst-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink

And using gnome-vfs you can do the same with:

 gst-launch gnomevfssrc location=music.mp3 ! mad ! osssink
 gst-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink

And too play the same song with gnome-vfs via smb:

 gst-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink

Here we convert a Mp3 file into an Ogg Vorbis file:

 gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! filesink location=music.ogg

And then we can play that file with:

 gst-launch filesrc location=music.ogg ! oggdemux ! vorbisdec ! audioconvert ! osssink

Some other useful pipelines are..
Plays wav files (currently there are no wav encoders):

 gst-launch filesrc location=music.wav ! wavparse ! osssink

Converts wav files into mp3 and ogg files:

 gst-launch filesrc location=music.wav ! wavparse ! vorbisenc ! filesink location=music.ogg
 gst-launch filesrc location=music.wav ! wavparse ! mpegaudio ! filesink location=music.mp3

You can also use lame for mp3 encoding if you have it installed, it does a 
much better job than mpegaudio.

Rips all songs from cd and saves them into a mp3 file:

 gst-launch cdparanoia ! mpegaudio ! filesink location=cd.mp3

You can toy around with gst-inspect to discover the settings for 
cdparanoia to rip individual tracks

Record sound from your sound input and encode it into an ogg file:

 gst-launch osssrc ! vorbisenc ! filesink location=input.ogg

gst-launch not only handles audio but video as well:
For mpeg1 files (video and audio streams respectively):

 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
 gst-launch filesrc location=video.mpg ! mpegdemux audio_00! { queue ! mad ! osssink }

for mpeg1 with both audio and video (for glib2):

 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.audio_00! { queue ! mad ! osssink }

for mpeg1 with both audio and video (for gtk1.2, the shim doesn't handle the 'name' property yet):

 gst-launch filesrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink } mpegdemux0.audio_00! { queue ! mad ! osssink }

For mpeg2 files (video and audio streams respectively):
 
 gst-launch filesrc location=video.mpeg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
 gst-launch filesrc location=video.mpeg ! mpegdemux private_stream_1.0! { queue ! a52dec ! osssink }

for mpeg2 with both audio and video (glib2):

 gst-launch filesrc location=video.mpg ! mpegdemux name=demux video_00! { queue ! mpeg2dec ! sdlvideosink } demux.private_stream_1.0! { queue ! a52dec ! osssink }

Note: The types of audio streams in the mpeg files can vary!

For an avi file (DivX, mjpeg,...)

 gst-launch filesrc location=video.avi ! avidecoder video_00! { queue ! sdlvideosink } avidecoder0.audio_00! { queue ! osssink }


 
gst-complete
==================

This is a simple utility which provides custom bash completion when
typing gst-launch commands. 

Simply run "gst-compprep" as root to build the registry of completions,
and then put, in your .bashrc,
"complete -C gst-complete gst-launch"
(ensuring that gst-complete is on your path).

You can then enjoy context sensitive tab-completion of gst-launch
commands.


gst-register
==================

This tool will perform an introspection on all available plugins and will
create a registry file in /etc/gstreamer/reg.xml. Startup time will be
much faster since the gstreamer core doesn't have to bring all the plugins 
files into memory at startup. As with gst-compprep you need to run this
as root for it too work correctly.


gst-inspect
=================

Allows you to check the properties of plugins and elements.

 ./gst-inspect 
 
will show all the plugins available and the elements they contain.

 ./gst-inspect <pluginname/elementname>

shows more info about the plugin/element.

gst-xmlinspect
=================

Dump properties of plugins and elements in an xml format. You can 
transform the xml to something else with an appropriate stylesheet.

 ./gst-xmlinspect <elementname> | xsltproc xml2text.xsl -