• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "RTCWrappedNativeVideoEncoder.h"
14#import "helpers/NSString+StdString.h"
15
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
32#pragma mark - RTC_OBJC_TYPE(RTCVideoEncoder)
33
34- (void)setCallback:(RTCVideoEncoderCallback)callback {
35  RTC_NOTREACHED();
36}
37
38- (NSInteger)startEncodeWithSettings:(RTC_OBJC_TYPE(RTCVideoEncoderSettings) *)settings
39                       numberOfCores:(int)numberOfCores {
40  RTC_NOTREACHED();
41  return 0;
42}
43
44- (NSInteger)releaseEncoder {
45  RTC_NOTREACHED();
46  return 0;
47}
48
49- (NSInteger)encode:(RTC_OBJC_TYPE(RTCVideoFrame) *)frame
50    codecSpecificInfo:(nullable id<RTC_OBJC_TYPE(RTCCodecSpecificInfo)>)info
51           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
66- (nullable RTC_OBJC_TYPE(RTCVideoEncoderQpThresholds) *)scalingSettings {
67  RTC_NOTREACHED();
68  return nil;
69}
70
71@end
72