We can't wait for the ENTER/LEAVE messages to be be posted because the base
class sometimes calls the start method with the object lock, which would block
the message posting.
Instead, just assume that the message will be posted soon and continue. We'll
have to fix this in the base class.
message = gst_message_new_stream_status (GST_OBJECT (pulsesink),
GST_STREAM_STATUS_TYPE_ENTER, GST_ELEMENT (pulsesink));
gst_message_set_stream_status_object (message, &val);
message = gst_message_new_stream_status (GST_OBJECT (pulsesink),
GST_STREAM_STATUS_TYPE_ENTER, GST_ELEMENT (pulsesink));
gst_message_set_stream_status_object (message, &val);
gst_element_post_message (GST_ELEMENT (pulsesink), message);
/* signal the waiter */
gst_element_post_message (GST_ELEMENT (pulsesink), message);
/* signal the waiter */
pa_mainloop_api_once (pa_threaded_mainloop_get_api (psink->mainloop),
mainloop_enter_defer_cb, psink);
pa_mainloop_api_once (pa_threaded_mainloop_get_api (psink->mainloop),
mainloop_enter_defer_cb, psink);
- while (psink->pa_defer_ran == FALSE)
- pa_threaded_mainloop_wait (psink->mainloop);
-
GST_DEBUG_OBJECT (psink, "starting");
pbuf->paused = FALSE;
gst_pulsering_set_corked (pbuf, FALSE, FALSE);
GST_DEBUG_OBJECT (psink, "starting");
pbuf->paused = FALSE;
gst_pulsering_set_corked (pbuf, FALSE, FALSE);
mainloop_leave_defer_cb, psink);
GST_DEBUG_OBJECT (psink, "waiting for stream status");
mainloop_leave_defer_cb, psink);
GST_DEBUG_OBJECT (psink, "waiting for stream status");
- while (psink->pa_defer_ran == FALSE)
- pa_threaded_mainloop_wait (psink->mainloop);
-
pa_threaded_mainloop_unlock (psink->mainloop);
return res;
pa_threaded_mainloop_unlock (psink->mainloop);
return res;