blob: ea2a4593600452c7f2e50cc8a139bef701514d06 [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"
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 (RTCWrappedNativeVideoEncoder) {
Anders Carlsson7e042812017-10-05 16:55:38 +020018 std::unique_ptr<webrtc::VideoEncoder> _wrappedEncoder;
19}
20
21- (instancetype)initWithNativeEncoder:(std::unique_ptr<webrtc::VideoEncoder>)encoder {
22 if (self = [super init]) {
23 _wrappedEncoder = std::move(encoder);
24 }
25
26 return self;
27}
28
29- (std::unique_ptr<webrtc::VideoEncoder>)releaseWrappedEncoder {
30 return std::move(_wrappedEncoder);
31}
32
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020033#pragma mark - RTC_OBJC_TYPE(RTCVideoEncoder)
Anders Carlsson7e042812017-10-05 16:55:38 +020034
35- (void)setCallback:(RTCVideoEncoderCallback)callback {
36 RTC_NOTREACHED();
37}
38
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020039- (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings
Anders Carlsson7e042812017-10-05 16:55:38 +020040 numberOfCores:(int)numberOfCores {
41 RTC_NOTREACHED();
42 return 0;
43}
44
45- (NSInteger)releaseEncoder {
46 RTC_NOTREACHED();
47 return 0;
48}
49
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020050- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame
51 codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info
Anders Carlsson7e042812017-10-05 16:55:38 +020052 frameTypes:(NSArray<NSNumber *> *)frameTypes {
53 RTC_NOTREACHED();
54 return 0;
55}
56
57- (int)setBitrate:(uint32_t)bitrateKbit framerate:(uint32_t)framerate {
58 RTC_NOTREACHED();
59 return 0;
60}
61
62- (NSString *)implementationName {
63 RTC_NOTREACHED();
64 return nil;
65}
66
Mirko Bonadeia81e9c82020-05-04 16:14:32 +020067- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings {
Anders Carlsson7e042812017-10-05 16:55:38 +020068 RTC_NOTREACHED();
69 return nil;
70}
71
Peter Hanspers5981bf22021-06-01 07:31:00 +020072- (NSInteger)resolutionAlignment {
73 RTC_NOTREACHED();
74 return 1;
75}
76
77- (BOOL)applyAlignmentToAllSimulcastLayers {
78 RTC_NOTREACHED();
79 return NO;
80}
81
Anders Carlsson7e042812017-10-05 16:55:38 +020082@end