docs: update example pipelines in element docs

Mostly gst-launch -> gst-launch-1.0, but also
use autoaudiosink/autovideosink in more places
and update pipelines a little or flesh out
descriptions.
This commit is contained in:
Tim-Philipp Müller 2015-05-10 11:34:33 +01:00
parent 9a18b9e4ce
commit f034f77b73
12 changed files with 48 additions and 35 deletions

View file

@ -25,11 +25,11 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch dvdreadsrc title=1 ! mpegpsdemux ! a52dec ! audioresample ! audioconvert ! alsasink
* ]| Play audio track from a dvd.
* gst-launch-1.0 dvdreadsrc title=1 ! mpegpsdemux ! a52dec ! audioconvert ! audioresample ! autoaudiosink
* ]| Play audio part of a dvd title.
* |[
* gst-launch filesrc location=abc.ac3 ! a52dec ! audioresample ! audioconvert ! alsasink
* ]| Decode a stand alone file and play it.
* gst-launch-1.0 filesrc location=abc.ac3 ! ac3parse ! a52dec ! audioconvert ! audioresample ! autoaudiosink
* ]| Decode and play a stand alone AC-3 file.
* </refsect2>
*/

View file

@ -27,7 +27,7 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch filesrc location=abc.amr ! amrparse ! amrnbdec ! audioresample ! audioconvert ! alsasink
* gst-launch-1.0 filesrc location=abc.amr ! amrparse ! amrnbdec ! audioconvert ! audioresample ! autoaudiosink
* ]|
* </refsect2>
*/

View file

@ -27,7 +27,7 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch filesrc location=abc.wav ! wavparse ! audioresample ! audioconvert ! amrnbenc ! filesink location=abc.amr
* gst-launch-1.0 filesrc location=abc.wav ! wavparse ! audioconvert ! audioresample ! amrnbenc ! filesink location=abc.amr
* ]|
* Please note that the above stream misses the header, that is needed to play
* the stream.

View file

@ -27,7 +27,7 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch filesrc location=abc.amr ! amrparse ! amrwbdec ! audioresample ! audioconvert ! alsasink
* gst-launch-1.0 filesrc location=abc.amr ! amrparse ! amrwbdec ! audioconvert ! audioresample ! autoaudiosink
* ]|
* </refsect2>
*/

View file

@ -62,7 +62,7 @@
* <title>Example launch line</title>
* <para>
* <programlisting>
* gst-launch cdiocddasrc track=5 device=/dev/cdrom ! audioconvert ! vorbisenc ! oggmux ! filesink location=track5.ogg
* gst-launch-1.0 cdiocddasrc track=5 device=/dev/cdrom ! audioconvert ! vorbisenc ! oggmux ! filesink location=track5.ogg
* </programlisting>
* This pipeline extracts track 5 of the audio CD and encodes it into an
* Ogg/Vorbis file.

View file

@ -41,19 +41,19 @@
* <refsect2>
* <title>Example pipelines</title>
* |[
* gst-launch -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! lamemp3enc ! filesink location=sine.mp3
* gst-launch-1.0 -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! lamemp3enc ! filesink location=sine.mp3
* ]| Encode a test sine signal to MP3.
* |[
* gst-launch -v alsasrc ! audioconvert ! lamemp3enc target=bitrate bitrate=192 ! filesink location=alsasrc.mp3
* gst-launch-1.0 -v autoaudiosrc ! audioconvert ! lamemp3enc target=bitrate bitrate=192 ! filesink location=alsasrc.mp3
* ]| Record from a sound card using ALSA and encode to MP3 with an average bitrate of 192kbps
* |[
* gst-launch -v filesrc location=music.wav ! decodebin ! audioconvert ! audioresample ! lamemp3enc target=quality quality=0 ! id3v2mux ! filesink location=music.mp3
* gst-launch-1.0 -v filesrc location=music.wav ! decodebin ! audioconvert ! audioresample ! lamemp3enc target=quality quality=0 ! id3v2mux ! filesink location=music.mp3
* ]| Transcode from a .wav file to MP3 (the id3v2mux element is optional) with best VBR quality
* |[
* gst-launch -v cdda://5 ! audioconvert ! lamemp3enc target=bitrate cbr=true bitrate=192 ! filesink location=track5.mp3
* gst-launch-1.0 -v cdda://5 ! audioconvert ! lamemp3enc target=bitrate cbr=true bitrate=192 ! filesink location=track5.mp3
* ]| Encode Audio CD track 5 to MP3 with a constant bitrate of 192kbps
* |[
* gst-launch -v audiotestsrc num-buffers=10 ! audio/x-raw,rate=44100,channels=1 ! lamemp3enc target=bitrate cbr=true bitrate=48 ! filesink location=test.mp3
* gst-launch-1.0 -v audiotestsrc num-buffers=10 ! audio/x-raw,rate=44100,channels=1 ! lamemp3enc target=bitrate cbr=true bitrate=48 ! filesink location=test.mp3
* ]| Encode to a fixed sample rate
* </refsect2>
*

