1
mirror of https://github.com/mpv-player/mpv synced 2024-11-07 01:47:00 +01:00
mpv/libvo/vo_macosx.h
ulion e3c9524d66 Set protocol for the vo proxy used in shared-buffer mode.
NOTE: You have to update your mplayerosx to svn r148 or newer to work with it.
This change will speed up vo proxy and fix all these warnings:
vo_macosx.m: In function 'config':
vo_macosx.m:165: warning: 'NSProxy' may not respond to '-startWithWidth:withHeight:withBytes:withAspect:'
vo_macosx.m:165: warning: (Messages without a matching method signature
vo_macosx.m:165: warning: will be assumed to return 'id' and accept
vo_macosx.m:165: warning: '...' as arguments.)
vo_macosx.m: In function 'flip_page':
vo_macosx.m:183: warning: 'NSProxy' may not respond to '-render'
vo_macosx.m: In function 'uninit':
vo_macosx.m:235: warning: 'NSProxy' may not respond to '-stop'
vo_macosx.m: In function 'control':
vo_macosx.m:334: warning: 'NSProxy' may not respond to '-ontop'
vo_macosx.m:336: warning: 'NSProxy' may not respond to '-toggleFullscreen'


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25185 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-28 00:01:35 +00:00

97 lines
2.1 KiB
Objective-C

/*
vo_macosx.h
by Nicolas Plourde <nicolasplourde@gmail.com>
Copyright (c) Nicolas Plourde - 2005
MPlayer Mac OSX video out module.
*/
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
#import <QuickTime/QuickTime.h>
// MPlayer OS X VO Protocol
@protocol MPlayerOSXVOProto
- (int) startWithWidth: (bycopy int)width
withHeight: (bycopy int)height
withBytes: (bycopy int)bytes
withAspect: (bycopy int)aspect;
- (void) stop;
- (void) render;
- (void) toggleFullscreen;
- (void) ontop;
@end
@interface MPlayerOpenGLView : NSOpenGLView
{
//Cocoa
NSWindow *window;
NSOpenGLContext *glContext;
NSEvent *event;
//CoreVideo
CVPixelBufferRef currentFrameBuffer;
CVOpenGLTextureCacheRef textureCache;
CVOpenGLTextureRef texture;
NSRect textureFrame;
GLfloat lowerLeft[2];
GLfloat lowerRight[2];
GLfloat upperRight[2];
GLfloat upperLeft[2];
BOOL mouseHide;
float winSizeMult;
//menu command id
NSMenuItem *kQuitCmd;
NSMenuItem *kHalfScreenCmd;
NSMenuItem *kNormalScreenCmd;
NSMenuItem *kDoubleScreenCmd;
NSMenuItem *kFullScreenCmd;
NSMenuItem *kKeepAspectCmd;
NSMenuItem *kAspectOrgCmd;
NSMenuItem *kAspectFullCmd;
NSMenuItem *kAspectWideCmd;
NSMenuItem *kPanScanCmd;
}
- (BOOL) acceptsFirstResponder;
- (BOOL) becomeFirstResponder;
- (BOOL) resignFirstResponder;
//window & rendering
- (void) preinit;
- (void) config;
- (void) prepareOpenGL;
- (void) render;
- (void) reshape;
- (void) setCurrentTexture;
- (void) drawRect: (NSRect *) bounds;
//vo control
- (void) fullscreen: (BOOL) animate;
- (void) ontop;
- (void) panscan;
- (void) rootwin;
//menu
- (void) initMenu;
- (void) menuAction:(id)sender;
//event
- (void) keyDown: (NSEvent *) theEvent;
- (void) mouseMoved: (NSEvent *) theEvent;
- (void) mouseDown: (NSEvent *) theEvent;
- (void) mouseUp: (NSEvent *) theEvent;
- (void) rightMouseDown: (NSEvent *) theEvent;
- (void) rightMouseUp: (NSEvent *) theEvent;
- (void) otherMouseDown: (NSEvent *) theEvent;
- (void) otherMouseUp: (NSEvent *) theEvent;
- (void) scrollWheel: (NSEvent *) theEvent;
- (void) mouseEvent: (NSEvent *) theEvent;
- (void) check_events;
@end