From e57fb35bc0a730d3815d8a52ec0ac87645b1e964 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 28 Jan 2015 17:05:14 +1100 Subject: [PATCH] cgl: add a header for the CAOpenGLLayer support --- gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h | 13 +----- gst-libs/gst/gl/cocoa/gstglcaopengllayer.h | 49 +++++++++++++++++++++ gst-libs/gst/gl/cocoa/gstglcaopengllayer.m | 1 + 3 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 gst-libs/gst/gl/cocoa/gstglcaopengllayer.h diff --git a/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h b/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h index 3b777c7d0c..2818610352 100644 --- a/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h +++ b/gst-libs/gst/gl/cocoa/gstgl_cocoa_private.h @@ -27,6 +27,7 @@ #include "gstglwindow_cocoa.h" #include "gstglcontext_cocoa.h" +#include "gstglcaopengllayer.h" G_BEGIN_DECLS @@ -48,18 +49,6 @@ struct _GstGLContextCocoaPrivate /* */ /* =============================================================*/ -@interface GstGLCAOpenGLLayer : CAOpenGLLayer { -@public - GstGLContextCocoa *gst_gl_context; - CGLContextObj gl_context; - -@private - gint expected_dims[4]; -} -- (id)initWithGstGLContext:(GstGLContextCocoa *)context; -- (void)resize:(NSRect)bounds; -@end - @interface GstGLNSView: NSView { @public GstGLWindowCocoa *window_cocoa; diff --git a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h new file mode 100644 index 0000000000..c68b456599 --- /dev/null +++ b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.h @@ -0,0 +1,49 @@ +/* + * GStreamer + * Copyright (C) 2015 Matthew Waters + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GST_GL_CA_OPENGL_LAYER__ +#define __GST_GL_CA_OPENGL_LAYER__ + +#include +#include +#include + +#include + +G_BEGIN_DECLS + +@interface GstGLCAOpenGLLayer : CAOpenGLLayer { +@public + GstGLContextCocoa *gst_gl_context; + CGLContextObj gl_context; + +@private + gint expected_dims[4]; + GstGLWindowCB draw_cb; + gpointer draw_data; + GDestroyNotify draw_notify; +} +- (id) initWithGstGLContext: (GstGLContextCocoa *)context; +- (void) resize: (NSRect)bounds; +@end + +G_END_DECLS + +#endif /* __GST_GL_CA_OPENGL_LAYER__ */ diff --git a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m index 9fbc94185c..c360bc134a 100644 --- a/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m +++ b/gst-libs/gst/gl/cocoa/gstglcaopengllayer.m @@ -24,6 +24,7 @@ #include +#include "gstglcaopengllayer.h" #include "gstgl_cocoa_private.h" @implementation GstGLCAOpenGLLayer