2007-01-30 17:19:33 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2004 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
2007-02-27 12:02:03 +00:00
|
|
|
* Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com>
|
2007-01-30 17:19:33 +00:00
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
2007-02-27 12:02:03 +00:00
|
|
|
*
|
|
|
|
* The development of this code was made possible due to the involvement of Pioneers
|
|
|
|
* of the Inevitable, the creators of the Songbird Music player
|
|
|
|
*
|
2007-01-30 17:19:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* inspiration gained from looking at source of osx video out of xine and vlc
|
|
|
|
* and is reflected in the code
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#import <QuickTime/QuickTime.h>
|
|
|
|
#import <glib.h>
|
2012-06-01 04:19:35 +00:00
|
|
|
#import <gst/video/navigation.h>
|
2007-01-30 17:19:33 +00:00
|
|
|
|
|
|
|
struct _GstOSXImage;
|
|
|
|
|
|
|
|
@interface GstGLView : NSOpenGLView
|
|
|
|
{
|
|
|
|
int i_effect;
|
2007-11-20 11:41:13 +00:00
|
|
|
unsigned int pi_texture;
|
2007-01-30 17:19:33 +00:00
|
|
|
float f_x;
|
|
|
|
float f_y;
|
|
|
|
int initDone;
|
|
|
|
char* data;
|
|
|
|
int width, height;
|
|
|
|
BOOL fullscreen;
|
2012-05-16 16:52:45 +00:00
|
|
|
BOOL keepAspectRatio;
|
2007-01-30 17:19:33 +00:00
|
|
|
NSOpenGLContext* fullScreenContext;
|
2007-03-14 16:30:19 +00:00
|
|
|
NSOpenGLContext* actualContext;
|
2012-05-14 12:27:58 +00:00
|
|
|
NSTrackingArea *trackingArea;
|
|
|
|
GstNavigation *navigation;
|
2012-05-16 19:12:22 +00:00
|
|
|
NSRect drawingBounds;
|
2012-05-24 18:43:16 +00:00
|
|
|
NSThread *mainThread;
|
2007-01-30 17:19:33 +00:00
|
|
|
}
|
|
|
|
- (void) drawQuad;
|
|
|
|
- (void) drawRect: (NSRect) rect;
|
|
|
|
- (id) initWithFrame: (NSRect) frame;
|
|
|
|
- (void) initTextures;
|
|
|
|
- (void) reloadTexture;
|
|
|
|
- (void) cleanUp;
|
|
|
|
- (void) displayTexture;
|
|
|
|
- (char*) getTextureBuffer;
|
|
|
|
- (void) setFullScreen: (BOOL) flag;
|
2012-05-16 16:52:45 +00:00
|
|
|
- (void) setKeepAspectRatio: (BOOL) flag;
|
2007-01-30 17:19:33 +00:00
|
|
|
- (void) reshape;
|
|
|
|
- (void) setVideoSize: (int) w: (int) h;
|
2012-05-16 19:12:22 +00:00
|
|
|
- (NSRect) getDrawingBounds;
|
2010-05-11 08:52:58 +00:00
|
|
|
- (BOOL) haveSuperview;
|
|
|
|
- (void) haveSuperviewReal: (NSMutableArray *)closure;
|
|
|
|
- (void) addToSuperview: (NSView *)superview;
|
|
|
|
- (void) removeFromSuperview: (id)unused;
|
2012-05-14 12:27:58 +00:00
|
|
|
- (void) setNavigation: (GstNavigation *) nav;
|
2012-05-24 18:43:16 +00:00
|
|
|
- (void) setMainThread: (NSThread *) thread;
|
2007-01-30 17:19:33 +00:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GstOSXVideoSinkWindow: NSWindow {
|
|
|
|
int width, height;
|
|
|
|
GstGLView *gstview;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) setContentSize: (NSSize) size;
|
|
|
|
- (GstGLView *) gstView;
|
2012-05-14 16:01:02 +00:00
|
|
|
- (id)initWithContentNSRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag screen:(NSScreen *)aScreen;
|
2007-01-30 17:19:33 +00:00
|
|
|
@end
|