annotate libvo/vo_macosx.h @ 26003:a506a6ab14e1

Add standard license header and make copyright notices consistent.
author diego
date Tue, 19 Feb 2008 23:27:23 +0000
parents 48fe4b6e3bab
children 0a0f63090e60
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
1 /*
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
2 vo_macosx.h
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
3
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
4 by Nicolas Plourde <nicolasplourde@gmail.com>
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
5
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
6 Copyright (c) Nicolas Plourde - 2005
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
7
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
8 MPlayer Mac OSX video out module.
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
9 */
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
10
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
11 #import <Cocoa/Cocoa.h>
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
12 #import <QuartzCore/QuartzCore.h>
15327
8e21844c8a4c enable rootwin
nplourde
parents: 15289
diff changeset
13 #import <QuickTime/QuickTime.h>
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
14
25157
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
15 // MPlayer OS X VO Protocol
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
16 @protocol MPlayerOSXVOProto
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
17 - (int) startWithWidth: (bycopy int)width
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
18 withHeight: (bycopy int)height
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
19 withBytes: (bycopy int)bytes
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
20 withAspect: (bycopy int)aspect;
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
21 - (void) stop;
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
22 - (void) render;
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
23 - (void) toggleFullscreen;
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
24 - (void) ontop;
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
25 @end
cf3b6015735d Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents: 24077
diff changeset
26
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
27 @interface MPlayerOpenGLView : NSOpenGLView
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
28 {
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
29 //Cocoa
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
30 NSWindow *window;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
31 NSOpenGLContext *glContext;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
32 NSEvent *event;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
33
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
34 //CoreVideo
25180
48fe4b6e3bab Support double buffering, fix osd flicker.
ulion
parents: 25157
diff changeset
35 CVPixelBufferRef frameBuffers[2];
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
36 CVOpenGLTextureCacheRef textureCache;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
37 CVOpenGLTextureRef texture;
15729
55aaeb7b6aae new texture frame
nplourde
parents: 15726
diff changeset
38 NSRect textureFrame;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
39
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
40 GLfloat lowerLeft[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
41 GLfloat lowerRight[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
42 GLfloat upperRight[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
43 GLfloat upperLeft[2];
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
44
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
45 BOOL mouseHide;
15855
1ca8b5873c3f keep window size when changing aspect
nplourde
parents: 15729
diff changeset
46 float winSizeMult;
15570
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
47
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
48 //menu command id
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
49 NSMenuItem *kQuitCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
50 NSMenuItem *kHalfScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
51 NSMenuItem *kNormalScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
52 NSMenuItem *kDoubleScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
53 NSMenuItem *kFullScreenCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
54 NSMenuItem *kKeepAspectCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
55 NSMenuItem *kAspectOrgCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
56 NSMenuItem *kAspectFullCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
57 NSMenuItem *kAspectWideCmd;
f197f4a60b20 create menu
nplourde
parents: 15327
diff changeset
58 NSMenuItem *kPanScanCmd;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
59 }
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
60
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
61 - (BOOL) acceptsFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
62 - (BOOL) becomeFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
63 - (BOOL) resignFirstResponder;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
64
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
65 //window & rendering
24076
7ac48ed8c394 Functions that do not return a value must be void
reimar
parents: 24075
diff changeset
66 - (void) preinit;
7ac48ed8c394 Functions that do not return a value must be void
reimar
parents: 24075
diff changeset
67 - (void) config;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
68 - (void) prepareOpenGL;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
69 - (void) render;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
70 - (void) reshape;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
71 - (void) setCurrentTexture;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
72 - (void) drawRect: (NSRect *) bounds;
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
73
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
74 //vo control
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
75 - (void) fullscreen: (BOOL) animate;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
76 - (void) ontop;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
77 - (void) panscan;
15327
8e21844c8a4c enable rootwin
nplourde
parents: 15289
diff changeset
78 - (void) rootwin;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
79
15611
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
80 //menu
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
81 - (void) initMenu;
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
82 - (void) menuAction:(id)sender;
2f77a2da1d82 Function name cleanup
nplourde
parents: 15570
diff changeset
83
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
84 //event
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
85 - (void) keyDown: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
86 - (void) mouseMoved: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
87 - (void) mouseDown: (NSEvent *) theEvent;
24077
9ce03980ed0c added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents: 24076
diff changeset
88 - (void) mouseUp: (NSEvent *) theEvent;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
89 - (void) rightMouseDown: (NSEvent *) theEvent;
24077
9ce03980ed0c added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents: 24076
diff changeset
90 - (void) rightMouseUp: (NSEvent *) theEvent;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
91 - (void) otherMouseDown: (NSEvent *) theEvent;
24077
9ce03980ed0c added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents: 24076
diff changeset
92 - (void) otherMouseUp: (NSEvent *) theEvent;
15289
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
93 - (void) scrollWheel: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
94 - (void) mouseEvent: (NSEvent *) theEvent;
e985d786c5f1 macosx core video module
nplourde
parents:
diff changeset
95 - (void) check_events;
24075
8595d6dbd0ed Text files must end with a newline
reimar
parents: 15855
diff changeset
96 @end