mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
4b908e33e0
Original commit message from CVS: 2005-06-08 Andy Wingo <wingo@pobox.com> * gst/gstutils.c: RPAD fixes all around. (gst_element_link_pads): Refcounting fixes. * tools/gst-inspect.c: * tools/gst-xmlinspect.c: * parse/grammar.y: * gst/base/gsttypefindhelper.c: * gst/base/gstbasesink.c: * gst/gstqueue.c: RPAD fixes. * gst/gstghostpad.h: * gst/gstghostpad.c: New ghost pad implementation as full proxy pads. The tricky thing is they provide both source and sink interfaces, since they proxy the internal pad for the external pad, and vice versa. Implement with lower-level ProxyPad objects, with the interior proxy pad as a child of the exterior ghost pad. Should write a doc on this. * gst/gstpad.h: s/RPAD/PAD/, s/RealPad/Pad/. (gst_pad_set_name, gst_pad_set_parent): Macros removed, use gst_object API. * gst/gstpad.c: Big changes. No more stub base GstPad, now all pads are real pads. No ghost pads in this file. Not documenting the myriad s/RPAD/PAD/ and REALIZE fixes. (gst_pad_class_init): Add properties for "direction" and "template". Both are construct-only, so they can't change during the life of the pad. Fixes properly deriving from GstPad. (gst_pad_custom_new, gst_pad_custom_new_from_template): Gone. For derived objects, just set properties when creating the objects via g_object_new. (gst_pad_get_parent): Implement as a function, return NULL if the parent is not an element. (gst_pad_get_real_parent, gst_pad_add_ghost_pad) (gst_pad_remove_ghost_pad, gst_pad_realize): Removed. * gst/gstobject.c (gst_object_class_init): Make name a construct property. Don't set it in the object init. * gst/gstelement.c (gst_element_add_pad): Don't allow adding pads with UNKNOWN direction. (gst_element_add_ghost_pad): Remove non-orthogonal API. Replace with gst_element_add_pad (e, gst_ghost_pad_new (name, pad)). (gst_element_remove_pad): Remove ghost-pad special cases. (gst_element_pads_activate): Remove rpad cruft. * gst/gstbin.c (gst_bin_change_state): Use gst_pad_get_parent to catch the pad's-parent-not-an-element case. * gst/gst.h: Include gstghostpad.h. * gst/gst.c (init_post): No more real, ghost pads. * gst/Makefile.am: Add gstghostpad.[ch]. * check/Makefile.am: * check/gst/gstbin.c: * check/gst/gstghostpad.c (test_ghost_pads): Check that linking into a bin creates ghost pads, and that the refcounts are right. Partly moved from gstbin.c. |
||
---|---|---|
.. | ||
.gitignore | ||
BUGS | ||
gst-complete.1.in | ||
gst-complete.c | ||
gst-compprep.1.in | ||
gst-compprep.c | ||
gst-feedback-0.7 | ||
gst-feedback-m.m | ||
gst-feedback.1.in | ||
gst-indent | ||
gst-inspect.1.in | ||
gst-inspect.c | ||
gst-launch.1.in | ||
gst-launch.c | ||
gst-md5sum.1.in | ||
gst-md5sum.c | ||
gst-register.1.in | ||
gst-register.c | ||
gst-run.c | ||
gst-typefind.1.in | ||
gst-typefind.c | ||
gst-xmlinspect.1.in | ||
gst-xmlinspect.c | ||
gst-xmllaunch.1.in | ||
Makefile.am | ||
README | ||
xml2text.xsl |
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 -