blob: 6feecabd07773304a94bc8c7361d8c05f66784e6 [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 "RTCWrappedNativeVideoEncoder.h"
Anders Carlsson7bca8ca2018-08-30 09:30:29 +020014#import "helpers/NSString+StdString.h"
Anders Carlsson7e042812017-10-05 16:55:38 +020015
16@implementation RTCWrappedNativeVideoEncoder {
17 std::unique_ptr<webrtc::VideoEncoder> _wrappedEncoder;
18}
19
20- (instancetype)initWithNativeEncoder:(std::unique_ptr<webrtc::VideoEncoder>)encoder {
21 if (self = [super init]) {
22 _wrappedEncoder = std::move(encoder);
23 }
24
25 return self;
26}
27
28- (std::unique_ptr<webrtc::VideoEncoder>)releaseWrappedEncoder {
29 return std::move(_wrappedEncoder);
30}
31
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020032#pragma mark - RTC_OBJC_TYPE(RTCVideoEncoder)
Anders Carlsson7e042812017-10-05 16:55:38 +020033
34- (void)setCallback:(RTCVideoEncoderCallback)callback {
35 RTC_NOTREACHED();
36}
37
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020038- (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings
Anders Carlsson7e042812017-10-05 16:55:38 +020039 numberOfCores:(int)numberOfCores {
40 RTC_NOTREACHED();
41 return 0;
42}
43
44- (NSInteger)releaseEncoder {
45 RTC_NOTREACHED();
46 return 0;
47}
48
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020049- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame
50 codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info
Anders Carlsson7e042812017-10-05 16:55:38 +020051 frameTypes:(NSArray<NSNumber *> *)frameTypes {
52 RTC_NOTREACHED();
53 return 0;
54}
55
56- (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate {
57 RTC_NOTREACHED();
58 return 0;
59}
60
61- (NSString *)implementationName {
62 RTC_NOTREACHED();
63 return nil;
64}
65
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020066- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings {
Anders Carlsson7e042812017-10-05 16:55:38 +020067 RTC_NOTREACHED();
68 return nil;
69}
70
71@end