Add support for turn logging id in ios sdk.
This patch adds support for setting the TURN_LOGGING_ID in RTCConfig using the ios SDK. TURN_LOGGING_ID was added to webrtc in https://webrtc-review.googlesource.com/c/src/+/149829 The intended usage of this attribute is to correlate client and backend logs. This change was tested out with duo via wireshark. Bug: webrtc:10897 Change-Id: Iedbefdc6392c4df203aca08cf750028b450a11ad Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191340 Reviewed-by: Anders Carlsson <andersc@webrtc.org> Commit-Queue: Brad Pugh <bradpugh@google.com> Cr-Commit-Position: refs/heads/master@{#32626}
This commit is contained in:
parent
97050115f0
commit
f24143d3b0
@ -204,6 +204,12 @@ RTC_OBJC_EXPORT
|
||||
*/
|
||||
@property(nonatomic, nullable) RTC_OBJC_TYPE(RTCCryptoOptions) * cryptoOptions;
|
||||
|
||||
/**
|
||||
* An optional string that will be attached to the TURN_ALLOCATE_REQUEST which
|
||||
* which can be used to correlate client logs with backend logs.
|
||||
*/
|
||||
@property(nonatomic, nullable, copy) NSString *turnLoggingId;
|
||||
|
||||
/**
|
||||
* Time interval between audio RTCP reports.
|
||||
*/
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
@synthesize activeResetSrtpParams = _activeResetSrtpParams;
|
||||
@synthesize allowCodecSwitching = _allowCodecSwitching;
|
||||
@synthesize cryptoOptions = _cryptoOptions;
|
||||
@synthesize turnLoggingId = _turnLoggingId;
|
||||
@synthesize rtcpAudioReportIntervalMs = _rtcpAudioReportIntervalMs;
|
||||
@synthesize rtcpVideoReportIntervalMs = _rtcpVideoReportIntervalMs;
|
||||
|
||||
@ -129,6 +130,7 @@
|
||||
sframeRequireFrameEncryption:config.crypto_options->sframe
|
||||
.require_frame_encryption];
|
||||
}
|
||||
_turnLoggingId = [NSString stringWithUTF8String:config.turn_logging_id.c_str()];
|
||||
_rtcpAudioReportIntervalMs = config.audio_rtcp_report_interval_ms();
|
||||
_rtcpVideoReportIntervalMs = config.video_rtcp_report_interval_ms();
|
||||
_allowCodecSwitching = config.allow_codec_switching.value_or(false);
|
||||
@ -258,6 +260,7 @@
|
||||
_cryptoOptions.sframeRequireFrameEncryption ? true : false;
|
||||
nativeConfig->crypto_options = absl::optional<webrtc::CryptoOptions>(nativeCryptoOptions);
|
||||
}
|
||||
nativeConfig->turn_logging_id = [_turnLoggingId UTF8String];
|
||||
nativeConfig->set_audio_rtcp_report_interval_ms(_rtcpAudioReportIntervalMs);
|
||||
nativeConfig->set_video_rtcp_report_interval_ms(_rtcpVideoReportIntervalMs);
|
||||
nativeConfig->allow_codec_switching = _allowCodecSwitching;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user