RTCRtpCodecCapability.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright 2023 LiveKit
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import <WebRTC/RTCMacros.h>
  18. typedef NS_ENUM(NSInteger, RTCRtpMediaType);
  19. NS_ASSUME_NONNULL_BEGIN
  20. RTC_OBJC_EXPORT
  21. @interface RTC_OBJC_TYPE (RTCRtpCodecCapability) : NSObject
  22. // Build MIME "type/subtype" string from `name` and `kind`.
  23. @property(nonatomic, readonly) NSString *mimeType;
  24. // Used to identify the codec. Equivalent to MIME subtype.
  25. @property(nonatomic, copy) NSString *name;
  26. // The media type of this codec. Equivalent to MIME top-level type.
  27. @property(nonatomic, assign) RTCRtpMediaType kind;
  28. // Clock rate in Hertz. If unset, the codec is applicable to any clock rate.
  29. @property(nonatomic, copy, nullable) NSNumber *clockRate;
  30. // Default payload type for this codec. Mainly needed for codecs that use
  31. // that have statically assigned payload types.
  32. @property(nonatomic, copy, nullable) NSNumber *preferredPayloadType;
  33. // The number of audio channels supported. Unused for video codecs.
  34. @property(nonatomic, copy, nullable) NSNumber *numChannels;
  35. // Codec-specific parameters that must be signaled to the remote party.
  36. //
  37. // Corresponds to "a=fmtp" parameters in SDP.
  38. //
  39. // Contrary to ORTC, these parameters are named using all lowercase strings.
  40. // This helps make the mapping to SDP simpler, if an application is using SDP.
  41. // Boolean values are represented by the string "1".
  42. // std::map<std::string, std::string> parameters;
  43. @property(nonatomic, copy) NSDictionary<NSString *, NSString *> *parameters;
  44. // Feedback mechanisms supported for this codec.
  45. // std::vector<RtcpFeedback> rtcp_feedback;
  46. // Not implemented.
  47. @end
  48. NS_ASSUME_NONNULL_END