mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-13 11:34:10 +00:00
[118/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@573 93df14bb-0f41-7a43-8087-d3e2a2f0e464
This commit is contained in:
parent
27c009b1ee
commit
951460cdd1
2 changed files with 7 additions and 11 deletions
|
@ -347,9 +347,9 @@ gst_gl_display_init (GstGLDisplay *display, GstGLDisplayClass *klass)
|
|||
}
|
||||
|
||||
static void
|
||||
gst_gl_display_finalize (GObject *object)
|
||||
gst_gl_display_finalize (GObject* object)
|
||||
{
|
||||
GstGLDisplay *display = GST_GL_DISPLAY (object);
|
||||
GstGLDisplay* display = GST_GL_DISPLAY (object);
|
||||
|
||||
//request glut window destruction
|
||||
//blocking call because display must be alive
|
||||
|
@ -439,6 +439,7 @@ gst_gl_display_finalize (GObject *object)
|
|||
gst_gl_display_glutThread = NULL;
|
||||
g_async_queue_unref (gst_gl_display_messageQueue);
|
||||
g_hash_table_unref (gst_gl_display_map);
|
||||
gst_gl_display_map = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -498,7 +499,7 @@ gst_gl_display_thread_loop (void)
|
|||
gst_gl_display_thread_dispatch_action (msg);
|
||||
}
|
||||
}
|
||||
else g_print ("timeout reached in idle func\n");
|
||||
else GST_DEBUG ("timeout reached in idle func\n");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -323,7 +323,6 @@ gst_glimage_sink_stop (GstBaseSink* bsink)
|
|||
}
|
||||
if (glimage_sink->display)
|
||||
{
|
||||
gst_gl_display_set_visible_context (glimage_sink->display, FALSE);
|
||||
g_object_unref (glimage_sink->display);
|
||||
glimage_sink->display = NULL;
|
||||
}
|
||||
|
@ -410,6 +409,9 @@ gst_glimage_sink_set_caps (GstBaseSink* bsink, GstCaps* caps)
|
|||
glimage_sink->par_n = par_n;
|
||||
glimage_sink->par_d = par_d;
|
||||
|
||||
if (!glimage_sink->window_id)
|
||||
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (glimage_sink));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -433,8 +435,6 @@ gst_glimage_sink_render (GstBaseSink* bsink, GstBuffer* buf)
|
|||
{
|
||||
glimage_sink->display = g_object_ref (gl_buffer->display);
|
||||
|
||||
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (glimage_sink));
|
||||
|
||||
if (glimage_sink->window_id)
|
||||
gst_gl_display_set_window_id (glimage_sink->display, glimage_sink->window_id);
|
||||
|
||||
|
@ -462,10 +462,6 @@ gst_glimage_sink_render (GstBaseSink* bsink, GstBuffer* buf)
|
|||
//create a display
|
||||
glimage_sink->display = gst_gl_display_new ();
|
||||
|
||||
//Notify application to set window id now
|
||||
if (!glimage_sink->window_id)
|
||||
gst_x_overlay_prepare_xwindow_id (GST_X_OVERLAY (glimage_sink));
|
||||
|
||||
//init opengl context
|
||||
gst_gl_display_create_context (glimage_sink->display,
|
||||
50, y_pos++ * (glimage_sink->height+50) + 50,
|
||||
|
@ -531,7 +527,6 @@ gst_glimage_sink_set_xwindow_id (GstXOverlay* overlay, gulong window_id)
|
|||
GstGLImageSink* glimage_sink = GST_GLIMAGE_SINK (overlay);
|
||||
|
||||
g_return_if_fail (GST_IS_GLIMAGE_SINK (overlay));
|
||||
g_assert (glimage_sink->display != NULL);
|
||||
|
||||
GST_DEBUG ("set_xwindow_id %ld", window_id);
|
||||
|
||||
|
|
Loading…
Reference in a new issue