[gst-devel] State changes from PLAY -> READY -> PLAY only work with mad plugin?

Wim Taymans wim.taymans at gmail.com
Thu Mar 4 12:54:02 CET 2010


On Thu, 2010-03-04 at 11:47 +0000, Georg Sauthoff wrote:
> Hi,
> 
> I am playing around with the gstreamer API and currently I am trying to
> make a pipeline stop (works) and make it to play from the beginning
> again (works just in one case).
> 
> In the test program I construct the pipeline via:
> 
> pipeline = gst_parse_launch(argv[1], &error);
> 
> With this example
> 
> filesrc location=some.mp3 ! mad ! audioconvert ! audioresample ! alsasink
> 
> it is no problem to to command pipeline state changes
> 
> via
> 
> gst_element_set_state(pipeline, state);
> 
> in such a way
> 
> GST_STATE_PLAYING -> READY -> PLAYING
> 
> or
> 
> PLAYING -> READY -> PAUSED -> PLAYING
> 
> With the above pipeline, these state changes work like expected.
> 
> 
> But with a pipeline like
> 
> filesrc location=some.ogg ! oggdemux ! vorbisdec ! audioconvert !  audioresample ! alsasink
> 
> or
> 
> filesrc location=some.mp3 ! decodebin2 ! audioconvert ! audioresample ! alsasink
> 
> the state change sequences fail:
> 
> 
> GST_STATE_PLAYING -> READY -> ***FAIL*** PLAYING
> 
> or
> 
> PLAYING -> READY -> ***FAIL*** PAUSED -> PLAYING
> 
> For the ogg vorbis example:
> 
> Error was: gstoggdemux.c(3251): gst_ogg_demux_loop ():
> /GstPipeline:pipeline0/GstOggDemux:oggdemux0:
> stream stopped, reason not-linked message: Internal data stream error.
> 
> Which looks to me like, hm, a bit kryptic.
> 
> Obviously, I am missing something about the use of the gstreamer
> API. What is the problem with the last two
> pipelines/state-change-sequences?

oggdemux has dynamic pads and gst-launch does not support dynamic pads
after being set to READY. You have to write an application to properly
handle these cases.

Wim

> 
> Best regards
> Georg
> 
> PS: I am using gstreamer 0.10 under Ubuntu 9.10.
> 
> 
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel






More information about the gstreamer-devel mailing list