Merge remote-tracking branch 'origin/0.10'
[platform/upstream/gst-plugins-good.git] / sys / osxvideo / osxvideosink.h
1 /* GStreamer
2  * Copyright (C) 2004-6 Zaheer Abbas Merali <zaheerabbas at merali dot org>
3  * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com>
4  *
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  *
22  * The development of this code was made possible due to the involvement of Pioneers 
23  * of the Inevitable, the creators of the Songbird Music player
24  * 
25  */
26  
27 #ifndef __GST_OSX_VIDEO_SINK_H__
28 #define __GST_OSX_VIDEO_SINK_H__
29
30 #include <gst/video/gstvideosink.h>
31
32 #include <string.h>
33 #include <math.h>
34 #include <Cocoa/Cocoa.h>
35
36 #include <QuickTime/QuickTime.h>
37 #import "cocoawindow.h"
38
39 GST_DEBUG_CATEGORY_EXTERN (gst_debug_osx_video_sink);
40 #define GST_CAT_DEFAULT gst_debug_osx_video_sink
41
42 G_BEGIN_DECLS
43
44 #define GST_TYPE_OSX_VIDEO_SINK \
45   (gst_osx_video_sink_get_type())
46 #define GST_OSX_VIDEO_SINK(obj) \
47   (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_OSX_VIDEO_SINK, GstOSXVideoSink))
48 #define GST_OSX_VIDEO_SINK_CLASS(klass) \
49   (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_OSX_VIDEO_SINK, GstOSXVideoSinkClass))
50 #define GST_IS_OSX_VIDEO_SINK(obj) \
51   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_OSX_VIDEO_SINK))
52 #define GST_IS_OSX_VIDEO_SINK_CLASS(klass) \
53   (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_OSX_VIDEO_SINK))
54
55 typedef struct _GstOSXWindow GstOSXWindow;
56
57 typedef struct _GstOSXVideoSink GstOSXVideoSink;
58 typedef struct _GstOSXVideoSinkClass GstOSXVideoSinkClass;
59
60 #define GST_TYPE_OSXVIDEOBUFFER (gst_osxvideobuffer_get_type())
61
62 /* OSXWindow stuff */
63 struct _GstOSXWindow {
64   gint width, height;
65   gboolean internal;
66   GstGLView* gstview;
67 };
68
69 struct _GstOSXVideoSink {
70   /* Our element stuff */
71   GstVideoSink videosink;
72   GstOSXWindow *osxwindow;
73   NSView *superview;
74 };
75
76 struct _GstOSXVideoSinkClass {
77   GstVideoSinkClass parent_class;
78 };
79
80 GType gst_osx_video_sink_get_type(void);
81
82 G_END_DECLS
83
84 #endif /* __GST_OSX_VIDEO_SINK_H__ */
85