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 #define DEFAULT_CAPTURE_DEVICE_INDEX 1 | 11 #define DEFAULT_CAPTURE_DEVICE_INDEX 1 |
12 #define DEFAULT_FRAME_RATE 30 | 12 #define DEFAULT_FRAME_RATE 30 |
13 #define DEFAULT_FRAME_WIDTH 352 | 13 #define DEFAULT_FRAME_WIDTH 352 |
14 #define DEFAULT_FRAME_HEIGHT 288 | 14 #define DEFAULT_FRAME_HEIGHT 288 |
15 #define ROTATE_CAPTURED_FRAME 1 | 15 #define ROTATE_CAPTURED_FRAME 1 |
16 #define LOW_QUALITY 1 | 16 #define LOW_QUALITY 1 |
17 | 17 |
18 #import "webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_objc.h" | 18 #import "webrtc/modules/video_capture/mac/qtkit/video_capture_qtkit_objc.h" |
19 | 19 |
20 #include "webrtc/system_wrappers/include/trace.h" | 20 #include "webrtc/system_wrappers/include/trace.h" |
21 | 21 |
22 using namespace webrtc; | 22 using namespace webrtc; |
23 using namespace videocapturemodule; | 23 using namespace videocapturemodule; |
24 | 24 |
25 @implementation VideoCaptureMacQTKitObjC | 25 @implementation VideoCaptureMacQTKitObjC |
26 | 26 |
| 27 // TODO(hjon): Update deprecated APIs (see webrtc:5478 for details). |
| 28 #pragma clang diagnostic push |
| 29 #pragma clang diagnostic ignored "-Wdeprecated" |
27 -(id)init { | 30 -(id)init { |
28 self = [super init]; | 31 self = [super init]; |
29 if (self) { | 32 if (self) { |
30 [self initializeVariables]; | 33 [self initializeVariables]; |
31 } | 34 } |
32 return self; | 35 return self; |
33 } | 36 } |
34 | 37 |
35 - (void)dealloc { | 38 - (void)dealloc { |
36 if (_captureSession) | 39 if (_captureSession) |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 tempCaptureCapability.rawType = kVideoBGRA; | 252 tempCaptureCapability.rawType = kVideoBGRA; |
250 | 253 |
251 _owner->IncomingFrame((unsigned char*)baseAddress, frameSize, | 254 _owner->IncomingFrame((unsigned char*)baseAddress, frameSize, |
252 tempCaptureCapability, 0); | 255 tempCaptureCapability, 0); |
253 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags); | 256 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags); |
254 } | 257 } |
255 [_lock unlock]; | 258 [_lock unlock]; |
256 _framesDelivered++; | 259 _framesDelivered++; |
257 _framesRendered++; | 260 _framesRendered++; |
258 } | 261 } |
| 262 #pragma clang diagnostic pop |
259 | 263 |
260 @end | 264 @end |
OLD | NEW |