From: Julien Isorce Date: Tue, 27 May 2014 07:46:16 +0000 (+0100) Subject: gl: rename platform cocoa to cgl X-Git-Tag: 1.19.3~511^2~1989^2~1450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b84a2eaf9fcbdbcf26337db24541a22e0efdbbbf;p=platform%2Fupstream%2Fgstreamer.git gl: rename platform cocoa to cgl Before: GST_GL_PLATFORM=cocoa GST_GL_WINDOW=cocoa gst-launch-1.0 videotestsrc ! glimagesink After: GST_GL_PLATFORM=cgl GST_GL_WINDOW=cocoa gst-launch-1.0 videotestsrc ! glimagesink but still pass --enable-cocoa to configure script because currently it can only be used with cocoa API. We could later have cgl/gstglcontext_cgl.h that manages a CGLContextObj directly and cocoa/gstglcontext_cocoa.h would just wrap it. So that it could be used with other Apple's window APIs. https://bugzilla.gnome.org/show_bug.cgi?id=729245 --- diff --git a/gst-libs/gst/gl/gstglcontext.c b/gst-libs/gst/gl/gstglcontext.c index 550d3e3..4eb0b50 100644 --- a/gst-libs/gst/gl/gstglcontext.c +++ b/gst-libs/gst/gl/gstglcontext.c @@ -55,7 +55,7 @@ #if GST_GL_HAVE_PLATFORM_EGL #include "egl/gstglcontext_egl.h" #endif -#if GST_GL_HAVE_PLATFORM_COCOA +#if GST_GL_HAVE_PLATFORM_CGL #include "cocoa/gstglcontext_cocoa.h" #endif #if GST_GL_HAVE_PLATFORM_WGL @@ -261,8 +261,8 @@ gst_gl_context_new (GstGLDisplay * display) if (!context && (!user_choice || g_strstr_len (user_choice, 7, "egl"))) context = GST_GL_CONTEXT (gst_gl_context_egl_new ()); #endif -#if GST_GL_HAVE_PLATFORM_COCOA - if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cocoa"))) +#if GST_GL_HAVE_PLATFORM_CGL + if (!context && (!user_choice || g_strstr_len (user_choice, 5, "cgl"))) context = GST_GL_CONTEXT (gst_gl_context_cocoa_new ()); #endif #if GST_GL_HAVE_PLATFORM_GLX diff --git a/tests/examples/gl/qt/qglwtextureshare/glcontextid.h b/tests/examples/gl/qt/qglwtextureshare/glcontextid.h index c6a240c..a6c8460 100644 --- a/tests/examples/gl/qt/qglwtextureshare/glcontextid.h +++ b/tests/examples/gl/qt/qglwtextureshare/glcontextid.h @@ -30,7 +30,7 @@ #include #include #include -#elif defined (GST_GL_HAVE_PLATFORM_COCOA) +#elif defined (GST_GL_HAVE_PLATFORM_CGL) #include class NSOpenGLContext; #else @@ -47,7 +47,7 @@ HGLRC contextId; HDC dc; } GLContextID; -#elif defined(GST_GL_HAVE_PLATFORM_COCOA) +#elif defined(GST_GL_HAVE_PLATFORM_CGL) typedef struct _tagGLContextID { NSOpenGLContext* contextId; diff --git a/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp b/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp index 303e4f1..c590ac7 100644 --- a/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp +++ b/tests/examples/gl/qt/qglwtextureshare/qglrenderer.cpp @@ -62,8 +62,8 @@ QGLRenderer::initializeGL() /* FIXME: Allow the choice at runtime */ #if defined(GST_GL_HAVE_PLATFORM_WGL) context = gst_gl_context_new_wrapped (display, (guintptr) wglGetCurrentContext (), GST_GL_PLATFORM_WGL, GST_GL_API_OPENGL); -#elif defined (GST_GL_HAVE_PLATFORM_COCOA) - context = gst_gl_context_new_wrapped (display, (guintptr) qt_current_nsopengl_context(), GST_GL_PLATFORM_COCOA, GST_GL_API_OPENGL); +#elif defined (GST_GL_HAVE_PLATFORM_CGL) + context = gst_gl_context_new_wrapped (display, (guintptr) qt_current_nsopengl_context(), GST_GL_PLATFORM_CGL, GST_GL_API_OPENGL); #elif defined(GST_GL_HAVE_PLATFORM_GLX) context = gst_gl_context_new_wrapped (display, (guintptr) glXGetCurrentContext (), GST_GL_PLATFORM_GLX, GST_GL_API_OPENGL); #endif