Anders Carlsson | 7e04281 | 2017-10-05 16:55:38 +0200 | [diff] [blame] | 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 "NSString+StdString.h" |
| 14 | #import "RTCWrappedNativeVideoDecoder.h" |
| 15 | |
| 16 | @implementation RTCWrappedNativeVideoDecoder { |
| 17 | std::unique_ptr<webrtc::VideoDecoder> _wrappedDecoder; |
| 18 | } |
| 19 | |
| 20 | - (instancetype)initWithNativeDecoder:(std::unique_ptr<webrtc::VideoDecoder>)decoder { |
| 21 | if (self = [super init]) { |
| 22 | _wrappedDecoder = std::move(decoder); |
| 23 | } |
| 24 | |
| 25 | return self; |
| 26 | } |
| 27 | |
| 28 | - (std::unique_ptr<webrtc::VideoDecoder>)releaseWrappedDecoder { |
| 29 | return std::move(_wrappedDecoder); |
| 30 | } |
| 31 | |
| 32 | #pragma mark - RTCVideoDecoder |
| 33 | |
| 34 | - (void)setCallback:(RTCVideoDecoderCallback)callback { |
| 35 | RTC_NOTREACHED(); |
| 36 | } |
| 37 | |
| 38 | - (NSInteger)startDecodeWithSettings:(RTCVideoEncoderSettings *)settings |
| 39 | numberOfCores:(int)numberOfCores { |
| 40 | RTC_NOTREACHED(); |
| 41 | return 0; |
| 42 | } |
| 43 | |
| 44 | - (NSInteger)releaseDecoder { |
| 45 | RTC_NOTREACHED(); |
| 46 | return 0; |
| 47 | } |
| 48 | |
| 49 | - (NSInteger)decode:(RTCEncodedImage *)encodedImage |
| 50 | missingFrames:(BOOL)missingFrames |
| 51 | fragmentationHeader:(RTCRtpFragmentationHeader *)fragmentationHeader |
Peter Hanspers | d9b64cd | 2018-01-12 16:16:18 +0100 | [diff] [blame] | 52 | codecSpecificInfo:(nullable id<RTCCodecSpecificInfo>)info |
Anders Carlsson | 7e04281 | 2017-10-05 16:55:38 +0200 | [diff] [blame] | 53 | renderTimeMs:(int64_t)renderTimeMs { |
| 54 | RTC_NOTREACHED(); |
| 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | - (NSString *)implementationName { |
| 59 | RTC_NOTREACHED(); |
| 60 | return nil; |
| 61 | } |
| 62 | |
| 63 | @end |