RTCRtpCodecParameters.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright 2016 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. NS_ASSUME_NONNULL_BEGIN
  13. RTC_EXTERN const NSString *const kRTCRtxCodecName;
  14. RTC_EXTERN const NSString *const kRTCRedCodecName;
  15. RTC_EXTERN const NSString *const kRTCUlpfecCodecName;
  16. RTC_EXTERN const NSString *const kRTCFlexfecCodecName;
  17. RTC_EXTERN const NSString *const kRTCOpusCodecName;
  18. RTC_EXTERN const NSString *const kRTCIsacCodecName;
  19. RTC_EXTERN const NSString *const kRTCL16CodecName;
  20. RTC_EXTERN const NSString *const kRTCG722CodecName;
  21. RTC_EXTERN const NSString *const kRTCIlbcCodecName;
  22. RTC_EXTERN const NSString *const kRTCPcmuCodecName;
  23. RTC_EXTERN const NSString *const kRTCPcmaCodecName;
  24. RTC_EXTERN const NSString *const kRTCDtmfCodecName;
  25. RTC_EXTERN const NSString *const kRTCComfortNoiseCodecName;
  26. RTC_EXTERN const NSString *const kRTCVp8CodecName;
  27. RTC_EXTERN const NSString *const kRTCVp9CodecName;
  28. RTC_EXTERN const NSString *const kRTCH264CodecName;
  29. /** Defined in http://w3c.github.io/webrtc-pc/#idl-def-RTC_OBJC_TYPE(RTCRtpCodecParameters) */
  30. RTC_OBJC_EXPORT
  31. @interface RTC_OBJC_TYPE (RTCRtpCodecParameters) : NSObject
  32. /** The RTP payload type. */
  33. @property(nonatomic, assign) int payloadType;
  34. /**
  35. * The codec MIME subtype. Valid types are listed in:
  36. * http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-2
  37. *
  38. * Several supported types are represented by the constants above.
  39. */
  40. @property(nonatomic, readonly, nonnull) NSString *name;
  41. /**
  42. * The media type of this codec. Equivalent to MIME top-level type.
  43. *
  44. * Valid values are kRTCMediaStreamTrackKindAudio and
  45. * kRTCMediaStreamTrackKindVideo.
  46. */
  47. @property(nonatomic, readonly, nonnull) NSString *kind;
  48. /** The codec clock rate expressed in Hertz. */
  49. @property(nonatomic, readonly, nullable) NSNumber *clockRate;
  50. /**
  51. * The number of channels (mono=1, stereo=2).
  52. * Set to null for video codecs.
  53. **/
  54. @property(nonatomic, readonly, nullable) NSNumber *numChannels;
  55. /** The "format specific parameters" field from the "a=fmtp" line in the SDP */
  56. @property(nonatomic, readonly, nonnull) NSDictionary *parameters;
  57. - (instancetype)init NS_DESIGNATED_INITIALIZER;
  58. @end
  59. NS_ASSUME_NONNULL_END