Mercurial > mplayer.hg
comparison libvo/vo_corevideo.h @ 29210:779281d8cd80
Rename macosx video output driver to corevideo.
author | diego |
---|---|
date | Mon, 04 May 2009 16:55:05 +0000 |
parents | libvo/vo_macosx.h@5044f4496791 |
children | 0f1b5b68af32 |
comparison
equal
deleted
inserted
replaced
29209:631aac106b7a | 29210:779281d8cd80 |
---|---|
1 /* | |
2 * CoreVideo video output driver | |
3 * | |
4 * Copyright (c) 2005 Nicolas Plourde <nicolasplourde@gmail.com> | |
5 * | |
6 * This file is part of MPlayer. | |
7 * | |
8 * MPlayer is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * MPlayer is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License along | |
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 */ | |
22 | |
23 #import <Cocoa/Cocoa.h> | |
24 #import <QuartzCore/QuartzCore.h> | |
25 #import <Carbon/Carbon.h> | |
26 | |
27 // MPlayer OS X VO Protocol | |
28 @protocol MPlayerOSXVOProto | |
29 - (int) startWithWidth: (bycopy int)width | |
30 withHeight: (bycopy int)height | |
31 withBytes: (bycopy int)bytes | |
32 withAspect: (bycopy int)aspect; | |
33 - (void) stop; | |
34 - (void) render; | |
35 - (void) toggleFullscreen; | |
36 - (void) ontop; | |
37 @end | |
38 | |
39 @interface MPlayerOpenGLView : NSOpenGLView | |
40 { | |
41 //Cocoa | |
42 NSWindow *window; | |
43 NSOpenGLContext *glContext; | |
44 NSEvent *event; | |
45 | |
46 //CoreVideo | |
47 CVPixelBufferRef frameBuffers[2]; | |
48 CVOpenGLTextureCacheRef textureCache; | |
49 CVOpenGLTextureRef texture; | |
50 NSRect textureFrame; | |
51 | |
52 GLfloat lowerLeft[2]; | |
53 GLfloat lowerRight[2]; | |
54 GLfloat upperRight[2]; | |
55 GLfloat upperLeft[2]; | |
56 | |
57 BOOL mouseHide; | |
58 float winSizeMult; | |
59 | |
60 //menu command id | |
61 NSMenuItem *kQuitCmd; | |
62 NSMenuItem *kHalfScreenCmd; | |
63 NSMenuItem *kNormalScreenCmd; | |
64 NSMenuItem *kDoubleScreenCmd; | |
65 NSMenuItem *kFullScreenCmd; | |
66 NSMenuItem *kKeepAspectCmd; | |
67 NSMenuItem *kAspectOrgCmd; | |
68 NSMenuItem *kAspectFullCmd; | |
69 NSMenuItem *kAspectWideCmd; | |
70 NSMenuItem *kPanScanCmd; | |
71 | |
72 //timestamps for disabling screensaver and mouse hiding | |
73 int lastMouseHide; | |
74 int lastScreensaverUpdate; | |
75 } | |
76 | |
77 - (BOOL) acceptsFirstResponder; | |
78 - (BOOL) becomeFirstResponder; | |
79 - (BOOL) resignFirstResponder; | |
80 | |
81 //window & rendering | |
82 - (void) preinit; | |
83 - (void) config; | |
84 - (void) prepareOpenGL; | |
85 - (void) render; | |
86 - (void) reshape; | |
87 - (void) setCurrentTexture; | |
88 - (void) drawRect: (NSRect *) bounds; | |
89 | |
90 //vo control | |
91 - (void) fullscreen: (BOOL) animate; | |
92 - (void) ontop; | |
93 - (void) panscan; | |
94 - (void) rootwin; | |
95 | |
96 //menu | |
97 - (void) initMenu; | |
98 - (void) menuAction:(id)sender; | |
99 | |
100 //event | |
101 - (void) keyDown: (NSEvent *) theEvent; | |
102 - (void) mouseMoved: (NSEvent *) theEvent; | |
103 - (void) mouseDown: (NSEvent *) theEvent; | |
104 - (void) mouseUp: (NSEvent *) theEvent; | |
105 - (void) rightMouseDown: (NSEvent *) theEvent; | |
106 - (void) rightMouseUp: (NSEvent *) theEvent; | |
107 - (void) otherMouseDown: (NSEvent *) theEvent; | |
108 - (void) otherMouseUp: (NSEvent *) theEvent; | |
109 - (void) scrollWheel: (NSEvent *) theEvent; | |
110 - (void) mouseEvent: (NSEvent *) theEvent; | |
111 - (void) check_events; | |
112 @end |