I do a gst_element_set_state() on a pipeline, and it returns GST_STATE_CHANGE_ASYNC.
I then call gst_element_get_state() for that same pipeline to wait for the state change to complete, as per the documentation. However, the program never returns from gst_element_get_state(). The pipeline is made up of my own src element, as well as ffmpegcolorspace, panorama, volume, audioconvert, audioresample, autoaudiosink. Help on what to look at would be welcome. __________________________________________________________________ Make your browsing faster, safer, and easier with the new Internet Explorer® 8. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Fri, Dec 11, 2009 at 9:52 PM, S Boucher <[hidden email]> wrote: I do a gst_element_set_state() on a pipeline, and it returns GST_STATE_CHANGE_ASYNC. If the state you're setting to is GST_STATE_PLAYING, the sink needs to receive data in order to preroll and effectively change to the PLAYING state (that's when the get_state call would return). Are you sure your src element is providing data to the pipeline?
-- Thiago Sousa Santos ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by S Boucher
On Fri, 2009-12-11 at 15:52 -0800, S Boucher wrote:
> I do a gst_element_set_state() on a pipeline, and it returns > GST_STATE_CHANGE_ASYNC. > > I then call gst_element_get_state() for that same pipeline to wait for > the state change to complete, as per the documentation. However, the > program never returns from gst_element_get_state(). > > The pipeline is made up of my own src element, as well as > ffmpegcolorspace, panorama, volume, audioconvert, audioresample, > autoaudiosink. > > Help on what to look at would be welcome. In addition to what Thiago said, try replacing gst_element_get_state() with something like this: msg = gst_bus_timed_pop_filtered (bus, 5 * GST_SECOND, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR); This will abort and give you an error message instead of hanging forever if the state change can't be performed (or time out with no message if it takes too long for some reason). Cheers -Tim ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Thiago Sousa Santos-2
--- On Sat, 12/12/09, [hidden email] <[hidden email]> wrote: > If the state you're setting to is GST_STATE_PLAYING, > the sink needs to receive data in order to preroll and > effectively change to the PLAYING state (that's when the > get_state call would return). Are you sure your src element > is providing data to the pipeline? I changed the code to explicitly go through each intermediate states. gst_get_element_state() hangs right after changing from READY->PAUSED. And with: msg = gst_bus_timed_pop_filtered (bus, 5 * GST_SECOND, GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR); I get NULL. And with: g_signal_connect (G_OBJECT (bus), "message", G_CALLBACK (on_message), media); I do receive GST_MESSAGE_STATE_CHANGED in the callback. Maybe I'm missing something with regards to threads... __________________________________________________________________ The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |