eglglessink: Post stream-status messages for our render thread

This commit is contained in:
Sebastian Dröge 2012-11-01 13:51:09 +01:00
parent 8786262fff
commit b0bad3ca15

View file

@ -591,8 +591,19 @@ HANDLE_ERROR:
static gpointer
render_thread_func (GstEglGlesSink * eglglessink)
{
GstMessage *message;
GValue val = { 0 };
GstDataQueueItem *item = NULL;
g_value_init (&val, G_TYPE_POINTER);
g_value_set_pointer (&val, g_thread_self ());
message = gst_message_new_stream_status (GST_OBJECT_CAST (eglglessink),
GST_STREAM_STATUS_TYPE_ENTER, GST_ELEMENT_CAST (eglglessink));
gst_message_set_stream_status_object (message, &val);
GST_DEBUG_OBJECT (eglglessink, "posting ENTER stream status");
gst_element_post_message (GST_ELEMENT_CAST (eglglessink), message);
g_value_unset (&val);
while (gst_data_queue_pop (eglglessink->queue, &item)) {
GstBuffer *buf = NULL;
@ -650,6 +661,15 @@ render_thread_func (GstEglGlesSink * eglglessink)
eglglessink->configured_caps = NULL;
}
g_value_init (&val, G_TYPE_POINTER);
g_value_set_pointer (&val, g_thread_self ());
message = gst_message_new_stream_status (GST_OBJECT_CAST (eglglessink),
GST_STREAM_STATUS_TYPE_LEAVE, GST_ELEMENT_CAST (eglglessink));
gst_message_set_stream_status_object (message, &val);
GST_DEBUG_OBJECT (eglglessink, "posting LEAVE stream status");
gst_element_post_message (GST_ELEMENT_CAST (eglglessink), message);
g_value_unset (&val);
return NULL;
}