1/* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11#import <Foundation/Foundation.h> 12 13#import "RTCWrappedNativeVideoDecoder.h" 14#import "base/RTCMacros.h" 15#import "helpers/NSString+StdString.h" 16 17@implementation RTC_OBJC_TYPE (RTCWrappedNativeVideoDecoder) { 18 std::unique_ptr<webrtc::VideoDecoder> _wrappedDecoder; 19} 20 21- (instancetype)initWithNativeDecoder:(std::unique_ptr<webrtc::VideoDecoder>)decoder { 22 if (self = [super init]) { 23 _wrappedDecoder = std::move(decoder); 24 } 25 26 return self; 27} 28 29- (std::unique_ptr<webrtc::VideoDecoder>)releaseWrappedDecoder { 30 return std::move(_wrappedDecoder); 31} 32 33#pragma mark - RTC_OBJC_TYPE(RTCVideoDecoder) 34 35- (void)setCallback:(RTCVideoDecoderCallback)callback { 36 RTC_DCHECK_NOTREACHED(); 37} 38 39- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores { 40 RTC_DCHECK_NOTREACHED(); 41 return 0; 42} 43 44- (NSInteger)releaseDecoder { 45 RTC_DCHECK_NOTREACHED(); 46 return 0; 47} 48 49- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage 50 missingFrames:(BOOL)missingFrames 51 codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info 52 renderTimeMs:(int64_t)renderTimeMs { 53 RTC_DCHECK_NOTREACHED(); 54 return 0; 55} 56 57- (NSString *)implementationName { 58 RTC_DCHECK_NOTREACHED(); 59 return nil; 60} 61 62@end 63