diff options
Diffstat (limited to 'third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm')
-rw-r--r-- | third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm b/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm index ae1cf79864..eb0ad96738 100644 --- a/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm +++ b/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCRtpTransceiver.mm @@ -10,6 +10,7 @@ #import "RTCRtpTransceiver+Private.h" +#import "RTCRtpCodecCapability+Private.h" #import "RTCRtpEncodingParameters+Private.h" #import "RTCRtpParameters+Private.h" #import "RTCRtpReceiver+Private.h" @@ -17,6 +18,8 @@ #import "base/RTCLogging.h" #import "helpers/NSString+StdString.h" +#include "api/rtp_parameters.h" + NSString *const kRTCRtpTransceiverErrorDomain = @"org.webrtc.RTCRtpTranceiver"; @implementation RTC_OBJC_TYPE (RTCRtpTransceiverInit) @@ -105,6 +108,14 @@ NSString *const kRTCRtpTransceiverErrorDomain = @"org.webrtc.RTCRtpTranceiver"; _nativeRtpTransceiver->StopInternal(); } +- (void)setCodecPreferences:(NSArray<RTC_OBJC_TYPE(RTCRtpCodecCapability) *> *)codecs { + std::vector<webrtc::RtpCodecCapability> codecCapabilities; + for (RTC_OBJC_TYPE(RTCRtpCodecCapability) * rtpCodecCapability in codecs) { + codecCapabilities.push_back(rtpCodecCapability.nativeRtpCodecCapability); + } + _nativeRtpTransceiver->SetCodecPreferences(codecCapabilities); +} + - (NSString *)description { return [NSString stringWithFormat:@"RTC_OBJC_TYPE(RTCRtpTransceiver) {\n sender: %@\n receiver: %@\n}", |