OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 decodeParams->callback(decodedFrame); | 60 decodeParams->callback(decodedFrame); |
61 } | 61 } |
62 | 62 |
63 // Decoder. | 63 // Decoder. |
64 @implementation RTCVideoDecoderH264 { | 64 @implementation RTCVideoDecoderH264 { |
65 CMVideoFormatDescriptionRef _videoFormat; | 65 CMVideoFormatDescriptionRef _videoFormat; |
66 VTDecompressionSessionRef _decompressionSession; | 66 VTDecompressionSessionRef _decompressionSession; |
67 RTCVideoDecoderCallback _callback; | 67 RTCVideoDecoderCallback _callback; |
68 } | 68 } |
69 | 69 |
| 70 - (instancetype)init { |
| 71 if (self = [super init]) { |
| 72 #if defined(WEBRTC_IOS) |
| 73 __unused RTCUIApplicationStatusObserver *observer = |
| 74 [RTCUIApplicationStatusObserver sharedInstance]; |
| 75 #endif |
| 76 } |
| 77 |
| 78 return self; |
| 79 } |
| 80 |
70 - (void)dealloc { | 81 - (void)dealloc { |
71 [self destroyDecompressionSession]; | 82 [self destroyDecompressionSession]; |
72 [self setVideoFormat:nullptr]; | 83 [self setVideoFormat:nullptr]; |
73 } | 84 } |
74 | 85 |
75 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings | 86 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings |
76 numberOfCores:(int)numberOfCores { | 87 numberOfCores:(int)numberOfCores { |
77 return WEBRTC_VIDEO_CODEC_OK; | 88 return WEBRTC_VIDEO_CODEC_OK; |
78 } | 89 } |
79 | 90 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 if (_videoFormat) { | 254 if (_videoFormat) { |
244 CFRetain(_videoFormat); | 255 CFRetain(_videoFormat); |
245 } | 256 } |
246 } | 257 } |
247 | 258 |
248 - (NSString *)implementationName { | 259 - (NSString *)implementationName { |
249 return @"VideoToolbox"; | 260 return @"VideoToolbox"; |
250 } | 261 } |
251 | 262 |
252 @end | 263 @end |
OLD | NEW |