RTCVideoEncoderFactory.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #import <Foundation/Foundation.h>
  11. #import "RTCMacros.h"
  12. #import "RTCVideoCodecInfo.h"
  13. #import "RTCVideoEncoder.h"
  14. NS_ASSUME_NONNULL_BEGIN
  15. /** RTCVideoEncoderFactory is an Objective-C version of
  16. webrtc::VideoEncoderFactory::VideoEncoderSelector.
  17. */
  18. RTC_OBJC_EXPORT
  19. @protocol RTC_OBJC_TYPE
  20. (RTCVideoEncoderSelector)<NSObject>
  21. - (void)registerCurrentEncoderInfo : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info;
  22. - (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBitrate:(NSInteger)bitrate;
  23. - (nullable RTC_OBJC_TYPE(RTCVideoCodecInfo) *)encoderForBrokenEncoder;
  24. @end
  25. /** RTCVideoEncoderFactory is an Objective-C version of webrtc::VideoEncoderFactory.
  26. */
  27. RTC_OBJC_EXPORT
  28. @protocol RTC_OBJC_TYPE
  29. (RTCVideoEncoderFactory)<NSObject>
  30. - (nullable id<RTC_OBJC_TYPE(RTCVideoEncoder)>)createEncoder
  31. : (RTC_OBJC_TYPE(RTCVideoCodecInfo) *)info;
  32. - (NSArray<RTC_OBJC_TYPE(RTCVideoCodecInfo) *> *)
  33. supportedCodecs; // TODO(andersc): "supportedFormats" instead?
  34. @optional
  35. - (NSArray<RTC_OBJC_TYPE(RTCVideoCodecInfo) *> *)implementations;
  36. - (nullable id<RTC_OBJC_TYPE(RTCVideoEncoderSelector)>)encoderSelector;
  37. @end
  38. NS_ASSUME_NONNULL_END