blob: 48d09cf396ac71cda978dbbe6bdb09a58c05192e [file] [log] [blame]
Anders Carlsson7e042812017-10-05 16:55:38 +02001/*
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
Anders Carlsson7e042812017-10-05 16:55:38 +020013#import "RTCWrappedNativeVideoDecoder.h"
Mirko Bonadei59230832020-08-24 22:08:52 +020014#import "base/RTCMacros.h"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020015#import "helpers/NSString+StdString.h"
Anders Carlsson7e042812017-10-05 16:55:38 +020016
Mirko Bonadei59230832020-08-24 22:08:52 +020017@implementation RTC_OBJC_TYPE (RTCWrappedNativeVideoDecoder) {
Anders Carlsson7e042812017-10-05 16:55:38 +020018 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
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020033#pragma mark - RTC_OBJC_TYPE(RTCVideoDecoder)
Anders Carlsson7e042812017-10-05 16:55:38 +020034
35- (void)setCallback:(RTCVideoDecoderCallback)callback {
36 RTC_NOTREACHED();
37}
38
Anders Carlsson2a1bbc32018-04-04 12:49:43 +020039- (NSInteger)startDecodeWithNumberOfCores:(int)numberOfCores {
40 RTC_NOTREACHED();
41 return 0;
42}
43
Anders Carlsson7e042812017-10-05 16:55:38 +020044- (NSInteger)releaseDecoder {
45 RTC_NOTREACHED();
46 return 0;
47}
48
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020049- (NSInteger)decode:(RTC_OBJC_TYPE(RTCEncodedImage) *)encodedImage
Niels Möllerc199fae2018-04-26 09:54:25 +020050 missingFrames:(BOOL)missingFrames
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020051 codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info
Niels Möllerc199fae2018-04-26 09:54:25 +020052 renderTimeMs:(int64_t)renderTimeMs {
53 RTC_NOTREACHED();
54 return 0;
55}
56
Anders Carlsson7e042812017-10-05 16:55:38 +020057- (NSString *)implementationName {
58 RTC_NOTREACHED();
59 return nil;
60}
61
62@end