mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
eglglessink: Post stream-status messages for our render thread
This commit is contained in:
parent
8786262fff
commit
b0bad3ca15
1 changed files with 20 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue