Add allowCodecSwitching flag to RTCConfiguration.mm

Bug: webrtc:10795
Change-Id: I4d645b077bc459b05ef16641defdbd240dbd1550
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159481
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29753}
This commit is contained in:
philipel
2019-11-11 12:57:44 +01:00
committed by Commit Bot
parent d4f54e1f5e
commit 3eb84f0bf9
2 changed files with 9 additions and 0 deletions

View File

@ -194,6 +194,12 @@ RTC_OBJC_EXPORT
*/ */
@property(nonatomic, assign) BOOL activeResetSrtpParams; @property(nonatomic, assign) BOOL activeResetSrtpParams;
/** If the remote side support mid-stream codec switches then allow encoder
* switching to be performed.
*/
@property(nonatomic, assign) BOOL allowCodecSwitching;
/** /**
* If MediaTransportFactory is provided in PeerConnectionFactory, this flag informs PeerConnection * If MediaTransportFactory is provided in PeerConnectionFactory, this flag informs PeerConnection
* that it should use the MediaTransportInterface. * that it should use the MediaTransportInterface.

View File

@ -52,6 +52,7 @@
@synthesize sdpSemantics = _sdpSemantics; @synthesize sdpSemantics = _sdpSemantics;
@synthesize turnCustomizer = _turnCustomizer; @synthesize turnCustomizer = _turnCustomizer;
@synthesize activeResetSrtpParams = _activeResetSrtpParams; @synthesize activeResetSrtpParams = _activeResetSrtpParams;
@synthesize allowCodecSwitching = _allowCodecSwitching;
@synthesize useMediaTransport = _useMediaTransport; @synthesize useMediaTransport = _useMediaTransport;
@synthesize useMediaTransportForDataChannels = _useMediaTransportForDataChannels; @synthesize useMediaTransportForDataChannels = _useMediaTransportForDataChannels;
@synthesize cryptoOptions = _cryptoOptions; @synthesize cryptoOptions = _cryptoOptions;
@ -138,6 +139,7 @@
} }
_rtcpAudioReportIntervalMs = config.audio_rtcp_report_interval_ms(); _rtcpAudioReportIntervalMs = config.audio_rtcp_report_interval_ms();
_rtcpVideoReportIntervalMs = config.video_rtcp_report_interval_ms(); _rtcpVideoReportIntervalMs = config.video_rtcp_report_interval_ms();
_allowCodecSwitching = config.allow_codec_switching.value_or(false);
} }
return self; return self;
} }
@ -274,6 +276,7 @@
} }
nativeConfig->set_audio_rtcp_report_interval_ms(_rtcpAudioReportIntervalMs); nativeConfig->set_audio_rtcp_report_interval_ms(_rtcpAudioReportIntervalMs);
nativeConfig->set_video_rtcp_report_interval_ms(_rtcpVideoReportIntervalMs); nativeConfig->set_video_rtcp_report_interval_ms(_rtcpVideoReportIntervalMs);
nativeConfig->allow_codec_switching = _allowCodecSwitching;
return nativeConfig.release(); return nativeConfig.release();
} }