OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/engine_configurations.h" | 11 #include "webrtc/engine_configurations.h" |
12 #if defined(COCOA_RENDERING) | 12 #if defined(COCOA_RENDERING) |
13 | 13 |
14 #ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ | 14 #ifndef WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ |
15 #define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ | 15 #define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ |
16 | 16 |
17 #import <Cocoa/Cocoa.h> | 17 #import <Cocoa/Cocoa.h> |
18 #import <OpenGL/OpenGL.h> | 18 #import <OpenGL/OpenGL.h> |
19 #import <OpenGL/glext.h> | 19 #import <OpenGL/glext.h> |
20 #import <OpenGL/glu.h> | 20 #import <OpenGL/glu.h> |
21 #include <QuickTime/QuickTime.h> | 21 #include <QuickTime/QuickTime.h> |
22 #include <list> | 22 #include <list> |
23 #include <map> | 23 #include <map> |
| 24 #include <memory> |
24 | 25 |
25 #include "webrtc/base/thread_annotations.h" | 26 #include "webrtc/base/thread_annotations.h" |
26 #include "webrtc/modules/video_render/video_render_defines.h" | 27 #include "webrtc/modules/video_render/video_render_defines.h" |
27 | 28 |
28 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h" | 29 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h" |
29 #import "webrtc/modules/video_render/mac/cocoa_render_view.h" | 30 #import "webrtc/modules/video_render/mac/cocoa_render_view.h" |
30 | 31 |
31 class Trace; | 32 class Trace; |
32 | 33 |
33 namespace rtc { | 34 namespace rtc { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 int RenderOffScreenBuffers(); | 163 int RenderOffScreenBuffers(); |
163 int DisplayBuffers(); | 164 int DisplayBuffers(); |
164 | 165 |
165 private: // variables | 166 private: // variables |
166 | 167 |
167 | 168 |
168 CocoaRenderView* _windowRef; | 169 CocoaRenderView* _windowRef; |
169 bool _fullScreen; | 170 bool _fullScreen; |
170 int _id; | 171 int _id; |
171 CriticalSectionWrapper& _nsglContextCritSec; | 172 CriticalSectionWrapper& _nsglContextCritSec; |
172 // TODO(pbos): Remove scoped_ptr and use PlatformThread directly. | 173 // TODO(pbos): Remove unique_ptr and use PlatformThread directly. |
173 rtc::scoped_ptr<rtc::PlatformThread> _screenUpdateThread; | 174 std::unique_ptr<rtc::PlatformThread> _screenUpdateThread; |
174 EventTimerWrapper* _screenUpdateEvent; | 175 EventTimerWrapper* _screenUpdateEvent; |
175 NSOpenGLContext* _nsglContext; | 176 NSOpenGLContext* _nsglContext; |
176 NSOpenGLContext* _nsglFullScreenContext; | 177 NSOpenGLContext* _nsglFullScreenContext; |
177 CocoaFullScreenWindow* _fullScreenWindow; | 178 CocoaFullScreenWindow* _fullScreenWindow; |
178 Rect _windowRect; // The size of the window | 179 Rect _windowRect; // The size of the window |
179 int _windowWidth; | 180 int _windowWidth; |
180 int _windowHeight; | 181 int _windowHeight; |
181 std::map<int, VideoChannelNSOpenGL*> _nsglChannels; | 182 std::map<int, VideoChannelNSOpenGL*> _nsglChannels; |
182 std::multimap<int, int> _zOrderToChannel; | 183 std::multimap<int, int> _zOrderToChannel; |
183 bool _renderingIsPaused; | 184 bool _renderingIsPaused; |
184 NSView* _windowRefSuperView; | 185 NSView* _windowRefSuperView; |
185 NSRect _windowRefSuperViewFrame; | 186 NSRect _windowRefSuperViewFrame; |
186 }; | 187 }; |
187 | 188 |
188 } // namespace webrtc | 189 } // namespace webrtc |
189 | 190 |
190 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ | 191 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ |
191 #endif // COCOA_RENDERING | 192 #endif // COCOA_RENDERING |
OLD | NEW |