diff --git a/docs/manual/advanced-threads.xml b/docs/manual/advanced-threads.xml index 2f625ce25b..06f5fb1293 100644 --- a/docs/manual/advanced-threads.xml +++ b/docs/manual/advanced-threads.xml @@ -104,7 +104,7 @@ eos (GstElement *src, gpointer data) int main (int argc, char *argv[]) { - GstElement *filesrc, *decoder, *audiosink; + GstElement *filesrc, *demuxer, *decoder, *audiosink; GstElement *thread; if (argc < 2) { @@ -125,8 +125,12 @@ main (int argc, char *argv[]) g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread); - /* create an ogg decoder */ - decoder = gst_element_factory_make ("vorbisfile", "decoder"); + /* create an ogg demuxer */ + demuxer = gst_element_factory_make ("oggdemux", "demuxer"); + g_assert (demuxer != NULL); + + /* create a vorbis decoder */ + decoder = gst_element_factory_make ("vorbisdec", "decoder"); g_assert (decoder != NULL); /* and an audio sink */ @@ -134,9 +138,9 @@ main (int argc, char *argv[]) g_assert (audiosink != NULL); /* add objects to the thread */ - gst_bin_add_many (GST_BIN (thread), filesrc, decoder, audiosink, NULL); + gst_bin_add_many (GST_BIN (thread), filesrc, demuxer, decoder, audiosink, NULL); /* link them in the logical order */ - gst_element_link_many (filesrc, decoder, audiosink, NULL); + gst_element_link_many (filesrc, demuxer, decoder, audiosink, NULL); /* start playing */ gst_element_set_state (thread, GST_STATE_PLAYING); diff --git a/docs/manual/basics-helloworld.xml b/docs/manual/basics-helloworld.xml index deb891f236..420d9fa975 100644 --- a/docs/manual/basics-helloworld.xml +++ b/docs/manual/basics-helloworld.xml @@ -271,7 +271,7 @@ main (int argc, char *argv[]) We can also choose to use another type of sink instead of the audiosink. - We could use a disksink to write the raw samples to a file, for example. + We could use a filesink to write the raw samples to a file, for example. It should also be clear that inserting filters, like a stereo effect, into the pipeline is not that hard to do. The most important thing is that you can reuse already existing elements. diff --git a/docs/manual/helloworld.xml b/docs/manual/helloworld.xml index deb891f236..420d9fa975 100644 --- a/docs/manual/helloworld.xml +++ b/docs/manual/helloworld.xml @@ -271,7 +271,7 @@ main (int argc, char *argv[]) We can also choose to use another type of sink instead of the audiosink. - We could use a disksink to write the raw samples to a file, for example. + We could use a filesink to write the raw samples to a file, for example. It should also be clear that inserting filters, like a stereo effect, into the pipeline is not that hard to do. The most important thing is that you can reuse already existing elements. diff --git a/docs/manual/threads.xml b/docs/manual/threads.xml index 2f625ce25b..06f5fb1293 100644 --- a/docs/manual/threads.xml +++ b/docs/manual/threads.xml @@ -104,7 +104,7 @@ eos (GstElement *src, gpointer data) int main (int argc, char *argv[]) { - GstElement *filesrc, *decoder, *audiosink; + GstElement *filesrc, *demuxer, *decoder, *audiosink; GstElement *thread; if (argc < 2) { @@ -125,8 +125,12 @@ main (int argc, char *argv[]) g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread); - /* create an ogg decoder */ - decoder = gst_element_factory_make ("vorbisfile", "decoder"); + /* create an ogg demuxer */ + demuxer = gst_element_factory_make ("oggdemux", "demuxer"); + g_assert (demuxer != NULL); + + /* create a vorbis decoder */ + decoder = gst_element_factory_make ("vorbisdec", "decoder"); g_assert (decoder != NULL); /* and an audio sink */ @@ -134,9 +138,9 @@ main (int argc, char *argv[]) g_assert (audiosink != NULL); /* add objects to the thread */ - gst_bin_add_many (GST_BIN (thread), filesrc, decoder, audiosink, NULL); + gst_bin_add_many (GST_BIN (thread), filesrc, demuxer, decoder, audiosink, NULL); /* link them in the logical order */ - gst_element_link_many (filesrc, decoder, audiosink, NULL); + gst_element_link_many (filesrc, demuxer, decoder, audiosink, NULL); /* start playing */ gst_element_set_state (thread, GST_STATE_PLAYING); diff --git a/docs/random/mimetypes b/docs/random/mimetypes index 4d0620c57c..2421681d79 100644 --- a/docs/random/mimetypes +++ b/docs/random/mimetypes @@ -373,7 +373,7 @@ channels = 1 - MAXINT (INT, number of audio channels) 4 - Ogg/Vorbis MIME type: audio/x-vorbis Encoder: vorbisenc - Decoder: vorbisfile + Decoder: vorbisdec 5 - Windows Media Audio 1 and 2 (WMA) MIME type: audio/x-wma diff --git a/docs/random/wtay/events2 b/docs/random/wtay/events2 index 58761b330b..a02353f41c 100644 --- a/docs/random/wtay/events2 +++ b/docs/random/wtay/events2 @@ -29,7 +29,7 @@ limit the valid directions an event can travel in? ie. Can EOS only travel downstream (left to right)? eg. Seek travels upstream, but it makes sense to also make it travel - downstream (the case of a disksink, where we overwrite the header) + downstream (the case of a filesink, where we overwrite the header) Setting an event function diff --git a/tools/README b/tools/README index 558adc8460..226e6a302a 100644 --- a/tools/README +++ b/tools/README @@ -31,35 +31,35 @@ And too play the same song with gnome-vfs via smb: Here we convert a Mp3 file into an Ogg Vorbis file: - gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! disksink location=music.ogg + 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 ! vorbisdec ! osssink + gst-launch filesrc location=music.ogg ! oggdemux ! vorbisdec ! osssink Some other useful pipelines are.. Plays wav files (currently there are no wav encoders): - gst-launch filesrc location=music.wav ! parsewav ! osssink + gst-launch filesrc location=music.wav ! wavparse ! osssink Converts wav files into mp3 and ogg files: - gst-launch filesrc location=music.wav ! parsewav ! vorbisenc ! disksink location=music.ogg - gst-launch filesrc location=music.wav ! parsewav ! mpegaudio ! disksink location=music.mp3 + 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 ! disksink location=cd.mp3 + 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 ! disksink location=input.ogg + 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): diff --git a/tools/gst-launch.1.in b/tools/gst-launch.1.in index 12e46fcb34..8aec37bd7a 100644 --- a/tools/gst-launch.1.in +++ b/tools/gst-launch.1.in @@ -224,7 +224,7 @@ Play the mp3 music file "music.mp3" using a libmad-based plug-in and output to an OSS device .B - gst\-launch filesrc location=music.ogg ! vorbisfile ! osssink + gst\-launch filesrc location=music.ogg ! oggdemux ! vorbisdec ! osssink .br Play an Ogg Vorbis format file