View file

@ -21,13 +21,22 @@
* SECTION:element-mad
* @see_also: lame
*
* MP3 audio decoder.
* MP3 audio decoder. Note that while the mad plugin code is licensed under
* the LGPL, the libmad library itself is GPL licensed, so the effective
* runtime license of using the mad element is GPL.
*
* The mpg123audiodec and avdec_mp3 decoder elements are LGPL licensed and
* also tend to use less CPU for decoding.
*
* In general it doesn't matter which MP3 decoder you use, the main advantage
* of the mad decoder is that it also supports so-called 'freeform' mp3s which
* are mp3s with a bitrate higher than what the standard usually allows.
*
* <refsect2>
* <title>Example pipelines</title>
* |[
* gst-launch filesrc location=music.mp3 ! mpegaudioparse ! mad ! audioconvert ! audioresample ! autoaudiosink
* ]| Decode and play the mp3 file
* gst-launch-1.0 filesrc location=music.mp3 ! mpegaudioparse ! mad ! audioconvert ! audioresample ! autoaudiosink
* ]| Decode and play an mp3 file
* </refsect2>
*/

View file

@ -33,8 +33,8 @@
* <refsect2>
* <title>Example pipelines</title>
* |[
* gst-launch -v filesrc location=Hawkeye.sid ! siddec ! audioconvert ! alsasink
* ]| Decode a sid file and play back the audio using alsasink.
* gst-launch-1.0 -v filesrc location=Hawkeye.sid ! siddec ! audioconvert ! audioresample ! autoaudiosink
* ]| Decode a sid file and play it back.
* </refsect2>
*/

View file

@ -33,16 +33,16 @@
* <refsect2>
* <title>Example pipelines</title>
* |[
* gst-launch -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! twolame ! filesink location=sine.mp2
* gst-launch-1.0 -v audiotestsrc wave=sine num-buffers=100 ! audioconvert ! twolame ! filesink location=sine.mp2
* ]| Encode a test sine signal to MP2.
* |[
* gst-launch -v alsasrc ! audioconvert ! twolame bitrate=192 ! filesink location=alsasrc.mp2
* gst-launch-1.0 -v alsasrc ! audioconvert ! twolame bitrate=192 ! filesink location=alsasrc.mp2
* ]| Record from a sound card using ALSA and encode to MP2
* |[
* gst-launch -v filesrc location=music.wav ! decodebin ! audioconvert ! audioresample ! twolame bitrate=192 ! id3v2mux ! filesink location=music.mp2
* gst-launch-1.0 -v filesrc location=music.wav ! decodebin ! audioconvert ! audioresample ! twolame bitrate=192 ! id3v2mux ! filesink location=music.mp2
* ]| Transcode from a .wav file to MP2 (the id3v2mux element is optional)
* |[
* gst-launch -v cdda://5 ! audioconvert ! twolame bitrate=192 ! filesink location=track5.mp2
* gst-launch-1.0 -v cdda://5 ! audioconvert ! twolame bitrate=192 ! filesink location=track5.mp2
* ]| Encode Audio CD track 5 to MP2
* </refsect2>
*

View file

