Blocked when setting state to PLAYING

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Blocked when setting state to PLAYING

deeps8us
I have a gstreamer code with functions such as load_pipeline, play, stop and seek.
Using a testapp, in while (1) loop, I monitor for user input and call load / play / stop accordingly.
Since I have a while loop in testapp, I dont have g_main_loop running in my gstreamer code.

I can successfully do load and play. Problem is: once playing, it will no longer monitor for any other key input. It is like it went to blocked state. (Just like g_main_loop is running)
My play function is only having the line gst_element_set_state(play, GST_STATE_PLAYING);
What could be the issue.
Reply | Threaded
Open this post in threaded view
|

Re: Blocked when setting state to PLAYING

Michael Gruner
Hi

Signals, messages and many other things require the GMainLoop running to work. If you have a while(1) you may try adding g_main_context_iteration() before completing a loop iteration. This will check for pending events. See more at:


On Jan 27, 2017, at 07:41, deepthips <[hidden email]> wrote:

I have a gstreamer code with functions such as load_pipeline, play, stop and
seek.
Using a testapp, in while (1) loop, I monitor for user input and call load /
play / stop accordingly.
Since I have a while loop in testapp, I dont have g_main_loop running in my
gstreamer code.

I can successfully do load and play. Problem is: once playing, it will no
longer monitor for any other key input. It is like it went to blocked state.
(Just like g_main_loop is running)
My play function is only having the line gst_element_set_state(play,
GST_STATE_PLAYING);
What could be the issue.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Blocked-when-setting-state-to-PLAYING-tp4681649.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Blocked when setting state to PLAYING

deeps8us
Thank you Michael for the information