1*d9f75844SAndroid Build Coastguard Worker /* 2*d9f75844SAndroid Build Coastguard Worker * Copyright 2017 The WebRTC project authors. All Rights Reserved. 3*d9f75844SAndroid Build Coastguard Worker * 4*d9f75844SAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license 5*d9f75844SAndroid Build Coastguard Worker * that can be found in the LICENSE file in the root of the source 6*d9f75844SAndroid Build Coastguard Worker * tree. An additional intellectual property rights grant can be found 7*d9f75844SAndroid Build Coastguard Worker * in the file PATENTS. All contributing project authors may 8*d9f75844SAndroid Build Coastguard Worker * be found in the AUTHORS file in the root of the source tree. 9*d9f75844SAndroid Build Coastguard Worker */ 10*d9f75844SAndroid Build Coastguard Worker 11*d9f75844SAndroid Build Coastguard Worker #import <Foundation/Foundation.h> 12*d9f75844SAndroid Build Coastguard Worker 13*d9f75844SAndroid Build Coastguard Worker #import "RTCMacros.h" 14*d9f75844SAndroid Build Coastguard Worker #import "RTCVideoCodecInfo.h" 15*d9f75844SAndroid Build Coastguard Worker #import "RTCVideoEncoder.h" 16*d9f75844SAndroid Build Coastguard Worker 17*d9f75844SAndroid Build Coastguard Worker NS_ASSUME_NONNULL_BEGIN 18*d9f75844SAndroid Build Coastguard Worker 19*d9f75844SAndroid Build Coastguard Worker /** RTCVideoEncoderFactory is an Objective-C version of 20*d9f75844SAndroid Build Coastguard Worker webrtc::VideoEncoderFactory::VideoEncoderSelector. 21*d9f75844SAndroid Build Coastguard Worker */ 22*d9f75844SAndroid Build Coastguard Worker RTC_OBJC_EXPORT 23*d9f75844SAndroid Build Coastguard Worker @protocol RTC_OBJC_TYPE 24*d9f75844SAndroid Build Coastguard Worker (RTCVideoEncoderSelector)<NSObject> 25*d9f75844SAndroid Build Coastguard Worker 26*d9f75844SAndroid Build Coastguard Worker - (void)registerCurrentEncoderInfo : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; 27*d9f75844SAndroid Build Coastguard Worker - (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBitrate:(NSInteger)bitrate; 28*d9f75844SAndroid Build Coastguard Worker - (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBrokenEncoder; 29*d9f75844SAndroid Build Coastguard Worker 30*d9f75844SAndroid Build Coastguard Worker @optional 31*d9f75844SAndroid Build Coastguard Worker - (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForResolutionChangeBySize:(CGSize)size; 32*d9f75844SAndroid Build Coastguard Worker 33*d9f75844SAndroid Build Coastguard Worker @end 34*d9f75844SAndroid Build Coastguard Worker 35*d9f75844SAndroid Build Coastguard Worker /** RTCVideoEncoderFactory is an Objective-C version of webrtc::VideoEncoderFactory. 36*d9f75844SAndroid Build Coastguard Worker */ 37*d9f75844SAndroid Build Coastguard Worker RTC_OBJC_EXPORT 38*d9f75844SAndroid Build Coastguard Worker @protocol RTC_OBJC_TYPE 39*d9f75844SAndroid Build Coastguard Worker (RTCVideoEncoderFactory)<NSObject> 40*d9f75844SAndroid Build Coastguard Worker 41*d9f75844SAndroid Build Coastguard Worker - (nullable id<RTC_OBJC_TYPE(RTCVideoEncoder)>)createEncoder 42*d9f75844SAndroid Build Coastguard Worker : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info; 43*d9f75844SAndroid Build Coastguard Worker - (NSArray<RTC_OBJC_TYPE(RTCVideoCodecInfo) *> *) 44*d9f75844SAndroid Build Coastguard Worker supportedCodecs; // TODO(andersc): "supportedFormats" instead? 45*d9f75844SAndroid Build Coastguard Worker 46*d9f75844SAndroid Build Coastguard Worker @optional 47*d9f75844SAndroid Build Coastguard Worker - (NSArray<RTC_OBJC_TYPE(RTCVideoCodecInfo) *> *)implementations; 48*d9f75844SAndroid Build Coastguard Worker - (nullable id<RTC_OBJC_TYPE(RTCVideoEncoderSelector)>)encoderSelector; 49*d9f75844SAndroid Build Coastguard Worker 50*d9f75844SAndroid Build Coastguard Worker @end 51*d9f75844SAndroid Build Coastguard Worker 52*d9f75844SAndroid Build Coastguard Worker NS_ASSUME_NONNULL_END 53