mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Expose adaptive_ptime from iOS SDK.
Bug: None Change-Id: I48fd0937f51dc972b3eccd66f99ae80378e32fe1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214968 Commit-Queue: Yura Yaroshevich <yura.yaroshevich@gmail.com> Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33766}
This commit is contained in:
parent
7fa8d46516
commit
d46a174f0c
3 changed files with 12 additions and 0 deletions
|
@ -704,6 +704,11 @@ bool AudioEncoderOpusImpl::RecreateEncoderInstance(
|
|||
}
|
||||
|
||||
void AudioEncoderOpusImpl::SetFrameLength(int frame_length_ms) {
|
||||
if (next_frame_length_ms_ != frame_length_ms) {
|
||||
RTC_LOG(LS_VERBOSE) << "Update Opus frame length "
|
||||
<< "from " << next_frame_length_ms_ << " ms "
|
||||
<< "to " << frame_length_ms << " ms.";
|
||||
}
|
||||
next_frame_length_ms_ = frame_length_ms;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,10 @@ RTC_OBJC_EXPORT
|
|||
/** The relative DiffServ Code Point priority. */
|
||||
@property(nonatomic, assign) RTCPriority networkPriority;
|
||||
|
||||
/** Allow dynamic frame length changes for audio:
|
||||
https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-adaptiveptime */
|
||||
@property(nonatomic, assign) BOOL adaptiveAudioPacketTime;
|
||||
|
||||
- (instancetype)init;
|
||||
|
||||
@end
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
@synthesize ssrc = _ssrc;
|
||||
@synthesize bitratePriority = _bitratePriority;
|
||||
@synthesize networkPriority = _networkPriority;
|
||||
@synthesize adaptiveAudioPacketTime = _adaptiveAudioPacketTime;
|
||||
|
||||
- (instancetype)init {
|
||||
webrtc::RtpEncodingParameters nativeParameters;
|
||||
|
@ -61,6 +62,7 @@
|
|||
_bitratePriority = nativeParameters.bitrate_priority;
|
||||
_networkPriority = [RTC_OBJC_TYPE(RTCRtpEncodingParameters)
|
||||
priorityFromNativePriority:nativeParameters.network_priority];
|
||||
_adaptiveAudioPacketTime = nativeParameters.adaptive_ptime;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -93,6 +95,7 @@
|
|||
parameters.bitrate_priority = _bitratePriority;
|
||||
parameters.network_priority =
|
||||
[RTC_OBJC_TYPE(RTCRtpEncodingParameters) nativePriorityFromPriority:_networkPriority];
|
||||
parameters.adaptive_ptime = _adaptiveAudioPacketTime;
|
||||
return parameters;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue