Mercurial > mplayer.hg
annotate libvo/vo_corevideo.h @ 32061:dcdcbe7f6713
Move video_time_usage / vout_time_usage extern var declarations to mpcommon.h.
author | diego |
---|---|
date | Sat, 11 Sep 2010 11:33:07 +0000 |
parents | dc95a7191375 |
children | 98f341e62270 |
rev | line source |
---|---|
15289 | 1 /* |
29210 | 2 * CoreVideo video output driver |
28446
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
3 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
4 * Copyright (c) 2005 Nicolas Plourde <nicolasplourde@gmail.com> |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
5 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
6 * This file is part of MPlayer. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
7 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
8 * MPlayer is free software; you can redistribute it and/or modify |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
11 * (at your option) any later version. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
12 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
13 * MPlayer is distributed in the hope that it will be useful, |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
16 * GNU General Public License for more details. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
17 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
18 * You should have received a copy of the GNU General Public License along |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
28010
diff
changeset
|
21 */ |
15289 | 22 |
23 #import <Cocoa/Cocoa.h> | |
24 #import <QuartzCore/QuartzCore.h> | |
29207
5044f4496791
Replace QuickTime.h #include with Carbon.h, which is really needed.
diego
parents:
28446
diff
changeset
|
25 #import <Carbon/Carbon.h> |
15289 | 26 |
25157
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
27 // MPlayer OS X VO Protocol |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
28 @protocol MPlayerOSXVOProto |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
29 - (int) startWithWidth: (bycopy int)width |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
30 withHeight: (bycopy int)height |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
31 withBytes: (bycopy int)bytes |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
32 withAspect: (bycopy int)aspect; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
33 - (void) stop; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
34 - (void) render; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
35 - (void) toggleFullscreen; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
36 - (void) ontop; |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
37 @end |
cf3b6015735d
Set protocol for the vo proxy used in shared-buffer mode.
ulion
parents:
24077
diff
changeset
|
38 |
15611 | 39 @interface MPlayerOpenGLView : NSOpenGLView |
15289 | 40 { |
41 //Cocoa | |
42 NSWindow *window; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29210
diff
changeset
|
43 |
15289 | 44 //CoreVideo |
25180 | 45 CVPixelBufferRef frameBuffers[2]; |
15289 | 46 CVOpenGLTextureCacheRef textureCache; |
47 CVOpenGLTextureRef texture; | |
15729 | 48 NSRect textureFrame; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29210
diff
changeset
|
49 |
31744 | 50 GLfloat lowerLeft[2]; |
51 GLfloat lowerRight[2]; | |
52 GLfloat upperRight[2]; | |
53 GLfloat upperLeft[2]; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29210
diff
changeset
|
54 |
15289 | 55 BOOL mouseHide; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29210
diff
changeset
|
56 |
15570 | 57 //menu command id |
58 NSMenuItem *kHalfScreenCmd; | |
59 NSMenuItem *kNormalScreenCmd; | |
60 NSMenuItem *kDoubleScreenCmd; | |
61 NSMenuItem *kFullScreenCmd; | |
62 NSMenuItem *kKeepAspectCmd; | |
63 NSMenuItem *kAspectOrgCmd; | |
64 NSMenuItem *kAspectFullCmd; | |
65 NSMenuItem *kAspectWideCmd; | |
66 NSMenuItem *kPanScanCmd; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29210
diff
changeset
|
67 |
28010
0a0f63090e60
factorize mouse hiding and screensaver disabling code
gpoirier
parents:
25180
diff
changeset
|
68 //timestamps for disabling screensaver and mouse hiding |
0a0f63090e60
factorize mouse hiding and screensaver disabling code
gpoirier
parents:
25180
diff
changeset
|
69 int lastMouseHide; |
0a0f63090e60
factorize mouse hiding and screensaver disabling code
gpoirier
parents:
25180
diff
changeset
|
70 int lastScreensaverUpdate; |
29564
4ae3d2d7946e
Use MPlayer's standard aspect handling functions in corevideo
reimar
parents:
29263
diff
changeset
|
71 @public |
4ae3d2d7946e
Use MPlayer's standard aspect handling functions in corevideo
reimar
parents:
29263
diff
changeset
|
72 float winSizeMult; |
15289 | 73 } |
74 | |
75 - (BOOL) acceptsFirstResponder; | |
76 - (BOOL) becomeFirstResponder; | |
77 - (BOOL) resignFirstResponder; | |
78 | |
79 //window & rendering | |
24076 | 80 - (void) preinit; |
81 - (void) config; | |
15289 | 82 - (void) prepareOpenGL; |
83 - (void) render; | |
84 - (void) reshape; | |
85 - (void) setCurrentTexture; | |
86 - (void) drawRect: (NSRect *) bounds; | |
15611 | 87 |
88 //vo control | |
15289 | 89 - (void) fullscreen: (BOOL) animate; |
90 - (void) ontop; | |
91 - (void) panscan; | |
15327 | 92 - (void) rootwin; |
15289 | 93 |
15611 | 94 //menu |
95 - (void) initMenu; | |
96 - (void) menuAction:(id)sender; | |
97 | |
15289 | 98 //event |
99 - (void) keyDown: (NSEvent *) theEvent; | |
100 - (void) mouseMoved: (NSEvent *) theEvent; | |
101 - (void) mouseDown: (NSEvent *) theEvent; | |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
102 - (void) mouseUp: (NSEvent *) theEvent; |
15289 | 103 - (void) rightMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
104 - (void) rightMouseUp: (NSEvent *) theEvent; |
15289 | 105 - (void) otherMouseDown: (NSEvent *) theEvent; |
24077
9ce03980ed0c
added double click support in vo_macosx. Patch by Ulion <ulion2002@gmail.com>
nplourde
parents:
24076
diff
changeset
|
106 - (void) otherMouseUp: (NSEvent *) theEvent; |
15289 | 107 - (void) scrollWheel: (NSEvent *) theEvent; |
108 - (void) mouseEvent: (NSEvent *) theEvent; | |
109 - (void) check_events; | |
24075 | 110 @end |