1 /* 2 * Copyright 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 #ifndef SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_ENCODER_FACTORY_H_ 12 #define SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_ENCODER_FACTORY_H_ 13 14 #import <Foundation/Foundation.h> 15 16 #import "base/RTCMacros.h" 17 18 #include "api/video_codecs/video_encoder_factory.h" 19 20 @protocol RTC_OBJC_TYPE 21 (RTCVideoEncoderFactory); 22 23 namespace webrtc { 24 25 class ObjCVideoEncoderFactory : public VideoEncoderFactory { 26 public: 27 explicit ObjCVideoEncoderFactory(id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)>); 28 ~ObjCVideoEncoderFactory() override; 29 30 id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)> wrapped_encoder_factory() const; 31 32 std::vector<SdpVideoFormat> GetSupportedFormats() const override; 33 std::vector<SdpVideoFormat> GetImplementations() const override; 34 std::unique_ptr<VideoEncoder> CreateVideoEncoder( 35 const SdpVideoFormat& format) override; 36 CodecInfo QueryVideoEncoder(const SdpVideoFormat& format) const override; 37 std::unique_ptr<EncoderSelectorInterface> GetEncoderSelector() const override; 38 39 private: 40 id<RTC_OBJC_TYPE(RTCVideoEncoderFactory)> encoder_factory_; 41 }; 42 43 } // namespace webrtc 44 45 #endif // SDK_OBJC_NATIVE_SRC_OBJC_VIDEO_ENCODER_FACTORY_H_ 46