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 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "webrtc/base/thread_annotations.h" | 25 #include "webrtc/base/thread_annotations.h" |
26 #include "webrtc/modules/video_render/video_render_defines.h" | 26 #include "webrtc/modules/video_render/video_render_defines.h" |
27 | 27 |
28 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h" | 28 #import "webrtc/modules/video_render/mac/cocoa_full_screen_window.h" |
29 #import "webrtc/modules/video_render/mac/cocoa_render_view.h" | 29 #import "webrtc/modules/video_render/mac/cocoa_render_view.h" |
30 | 30 |
31 class Trace; | 31 class Trace; |
32 | 32 |
33 namespace webrtc { | 33 namespace webrtc { |
34 class EventTimerWrapper; | 34 class EventTimerWrapper; |
35 class ThreadWrapper; | 35 class PlatformThread; |
36 class VideoRenderNSOpenGL; | 36 class VideoRenderNSOpenGL; |
37 class CriticalSectionWrapper; | 37 class CriticalSectionWrapper; |
38 | 38 |
39 class VideoChannelNSOpenGL : public VideoRenderCallback { | 39 class VideoChannelNSOpenGL : public VideoRenderCallback { |
40 public: | 40 public: |
41 VideoChannelNSOpenGL(NSOpenGLContext *nsglContext, int iId, VideoRenderNSOpe
nGL* owner); | 41 VideoChannelNSOpenGL(NSOpenGLContext *nsglContext, int iId, VideoRenderNSOpe
nGL* owner); |
42 virtual ~VideoChannelNSOpenGL(); | 42 virtual ~VideoChannelNSOpenGL(); |
43 | 43 |
44 // A new frame is delivered | 44 // A new frame is delivered |
45 virtual int DeliverFrame(const VideoFrame& videoFrame); | 45 virtual int DeliverFrame(const VideoFrame& videoFrame); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 int RenderOffScreenBuffers(); | 159 int RenderOffScreenBuffers(); |
160 int DisplayBuffers(); | 160 int DisplayBuffers(); |
161 | 161 |
162 private: // variables | 162 private: // variables |
163 | 163 |
164 | 164 |
165 CocoaRenderView* _windowRef; | 165 CocoaRenderView* _windowRef; |
166 bool _fullScreen; | 166 bool _fullScreen; |
167 int _id; | 167 int _id; |
168 CriticalSectionWrapper& _nsglContextCritSec; | 168 CriticalSectionWrapper& _nsglContextCritSec; |
169 rtc::scoped_ptr<ThreadWrapper> _screenUpdateThread; | 169 rtc::scoped_ptr<PlatformThread> _screenUpdateThread; |
170 EventTimerWrapper* _screenUpdateEvent; | 170 EventTimerWrapper* _screenUpdateEvent; |
171 NSOpenGLContext* _nsglContext; | 171 NSOpenGLContext* _nsglContext; |
172 NSOpenGLContext* _nsglFullScreenContext; | 172 NSOpenGLContext* _nsglFullScreenContext; |
173 CocoaFullScreenWindow* _fullScreenWindow; | 173 CocoaFullScreenWindow* _fullScreenWindow; |
174 Rect _windowRect; // The size of the window | 174 Rect _windowRect; // The size of the window |
175 int _windowWidth; | 175 int _windowWidth; |
176 int _windowHeight; | 176 int _windowHeight; |
177 std::map<int, VideoChannelNSOpenGL*> _nsglChannels; | 177 std::map<int, VideoChannelNSOpenGL*> _nsglChannels; |
178 std::multimap<int, int> _zOrderToChannel; | 178 std::multimap<int, int> _zOrderToChannel; |
179 bool _renderingIsPaused; | 179 bool _renderingIsPaused; |
180 NSView* _windowRefSuperView; | 180 NSView* _windowRefSuperView; |
181 NSRect _windowRefSuperViewFrame; | 181 NSRect _windowRefSuperViewFrame; |
182 }; | 182 }; |
183 | 183 |
184 } // namespace webrtc | 184 } // namespace webrtc |
185 | 185 |
186 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ | 186 #endif // WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_MAC_VIDEO_RENDER_NSOPENGL_H_ |
187 #endif // COCOA_RENDERING | 187 #endif // COCOA_RENDERING |
OLD | NEW |