Don't recreate the audio receive stream when updating the local_ssrc.
Bug: webrtc:11993 Change-Id: Ic5d8a8a8b7c12fb1d906e0b3cbdf657fd9e8eafc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222042 Commit-Queue: Tommi <tommi@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34299}
This commit is contained in:
@ -69,6 +69,7 @@ ModuleRtpRtcpImpl2::ModuleRtpRtcpImpl2(const Configuration& configuration)
|
||||
rtt_ms_(0) {
|
||||
RTC_DCHECK(worker_queue_);
|
||||
process_thread_checker_.Detach();
|
||||
packet_sequence_checker_.Detach();
|
||||
if (!configuration.receiver_only) {
|
||||
rtp_sender_ = std::make_unique<RtpSenderContext>(configuration);
|
||||
// Make sure rtcp sender use same timestamp offset as rtp sender.
|
||||
@ -169,6 +170,7 @@ absl::optional<uint32_t> ModuleRtpRtcpImpl2::FlexfecSsrc() const {
|
||||
|
||||
void ModuleRtpRtcpImpl2::IncomingRtcpPacket(const uint8_t* rtcp_packet,
|
||||
const size_t length) {
|
||||
RTC_DCHECK_RUN_ON(&packet_sequence_checker_);
|
||||
rtcp_receiver_.IncomingPacket(rtcp_packet, length);
|
||||
}
|
||||
|
||||
@ -219,6 +221,12 @@ RtpState ModuleRtpRtcpImpl2::GetRtxState() const {
|
||||
return rtp_sender_->packet_generator.GetRtxRtpState();
|
||||
}
|
||||
|
||||
uint32_t ModuleRtpRtcpImpl2::local_media_ssrc() const {
|
||||
RTC_DCHECK_RUN_ON(&packet_sequence_checker_);
|
||||
RTC_DCHECK_EQ(rtcp_receiver_.local_media_ssrc(), rtcp_sender_.SSRC());
|
||||
return rtcp_receiver_.local_media_ssrc();
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl2::SetRid(const std::string& rid) {
|
||||
if (rtp_sender_) {
|
||||
rtp_sender_->packet_generator.SetRid(rid);
|
||||
@ -650,6 +658,12 @@ void ModuleRtpRtcpImpl2::SetRemoteSSRC(const uint32_t ssrc) {
|
||||
rtcp_receiver_.SetRemoteSSRC(ssrc);
|
||||
}
|
||||
|
||||
void ModuleRtpRtcpImpl2::SetLocalSsrc(uint32_t local_ssrc) {
|
||||
RTC_DCHECK_RUN_ON(&packet_sequence_checker_);
|
||||
rtcp_receiver_.set_local_media_ssrc(local_ssrc);
|
||||
rtcp_sender_.SetSsrc(local_ssrc);
|
||||
}
|
||||
|
||||
RtpSendRates ModuleRtpRtcpImpl2::GetSendRates() const {
|
||||
// Typically called on the `rtp_transport_queue_` owned by an
|
||||
// RtpTransportControllerSendInterface instance.
|
||||
|
||||
Reference in New Issue
Block a user