Enable setting the maximum bitrate limit in RtpSender.
This change allows the application to limit the bitrate of the outgoing audio and video streams at runtime. The API roughly follows the WebRTC API draft, defining the RTCRtpParameters structure witn exactly one encoding (simulcast streams are not exposed in the API for now). (https://www.w3.org/TR/webrtc/#idl-def-RTCRtpParameters) BUG= Review URL: https://codereview.webrtc.org/1788583004 Cr-Commit-Position: refs/heads/master@{#12025}
This commit is contained in:
@ -1244,6 +1244,23 @@ void WebRtcSession::SetRawAudioSink(uint32_t ssrc,
|
||||
voice_channel_->SetRawAudioSink(ssrc, rtc::ScopedToUnique(std::move(sink)));
|
||||
}
|
||||
|
||||
RtpParameters WebRtcSession::GetAudioRtpParameters(uint32_t ssrc) const {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
if (voice_channel_) {
|
||||
return voice_channel_->GetRtpParameters(ssrc);
|
||||
}
|
||||
return RtpParameters();
|
||||
}
|
||||
|
||||
bool WebRtcSession::SetAudioRtpParameters(uint32_t ssrc,
|
||||
const RtpParameters& parameters) {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
if (!voice_channel_) {
|
||||
return false;
|
||||
}
|
||||
return voice_channel_->SetRtpParameters(ssrc, parameters);
|
||||
}
|
||||
|
||||
bool WebRtcSession::SetCaptureDevice(uint32_t ssrc,
|
||||
cricket::VideoCapturer* camera) {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
@ -1297,6 +1314,23 @@ void WebRtcSession::SetVideoSend(uint32_t ssrc,
|
||||
}
|
||||
}
|
||||
|
||||
RtpParameters WebRtcSession::GetVideoRtpParameters(uint32_t ssrc) const {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
if (video_channel_) {
|
||||
return video_channel_->GetRtpParameters(ssrc);
|
||||
}
|
||||
return RtpParameters();
|
||||
}
|
||||
|
||||
bool WebRtcSession::SetVideoRtpParameters(uint32_t ssrc,
|
||||
const RtpParameters& parameters) {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
if (!video_channel_) {
|
||||
return false;
|
||||
}
|
||||
return video_channel_->SetRtpParameters(ssrc, parameters);
|
||||
}
|
||||
|
||||
bool WebRtcSession::CanInsertDtmf(const std::string& track_id) {
|
||||
ASSERT(signaling_thread()->IsCurrent());
|
||||
if (!voice_channel_) {
|
||||
|
||||
Reference in New Issue
Block a user