@ -56,31 +56,35 @@
* non-x264enc streams/branches filling up and blocking upstream. They can
* be fixed by relaxing the default time/size/buffer limits on the queue
* elements in the non-x264 branches, or using a (single) multiqueue element
* for all branches. Also see the last example below.
* for all branches. Also see the last example below. You can also work around
* this problem by setting the tune=zerolatency property, but this will affect
* overall encoding quality so may not be appropriate for your use case.
* </note>
*
* <refsect2>
* <title>Example pipeline</title>
* |[
* gst-launch -v videotestsrc num-buffers=1000 ! x264enc qp-min=18 ! \
* gst-launch-1.0 -v videotestsrc num-buffers=1000 ! x264enc qp-min=18 ! \
* avimux ! filesink location=videotestsrc.avi
* ]| This example pipeline will encode a test video source to H264 muxed in an
* AVI container, while ensuring a sane minimum quantization factor to avoid
* some (excessive) waste.
* some (excessive) waste. You should ideally never put H264 into an AVI
* container (or really anything else, for that matter) - use Matroska or
* MP4/QuickTime or MPEG-TS instead.
* |[
* gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass=quant ! \
* matroskamux ! filesink location=videotestsrc.avi
* gst-launch-1.0 -v videotestsrc num-buffers=1000 ! x264enc pass=quant ! \
* matroskamux ! filesink location=videotestsrc.mkv
* ]| This example pipeline will encode a test video source to H264 using fixed
* quantization, and muxes it in a Matroska container.
* |[
* gst-launch -v videotestsrc num-buffers=1000 ! x264enc pass=5 quantizer=25 speed-preset=6 ! video/x-h264, profile=baseline ! \
* gst-launch-1.0 -v videotestsrc num-buffers=1000 ! x264enc pass=5 quantizer=25 speed-preset=6 ! video/x-h264, profile=baseline ! \
* qtmux ! filesink location=videotestsrc.mov
* ]| This example pipeline will encode a test video source to H264 using
* constant quality at around Q25 using the 'medium' speed/quality preset and
* restricting the options used so that the output is H.264 Baseline Profile
* compliant and finally multiplexing the output in Quicktime mov format.
* |[
* gst-launch -v videotestsrc num-buffers=1000 ! tee name=t ! queue ! xvimagesink \
* gst-launch-1.0 -v videotestsrc num-buffers=1000 ! tee name=t ! queue ! videoconvert ! autovideosink \
* t. ! queue ! x264enc rc-lookahead=5 ! fakesink
* ]| This example pipeline will encode a test video source to H264 while
* displaying the input material at the same time. As mentioned above,

View file

@ -25,13 +25,13 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch filesrc location=interview.ra ! rademux ! ffdec_real_288 ! audioconvert ! audioresample ! alsasink
* gst-launch-1.0 filesrc location=interview.ra ! rademux ! avdec_real_288 ! audioconvert ! audioresample ! autoaudiosink
* ]| Read a RealAudio file and decode it and output it to the soundcard using
* the ALSA element. The .ra file is assumed to contain RealAudio version 2.
* |[
* gst-launch gnomevfssrc location=http://www.example.org/interview.ra ! rademux ! a52dec ! audioconvert ! audioresample ! alsasink
* gst-launch-1.0 souphttpsrc location=http://www.example.org/interview.ra ! rademux ! ac3parse ! a52dec ! audioconvert ! audioresample ! autoaudiosink
* ]| Stream RealAudio data containing AC3 (dnet) compressed audio and decode it
* and output it to the soundcard using the ALSA element.
* and output it to the soundcard.
* </refsect2>
*/

View file

@ -33,9 +33,9 @@
* <refsect2>
* <title>Example launch line</title>
* |[
* gst-launch audiotestsrc num-buffers=1000 ! audioconvert ! lamemp3enc ! xingmux ! filesink location=test.mp3
* gst-launch filesrc location=test.mp3 ! xingmux ! filesink location=test2.mp3
* gst-launch filesrc location=test.mp3 ! mp3parse ! xingmux ! filesink location=test2.mp3
* gst-launch-1.0 audiotestsrc num-buffers=1000 ! audioconvert ! lamemp3enc ! xingmux ! filesink location=test.mp3
* gst-launch-1.0 filesrc location=test.mp3 ! xingmux ! filesink location=test2.mp3
* gst-launch-1.0 filesrc location=test.mp3 ! mp3parse ! xingmux ! filesink location=test2.mp3
* ]|
* </refsect2>
*/