Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: webrtc/sdk/objc/Framework/Classes/VideoToolbox/RTCVideoDecoderH264.mm

Issue 3009383002: Enhance RTCUIApplicationStatusObserver thread safety. (Closed)
Patch Set: Rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 [RTCUIApplicationStatusObserver prepareForUse];
74 #endif
75 }
76
77 return self;
78 }
79
70 - (void)dealloc { 80 - (void)dealloc {
71 [self destroyDecompressionSession]; 81 [self destroyDecompressionSession];
72 [self setVideoFormat:nullptr]; 82 [self setVideoFormat:nullptr];
73 } 83 }
74 84
75 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings 85 - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings
76 numberOfCores:(int)numberOfCores { 86 numberOfCores:(int)numberOfCores {
77 return WEBRTC_VIDEO_CODEC_OK; 87 return WEBRTC_VIDEO_CODEC_OK;
78 } 88 }
79 89
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 if (_videoFormat) { 253 if (_videoFormat) {
244 CFRetain(_videoFormat); 254 CFRetain(_videoFormat);
245 } 255 }
246 } 256 }
247 257
248 - (NSString *)implementationName { 258 - (NSString *)implementationName {
249 return @"VideoToolbox"; 259 return @"VideoToolbox";
250 } 260 }
251 261
252 @end 262 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698