1 /* 2 * GStreamer 3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Library General Public 7 * License as published by the Free Software Foundation; either 8 * version 2 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Library General Public License for more details. 14 * 15 * You should have received a copy of the GNU Library General Public 16 * License along with this library; if not, write to the 17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 18 * Boston, MA 02110-1301, USA. 19 */ 20 21 #ifndef __GST_GL_COCOA_PRIVATE_H__ 22 #define __GST_GL_COCOA_PRIVATE_H__ 23 24 #include <gst/gst.h> 25 #include <gst/gl/gstglfuncs.h> 26 27 #include <Cocoa/Cocoa.h> 28 29 #include "gstglwindow_cocoa.h" 30 #include "gstglcontext_cocoa.h" 31 #include "gstglcaopengllayer.h" 32 33 G_BEGIN_DECLS 34 35 struct _GstGLContextCocoaPrivate 36 { 37 CGLPixelFormatObj pixel_format; 38 CGLContextObj gl_context; 39 CGLContextObj external_gl_context; 40 41 GstGLAPI context_api; 42 43 gint source_id; 44 }; 45 46 47 /* =============================================================*/ 48 /* */ 49 /* GstGLNSView declaration */ 50 /* */ 51 /* =============================================================*/ 52 53 @interface GstGLNSView: NSView { 54 @public 55 GstGLWindowCocoa *window_cocoa; 56 GstGLCAOpenGLLayer *layer; 57 } 58 - (id) initWithFrameLayer:(GstGLWindowCocoa *)window rect:(NSRect)contentRect layer:(CALayer *)layerContent; 59 @end 60 61 gboolean gst_gl_window_cocoa_create_window (GstGLWindowCocoa *window_cocoa); 62 63 G_GNUC_INTERNAL 64 void _invoke_on_main (GstGLWindowCB func, gpointer data, GDestroyNotify notify); 65 66 G_END_DECLS 67 68 #endif /* __GST_GL_COCOA_PRIVATE_H__ */ 69