From: Julien Isorce Date: Sun, 8 Jun 2008 02:19:43 +0000 (+0000) Subject: [084/906] add a glfilterapp which holds the client draw and reshape callbacks (some... X-Git-Tag: 1.19.3~511^2~1989^2~2176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7973568f071316e3f50b0dd5af573b0a046d1a46;p=platform%2Fupstream%2Fgstreamer.git [084/906] add a glfilterapp which holds the client draw and reshape callbacks (some "wanted" regressions about the glvideomaker, have been done with this version. Will be fix in next commits) git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@496 93df14bb-0f41-7a43-8087-d3e2a2f0e464 --- diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index a67bc21..9c3adc5 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -1332,7 +1332,38 @@ gst_gl_display_set_windowId (GstGLDisplay* display, gulong winId) display->textureFBOWidth, display->textureFBOHeight, winId, TRUE); +} + + +/* Called by gst_gl elements */ +void +gst_gl_display_resetGLcontext (GstGLDisplay* display, + gint glcontext_width, gint glcontext_height) +{ + static gint glheight = 0; + gst_gl_display_lock (display); + gst_gl_display_postMessage (GST_GL_DISPLAY_ACTION_DESTROY, display); + g_cond_wait (display->cond_destroy, display->mutex); + gst_gl_display_unlock (display); + + if (g_hash_table_size (gst_gl_display_map) == 0) + { + g_thread_join (gst_gl_display_glutThread); + g_print ("Glut thread joined when setting winId\n"); + 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; + } + + //init opengl context + gst_gl_display_initGLContext (display, + 50, glheight++ * (glcontext_height+50) + 50, + glcontext_width, glcontext_height, + display->textureFBOWidth, display->textureFBOHeight, + display->winId, + FALSE); } diff --git a/gst-libs/gst/gl/gstgldisplay.h b/gst-libs/gst/gl/gstgldisplay.h index edcfca8..8bd0572 100644 --- a/gst-libs/gst/gl/gstgldisplay.h +++ b/gst-libs/gst/gl/gstgldisplay.h @@ -252,5 +252,7 @@ void gst_gl_display_useFBO (GstGLDisplay* display, gint textureFBOWidth, gint te void gst_gl_display_rejectFBO (GstGLDisplay* display, guint fbo, guint depthbuffer, guint texture); void gst_gl_display_set_windowId (GstGLDisplay* display, gulong winId); +void gst_gl_display_resetGLcontext (GstGLDisplay* display, + gint glcontext_width, gint glcontext_height); #endif