| Index: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
| diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
| index 36654fc5692697c741d877fff87ba983140009b3..d5d4e2f32adbe736dc32d0f68237128df5671bab 100644
|
| --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
| +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
|
| @@ -70,21 +70,7 @@ int32_t RtpRtcp::SetFecParameters(const FecProtectionParams* delta_params,
|
| }
|
|
|
| ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
|
| - : rtp_sender_(configuration.audio,
|
| - configuration.clock,
|
| - configuration.outgoing_transport,
|
| - configuration.paced_sender,
|
| - configuration.flexfec_sender,
|
| - configuration.transport_sequence_number_allocator,
|
| - configuration.transport_feedback_callback,
|
| - configuration.send_bitrate_observer,
|
| - configuration.send_frame_count_observer,
|
| - configuration.send_side_delay_observer,
|
| - configuration.event_log,
|
| - configuration.send_packet_observer,
|
| - configuration.retransmission_rate_limiter,
|
| - configuration.overhead_observer),
|
| - rtcp_sender_(configuration.audio,
|
| + : rtcp_sender_(configuration.audio,
|
| configuration.clock,
|
| configuration.receive_statistics,
|
| configuration.rtcp_packet_type_counter_observer,
|
| @@ -111,8 +97,25 @@ ModuleRtpRtcpImpl::ModuleRtpRtcpImpl(const Configuration& configuration)
|
| remote_bitrate_(configuration.remote_bitrate_estimator),
|
| rtt_stats_(configuration.rtt_stats),
|
| rtt_ms_(0) {
|
| - // Make sure rtcp sender use same timestamp offset as rtp sender.
|
| - rtcp_sender_.SetTimestampOffset(rtp_sender_.TimestampOffset());
|
| + if (!configuration.receiver_only) {
|
| + rtp_sender_.reset(new RTPSender(
|
| + configuration.audio,
|
| + configuration.clock,
|
| + configuration.outgoing_transport,
|
| + configuration.paced_sender,
|
| + configuration.flexfec_sender,
|
| + configuration.transport_sequence_number_allocator,
|
| + configuration.transport_feedback_callback,
|
| + configuration.send_bitrate_observer,
|
| + configuration.send_frame_count_observer,
|
| + configuration.send_side_delay_observer,
|
| + configuration.event_log,
|
| + configuration.send_packet_observer,
|
| + configuration.retransmission_rate_limiter,
|
| + configuration.overhead_observer));
|
| + // Make sure rtcp sender use same timestamp offset as rtp sender.
|
| + rtcp_sender_.SetTimestampOffset(rtp_sender_->TimestampOffset());
|
| + }
|
|
|
| // Set default packet size limit.
|
| // TODO(nisse): Kind-of duplicates
|
| @@ -134,12 +137,13 @@ void ModuleRtpRtcpImpl::Process() {
|
| const int64_t now = clock_->TimeInMilliseconds();
|
| last_process_time_ = now;
|
|
|
| - const int64_t kRtpRtcpBitrateProcessTimeMs = 10;
|
| - if (now >= last_bitrate_process_time_ + kRtpRtcpBitrateProcessTimeMs) {
|
| - rtp_sender_.ProcessBitrate();
|
| - last_bitrate_process_time_ = now;
|
| + if (rtp_sender_) {
|
| + const int64_t kRtpRtcpBitrateProcessTimeMs = 10;
|
| + if (now >= last_bitrate_process_time_ + kRtpRtcpBitrateProcessTimeMs) {
|
| + rtp_sender_->ProcessBitrate();
|
| + last_bitrate_process_time_ = now;
|
| + }
|
| }
|
| -
|
| const int64_t kRtpRtcpRttProcessTimeMs = 1000;
|
| bool process_rtt = now >= last_rtt_process_time_ + kRtpRtcpRttProcessTimeMs;
|
| if (rtcp_sender_.Sending()) {
|
| @@ -211,24 +215,24 @@ void ModuleRtpRtcpImpl::Process() {
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRtxSendStatus(int mode) {
|
| - rtp_sender_.SetRtxStatus(mode);
|
| + rtp_sender_->SetRtxStatus(mode);
|
| }
|
|
|
| int ModuleRtpRtcpImpl::RtxSendStatus() const {
|
| - return rtp_sender_.RtxStatus();
|
| + return rtp_sender_ ? rtp_sender_->RtxStatus() : kRtxOff;
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRtxSsrc(uint32_t ssrc) {
|
| - rtp_sender_.SetRtxSsrc(ssrc);
|
| + rtp_sender_->SetRtxSsrc(ssrc);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRtxSendPayloadType(int payload_type,
|
| int associated_payload_type) {
|
| - rtp_sender_.SetRtxPayloadType(payload_type, associated_payload_type);
|
| + rtp_sender_->SetRtxPayloadType(payload_type, associated_payload_type);
|
| }
|
|
|
| rtc::Optional<uint32_t> ModuleRtpRtcpImpl::FlexfecSsrc() const {
|
| - return rtp_sender_.FlexfecSsrc();
|
| + return rtp_sender_->FlexfecSsrc();
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
|
| @@ -239,89 +243,95 @@ int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket(
|
|
|
| int32_t ModuleRtpRtcpImpl::RegisterSendPayload(
|
| const CodecInst& voice_codec) {
|
| - return rtp_sender_.RegisterPayload(
|
| + return rtp_sender_->RegisterPayload(
|
| voice_codec.plname, voice_codec.pltype, voice_codec.plfreq,
|
| voice_codec.channels, (voice_codec.rate < 0) ? 0 : voice_codec.rate);
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::RegisterSendPayload(const VideoCodec& video_codec) {
|
| - return rtp_sender_.RegisterPayload(video_codec.plName, video_codec.plType,
|
| + return rtp_sender_->RegisterPayload(video_codec.plName, video_codec.plType,
|
| 90000, 0, 0);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::RegisterVideoSendPayload(int payload_type,
|
| const char* payload_name) {
|
| RTC_CHECK_EQ(
|
| - 0, rtp_sender_.RegisterPayload(payload_name, payload_type, 90000, 0, 0));
|
| + 0, rtp_sender_->RegisterPayload(payload_name, payload_type, 90000, 0, 0));
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload(const int8_t payload_type) {
|
| - return rtp_sender_.DeRegisterSendPayload(payload_type);
|
| + return rtp_sender_->DeRegisterSendPayload(payload_type);
|
| }
|
|
|
| uint32_t ModuleRtpRtcpImpl::StartTimestamp() const {
|
| - return rtp_sender_.TimestampOffset();
|
| + return rtp_sender_->TimestampOffset();
|
| }
|
|
|
| // Configure start timestamp, default is a random number.
|
| void ModuleRtpRtcpImpl::SetStartTimestamp(const uint32_t timestamp) {
|
| rtcp_sender_.SetTimestampOffset(timestamp);
|
| - rtp_sender_.SetTimestampOffset(timestamp);
|
| + rtp_sender_->SetTimestampOffset(timestamp);
|
| }
|
|
|
| uint16_t ModuleRtpRtcpImpl::SequenceNumber() const {
|
| - return rtp_sender_.SequenceNumber();
|
| + return rtp_sender_->SequenceNumber();
|
| }
|
|
|
| // Set SequenceNumber, default is a random number.
|
| void ModuleRtpRtcpImpl::SetSequenceNumber(const uint16_t seq_num) {
|
| - rtp_sender_.SetSequenceNumber(seq_num);
|
| + rtp_sender_->SetSequenceNumber(seq_num);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRtpState(const RtpState& rtp_state) {
|
| - rtp_sender_.SetRtpState(rtp_state);
|
| + rtp_sender_->SetRtpState(rtp_state);
|
| rtcp_sender_.SetTimestampOffset(rtp_state.start_timestamp);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRtxState(const RtpState& rtp_state) {
|
| - rtp_sender_.SetRtxRtpState(rtp_state);
|
| + rtp_sender_->SetRtxRtpState(rtp_state);
|
| }
|
|
|
| RtpState ModuleRtpRtcpImpl::GetRtpState() const {
|
| - return rtp_sender_.GetRtpState();
|
| + return rtp_sender_->GetRtpState();
|
| }
|
|
|
| RtpState ModuleRtpRtcpImpl::GetRtxState() const {
|
| - return rtp_sender_.GetRtxRtpState();
|
| + return rtp_sender_->GetRtxRtpState();
|
| }
|
|
|
| uint32_t ModuleRtpRtcpImpl::SSRC() const {
|
| - return rtp_sender_.SSRC();
|
| + return rtcp_sender_.SSRC();
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetSSRC(const uint32_t ssrc) {
|
| - rtp_sender_.SetSSRC(ssrc);
|
| + if (rtp_sender_) {
|
| + rtp_sender_->SetSSRC(ssrc);
|
| + }
|
| rtcp_sender_.SetSSRC(ssrc);
|
| SetRtcpReceiverSsrcs(ssrc);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetCsrcs(const std::vector<uint32_t>& csrcs) {
|
| rtcp_sender_.SetCsrcs(csrcs);
|
| - rtp_sender_.SetCsrcs(csrcs);
|
| + rtp_sender_->SetCsrcs(csrcs);
|
| }
|
|
|
| // TODO(pbos): Handle media and RTX streams separately (separate RTCP
|
| // feedbacks).
|
| RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() {
|
| - StreamDataCounters rtp_stats;
|
| - StreamDataCounters rtx_stats;
|
| - rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats);
|
| -
|
| RTCPSender::FeedbackState state;
|
| - state.packets_sent = rtp_stats.transmitted.packets +
|
| - rtx_stats.transmitted.packets;
|
| - state.media_bytes_sent = rtp_stats.transmitted.payload_bytes +
|
| - rtx_stats.transmitted.payload_bytes;
|
| + // This is called also when receiver_only is true. Hence below
|
| + // checks that rtp_sender_ exists.
|
| + if (rtp_sender_) {
|
| + StreamDataCounters rtp_stats;
|
| + StreamDataCounters rtx_stats;
|
| + rtp_sender_->GetDataCounters(&rtp_stats, &rtx_stats);
|
| + state.packets_sent = rtp_stats.transmitted.packets +
|
| + rtx_stats.transmitted.packets;
|
| + state.media_bytes_sent = rtp_stats.transmitted.payload_bytes +
|
| + rtx_stats.transmitted.payload_bytes;
|
| + state.send_bitrate = rtp_sender_->BitrateSent();
|
| + }
|
| state.module = this;
|
|
|
| LastReceivedNTP(&state.last_rr_ntp_secs,
|
| @@ -331,21 +341,22 @@ RTCPSender::FeedbackState ModuleRtpRtcpImpl::GetFeedbackState() {
|
| state.has_last_xr_rr =
|
| rtcp_receiver_.LastReceivedXrReferenceTimeInfo(&state.last_xr_rr);
|
|
|
| - uint32_t tmp;
|
| - BitrateSent(&state.send_bitrate, &tmp, &tmp, &tmp);
|
| return state;
|
| }
|
|
|
| +// TODO(nisse): This method shouldn't be called for a receive-only
|
| +// stream. Delete rtp_sender_ check as soon as all applications are
|
| +// updated.
|
| int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) {
|
| if (rtcp_sender_.Sending() != sending) {
|
| // Sends RTCP BYE when going from true to false
|
| if (rtcp_sender_.SetSendingStatus(GetFeedbackState(), sending) != 0) {
|
| LOG(LS_WARNING) << "Failed to send RTCP BYE";
|
| }
|
| - if (sending) {
|
| + if (sending && rtp_sender_) {
|
| // Update Rtcp receiver config, to track Rtx config changes from
|
| // the SetRtxStatus and SetRtxSsrc methods.
|
| - SetRtcpReceiverSsrcs(rtp_sender_.SSRC());
|
| + SetRtcpReceiverSsrcs(rtp_sender_->SSRC());
|
| }
|
| }
|
| return 0;
|
| @@ -355,12 +366,19 @@ bool ModuleRtpRtcpImpl::Sending() const {
|
| return rtcp_sender_.Sending();
|
| }
|
|
|
| +// TODO(nisse): This method shouldn't be called for a receive-only
|
| +// stream. Delete rtp_sender_ check as soon as all applications are
|
| +// updated.
|
| void ModuleRtpRtcpImpl::SetSendingMediaStatus(const bool sending) {
|
| - rtp_sender_.SetSendingMediaStatus(sending);
|
| + if (rtp_sender_) {
|
| + rtp_sender_->SetSendingMediaStatus(sending);
|
| + } else {
|
| + RTC_DCHECK(!sending);
|
| + }
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::SendingMedia() const {
|
| - return rtp_sender_.SendingMedia();
|
| + return rtp_sender_ ? rtp_sender_->SendingMedia() : false;
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::SendOutgoingData(
|
| @@ -378,7 +396,7 @@ bool ModuleRtpRtcpImpl::SendOutgoingData(
|
| if (rtcp_sender_.TimeToSendRTCPReport(kVideoFrameKey == frame_type)) {
|
| rtcp_sender_.SendRTCP(GetFeedbackState(), kRtcpReport);
|
| }
|
| - return rtp_sender_.SendOutgoingData(
|
| + return rtp_sender_->SendOutgoingData(
|
| frame_type, payload_type, time_stamp, capture_time_ms, payload_data,
|
| payload_size, fragmentation, rtp_video_header, transport_frame_id_out);
|
| }
|
| @@ -388,22 +406,22 @@ bool ModuleRtpRtcpImpl::TimeToSendPacket(uint32_t ssrc,
|
| int64_t capture_time_ms,
|
| bool retransmission,
|
| const PacedPacketInfo& pacing_info) {
|
| - return rtp_sender_.TimeToSendPacket(ssrc, sequence_number, capture_time_ms,
|
| + return rtp_sender_->TimeToSendPacket(ssrc, sequence_number, capture_time_ms,
|
| retransmission, pacing_info);
|
| }
|
|
|
| size_t ModuleRtpRtcpImpl::TimeToSendPadding(
|
| size_t bytes,
|
| const PacedPacketInfo& pacing_info) {
|
| - return rtp_sender_.TimeToSendPadding(bytes, pacing_info);
|
| + return rtp_sender_->TimeToSendPadding(bytes, pacing_info);
|
| }
|
|
|
| size_t ModuleRtpRtcpImpl::MaxPayloadSize() const {
|
| - return rtp_sender_.MaxPayloadSize();
|
| + return rtp_sender_->MaxPayloadSize();
|
| }
|
|
|
| size_t ModuleRtpRtcpImpl::MaxRtpPacketSize() const {
|
| - return rtp_sender_.MaxRtpPacketSize();
|
| + return rtp_sender_->MaxRtpPacketSize();
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetMaxRtpPacketSize(size_t rtp_packet_size) {
|
| @@ -413,7 +431,8 @@ void ModuleRtpRtcpImpl::SetMaxRtpPacketSize(size_t rtp_packet_size) {
|
| << "rtp packet size too small: " << rtp_packet_size;
|
|
|
| rtcp_sender_.SetMaxRtpPacketSize(rtp_packet_size);
|
| - rtp_sender_.SetMaxRtpPacketSize(rtp_packet_size);
|
| + if (rtp_sender_)
|
| + rtp_sender_->SetMaxRtpPacketSize(rtp_packet_size);
|
| }
|
|
|
| RtcpMode ModuleRtpRtcpImpl::RTCP() const {
|
| @@ -514,7 +533,7 @@ int32_t ModuleRtpRtcpImpl::DataCountersRTP(
|
| uint32_t* packets_sent) const {
|
| StreamDataCounters rtp_stats;
|
| StreamDataCounters rtx_stats;
|
| - rtp_sender_.GetDataCounters(&rtp_stats, &rtx_stats);
|
| + rtp_sender_->GetDataCounters(&rtp_stats, &rtx_stats);
|
|
|
| if (bytes_sent) {
|
| *bytes_sent = rtp_stats.transmitted.payload_bytes +
|
| @@ -534,7 +553,7 @@ int32_t ModuleRtpRtcpImpl::DataCountersRTP(
|
| void ModuleRtpRtcpImpl::GetSendStreamDataCounters(
|
| StreamDataCounters* rtp_counters,
|
| StreamDataCounters* rtx_counters) const {
|
| - rtp_sender_.GetDataCounters(rtp_counters, rtx_counters);
|
| + rtp_sender_->GetDataCounters(rtp_counters, rtx_counters);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::GetRtpPacketLossStats(
|
| @@ -589,20 +608,20 @@ void ModuleRtpRtcpImpl::SetREMBData(const uint32_t bitrate,
|
| int32_t ModuleRtpRtcpImpl::RegisterSendRtpHeaderExtension(
|
| const RTPExtensionType type,
|
| const uint8_t id) {
|
| - return rtp_sender_.RegisterRtpHeaderExtension(type, id);
|
| + return rtp_sender_->RegisterRtpHeaderExtension(type, id);
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::DeregisterSendRtpHeaderExtension(
|
| const RTPExtensionType type) {
|
| - return rtp_sender_.DeregisterRtpHeaderExtension(type);
|
| + return rtp_sender_->DeregisterRtpHeaderExtension(type);
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::HasBweExtensions() const {
|
| - return rtp_sender_.IsRtpHeaderExtensionRegistered(
|
| + return rtp_sender_->IsRtpHeaderExtensionRegistered(
|
| kRtpExtensionTransportSequenceNumber) ||
|
| - rtp_sender_.IsRtpHeaderExtensionRegistered(
|
| + rtp_sender_->IsRtpHeaderExtensionRegistered(
|
| kRtpExtensionAbsoluteSendTime) ||
|
| - rtp_sender_.IsRtpHeaderExtensionRegistered(
|
| + rtp_sender_->IsRtpHeaderExtensionRegistered(
|
| kRtpExtensionTransmissionTimeOffset);
|
| }
|
|
|
| @@ -621,13 +640,13 @@ void ModuleRtpRtcpImpl::SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) {
|
|
|
| // Returns the currently configured retransmission mode.
|
| int ModuleRtpRtcpImpl::SelectiveRetransmissions() const {
|
| - return rtp_sender_.SelectiveRetransmissions();
|
| + return rtp_sender_->SelectiveRetransmissions();
|
| }
|
|
|
| // Enable or disable a retransmission mode, which decides which packets will
|
| // be retransmitted if NACKed.
|
| int ModuleRtpRtcpImpl::SetSelectiveRetransmissions(uint8_t settings) {
|
| - return rtp_sender_.SetSelectiveRetransmissions(settings);
|
| + return rtp_sender_->SetSelectiveRetransmissions(settings);
|
| }
|
|
|
| // Send a Negative acknowledgment packet.
|
| @@ -698,11 +717,11 @@ bool ModuleRtpRtcpImpl::TimeToSendFullNackList(int64_t now) const {
|
| // Store the sent packets, needed to answer to Negative acknowledgment requests.
|
| void ModuleRtpRtcpImpl::SetStorePacketsStatus(const bool enable,
|
| const uint16_t number_to_store) {
|
| - rtp_sender_.SetStorePacketsStatus(enable, number_to_store);
|
| + rtp_sender_->SetStorePacketsStatus(enable, number_to_store);
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::StorePackets() const {
|
| - return rtp_sender_.StorePackets();
|
| + return rtp_sender_->StorePackets();
|
| }
|
|
|
| void ModuleRtpRtcpImpl::RegisterRtcpStatisticsCallback(
|
| @@ -724,7 +743,7 @@ int32_t ModuleRtpRtcpImpl::SendTelephoneEventOutband(
|
| const uint8_t key,
|
| const uint16_t time_ms,
|
| const uint8_t level) {
|
| - return rtp_sender_.SendTelephoneEvent(key, time_ms, level);
|
| + return rtp_sender_->SendTelephoneEvent(key, time_ms, level);
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::SetAudioPacketSize(
|
| @@ -734,7 +753,7 @@ int32_t ModuleRtpRtcpImpl::SetAudioPacketSize(
|
|
|
| int32_t ModuleRtpRtcpImpl::SetAudioLevel(
|
| const uint8_t level_d_bov) {
|
| - return rtp_sender_.SetAudioLevel(level_d_bov);
|
| + return rtp_sender_->SetAudioLevel(level_d_bov);
|
| }
|
|
|
| int32_t ModuleRtpRtcpImpl::SetKeyFrameRequestMethod(
|
| @@ -755,13 +774,13 @@ int32_t ModuleRtpRtcpImpl::RequestKeyFrame() {
|
|
|
| void ModuleRtpRtcpImpl::SetUlpfecConfig(int red_payload_type,
|
| int ulpfec_payload_type) {
|
| - rtp_sender_.SetUlpfecConfig(red_payload_type, ulpfec_payload_type);
|
| + rtp_sender_->SetUlpfecConfig(red_payload_type, ulpfec_payload_type);
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::SetFecParameters(
|
| const FecProtectionParams& delta_params,
|
| const FecProtectionParams& key_params) {
|
| - return rtp_sender_.SetFecParameters(delta_params, key_params);
|
| + return rtp_sender_->SetFecParameters(delta_params, key_params);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetRemoteSSRC(const uint32_t ssrc) {
|
| @@ -774,10 +793,10 @@ void ModuleRtpRtcpImpl::BitrateSent(uint32_t* total_rate,
|
| uint32_t* video_rate,
|
| uint32_t* fec_rate,
|
| uint32_t* nack_rate) const {
|
| - *total_rate = rtp_sender_.BitrateSent();
|
| - *video_rate = rtp_sender_.VideoBitrateSent();
|
| - *fec_rate = rtp_sender_.FecOverheadRate();
|
| - *nack_rate = rtp_sender_.NackOverheadRate();
|
| + *total_rate = rtp_sender_->BitrateSent();
|
| + *video_rate = rtp_sender_->VideoBitrateSent();
|
| + *fec_rate = rtp_sender_->FecOverheadRate();
|
| + *nack_rate = rtp_sender_->NackOverheadRate();
|
| }
|
|
|
| void ModuleRtpRtcpImpl::OnRequestSendReport() {
|
| @@ -786,10 +805,13 @@ void ModuleRtpRtcpImpl::OnRequestSendReport() {
|
|
|
| void ModuleRtpRtcpImpl::OnReceivedNack(
|
| const std::vector<uint16_t>& nack_sequence_numbers) {
|
| + if (!rtp_sender_)
|
| + return;
|
| +
|
| for (uint16_t nack_sequence_number : nack_sequence_numbers) {
|
| send_loss_stats_.AddLostPacket(nack_sequence_number);
|
| }
|
| - if (!rtp_sender_.StorePackets() ||
|
| + if (!rtp_sender_->StorePackets() ||
|
| nack_sequence_numbers.size() == 0) {
|
| return;
|
| }
|
| @@ -798,12 +820,13 @@ void ModuleRtpRtcpImpl::OnReceivedNack(
|
| if (rtt == 0) {
|
| rtcp_receiver_.RTT(rtcp_receiver_.RemoteSSRC(), NULL, &rtt, NULL, NULL);
|
| }
|
| - rtp_sender_.OnReceivedNack(nack_sequence_numbers, rtt);
|
| + rtp_sender_->OnReceivedNack(nack_sequence_numbers, rtt);
|
| }
|
|
|
| void ModuleRtpRtcpImpl::OnReceivedRtcpReportBlocks(
|
| const ReportBlockList& report_blocks) {
|
| - rtp_sender_.OnReceivedRtcpReportBlocks(report_blocks);
|
| + if (rtp_sender_)
|
| + rtp_sender_->OnReceivedRtcpReportBlocks(report_blocks);
|
| }
|
|
|
| bool ModuleRtpRtcpImpl::LastReceivedNTP(
|
| @@ -841,8 +864,8 @@ int64_t ModuleRtpRtcpImpl::RtcpReportInterval() {
|
| void ModuleRtpRtcpImpl::SetRtcpReceiverSsrcs(uint32_t main_ssrc) {
|
| std::set<uint32_t> ssrcs;
|
| ssrcs.insert(main_ssrc);
|
| - if (rtp_sender_.RtxStatus() != kRtxOff)
|
| - ssrcs.insert(rtp_sender_.RtxSsrc());
|
| + if (RtxSendStatus() != kRtxOff)
|
| + ssrcs.insert(rtp_sender_->RtxSsrc());
|
| rtcp_receiver_.SetSsrcs(main_ssrc, ssrcs);
|
| }
|
|
|
| @@ -858,12 +881,12 @@ int64_t ModuleRtpRtcpImpl::rtt_ms() const {
|
|
|
| void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
|
| StreamDataCountersCallback* callback) {
|
| - rtp_sender_.RegisterRtpStatisticsCallback(callback);
|
| + rtp_sender_->RegisterRtpStatisticsCallback(callback);
|
| }
|
|
|
| StreamDataCountersCallback*
|
| ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
|
| - return rtp_sender_.GetRtpStatisticsCallback();
|
| + return rtp_sender_->GetRtpStatisticsCallback();
|
| }
|
|
|
| void ModuleRtpRtcpImpl::SetVideoBitrateAllocation(
|
|
|