Convert logs in rtp rtcp module from WEBRTC_TRACE into LOG. Clean some logs and add asserts in the way. BUG=3153 R=mflodman@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/11129004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5861 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index 575da60..dc65336 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc
@@ -110,13 +110,9 @@ uint32_t SSRC = rtp_sender_.SSRC(); rtcp_sender_.SetSSRC(SSRC); SetRtcpReceiverSsrcs(SSRC); - - WEBRTC_TRACE(kTraceMemory, kTraceRtpRtcp, id_, "%s created", __FUNCTION__); } ModuleRtpRtcpImpl::~ModuleRtpRtcpImpl() { - WEBRTC_TRACE(kTraceMemory, kTraceRtpRtcp, id_, "%s deleted", __FUNCTION__); - // All child modules MUST be deleted before deleting the default. assert(child_modules_.empty()); @@ -134,12 +130,6 @@ } void ModuleRtpRtcpImpl::RegisterChildModule(RtpRtcp* module) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "RegisterChildModule(module:0x%x)", - module); - CriticalSectionScoped lock( critical_section_module_ptrs_.get()); CriticalSectionScoped double_lock( @@ -153,11 +143,6 @@ } void ModuleRtpRtcpImpl::DeRegisterChildModule(RtpRtcp* remove_module) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "DeRegisterChildModule(module:0x%x)", remove_module); - CriticalSectionScoped lock( critical_section_module_ptrs_.get()); CriticalSectionScoped double_lock( @@ -282,29 +267,12 @@ int32_t ModuleRtpRtcpImpl::IncomingRtcpPacket( const uint8_t* rtcp_packet, const uint16_t length) { - WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, -1, - "IncomingRtcpPacket(packet_length:%u)", length); - // Minimum RTP is 12 bytes. - // Minimum RTCP is 8 bytes (RTCP BYE). - if (length == 8) { - WEBRTC_TRACE(kTraceDebug, kTraceRtpRtcp, -1, - "IncomingRtcpPacket invalid length"); - return false; - } - // Check RTP version. - const uint8_t version = rtcp_packet[0] >> 6; - if (version != 2) { - WEBRTC_TRACE(kTraceDebug, kTraceRtpRtcp, -1, - "IncomingRtcpPacket invalid RTP version"); - return false; - } // Allow receive of non-compound RTCP packets. RTCPUtility::RTCPParserV2 rtcp_parser(rtcp_packet, length, true); const bool valid_rtcpheader = rtcp_parser.IsValid(); if (!valid_rtcpheader) { - WEBRTC_TRACE(kTraceDebug, kTraceRtpRtcp, id_, - "IncomingRtcpPacket invalid RTCP packet"); + LOG(LS_WARNING) << "Incoming invalid RTCP packet"; return -1; } RTCPHelp::RTCPPacketInformation rtcp_packet_information; @@ -318,14 +286,6 @@ int32_t ModuleRtpRtcpImpl::RegisterSendPayload( const CodecInst& voice_codec) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "RegisterSendPayload(pl_name:%s pl_type:%d frequency:%u)", - voice_codec.plname, - voice_codec.pltype, - voice_codec.plfreq); - return rtp_sender_.RegisterPayload( voice_codec.plname, voice_codec.pltype, @@ -336,13 +296,6 @@ int32_t ModuleRtpRtcpImpl::RegisterSendPayload( const VideoCodec& video_codec) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "RegisterSendPayload(pl_name:%s pl_type:%d)", - video_codec.plName, - video_codec.plType); - send_video_codec_ = video_codec; { // simulcast_ is accessed when accessing child_modules_, so this write needs @@ -359,11 +312,6 @@ int32_t ModuleRtpRtcpImpl::DeRegisterSendPayload( const int8_t payload_type) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "DeRegisterSendPayload(%d)", payload_type); - return rtp_sender_.DeRegisterSendPayload(payload_type); } @@ -372,53 +320,34 @@ } uint32_t ModuleRtpRtcpImpl::StartTimestamp() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "StartTimestamp()"); - return rtp_sender_.StartTimestamp(); } // Configure start timestamp, default is a random number. int32_t ModuleRtpRtcpImpl::SetStartTimestamp( const uint32_t timestamp) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetStartTimestamp(%d)", - timestamp); rtcp_sender_.SetStartTimestamp(timestamp); rtp_sender_.SetStartTimestamp(timestamp, true); return 0; // TODO(pwestin): change to void. } uint16_t ModuleRtpRtcpImpl::SequenceNumber() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SequenceNumber()"); - return rtp_sender_.SequenceNumber(); } // Set SequenceNumber, default is a random number. int32_t ModuleRtpRtcpImpl::SetSequenceNumber( const uint16_t seq_num) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetSequenceNumber(%d)", - seq_num); - rtp_sender_.SetSequenceNumber(seq_num); return 0; // TODO(pwestin): change to void. } uint32_t ModuleRtpRtcpImpl::SSRC() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SSRC()"); - return rtp_sender_.SSRC(); } // Configure SSRC, default is a random number. int32_t ModuleRtpRtcpImpl::SetSSRC(const uint32_t ssrc) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetSSRC(%d)", ssrc); - rtp_sender_.SetSSRC(ssrc); rtcp_sender_.SetSSRC(ssrc); SetRtcpReceiverSsrcs(ssrc); @@ -434,20 +363,12 @@ int32_t ModuleRtpRtcpImpl::CSRCs( uint32_t arr_of_csrc[kRtpCsrcSize]) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "CSRCs()"); - return rtp_sender_.CSRCs(arr_of_csrc); } int32_t ModuleRtpRtcpImpl::SetCSRCs( const uint32_t arr_of_csrc[kRtpCsrcSize], const uint8_t arr_length) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetCSRCs(arr_length:%d)", - arr_length); - if (IsDefaultModule()) { // For default we need to update all child modules too. CriticalSectionScoped lock(critical_section_module_ptrs_.get()); @@ -461,10 +382,6 @@ it++; } } else { - for (int i = 0; i < arr_length; ++i) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "\tidx:%d CSRC:%u", i, - arr_of_csrc[i]); - } rtcp_sender_.SetCSRCs(arr_of_csrc, arr_length); rtp_sender_.SetCSRCs(arr_of_csrc, arr_length); } @@ -472,35 +389,23 @@ } uint32_t ModuleRtpRtcpImpl::PacketCountSent() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "PacketCountSent()"); return rtp_sender_.Packets(); } uint32_t ModuleRtpRtcpImpl::ByteCountSent() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "ByteCountSent()"); return rtp_sender_.Bytes(); } int ModuleRtpRtcpImpl::CurrentSendFrequencyHz() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "CurrentSendFrequencyHz()"); return rtp_sender_.SendPayloadFrequency(); } int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) { - if (sending) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetSendingStatus(sending)"); - } else { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetSendingStatus(stopped)"); - } if (rtcp_sender_.Sending() != sending) { // Sends RTCP BYE when going from true to false RTCPSender::FeedbackState feedback_state(this); if (rtcp_sender_.SetSendingStatus(feedback_state, sending) != 0) { - WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, id_, - "Failed to send RTCP BYE"); + LOG(LS_WARNING) << "Failed to send RTCP BYE"; } collision_detected_ = false; @@ -525,25 +430,15 @@ } bool ModuleRtpRtcpImpl::Sending() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "Sending()"); return rtcp_sender_.Sending(); } int32_t ModuleRtpRtcpImpl::SetSendingMediaStatus(const bool sending) { - if (sending) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetSendingMediaStatus(sending)"); - } else { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetSendingMediaStatus(stopped)"); - } rtp_sender_.SetSendingMediaStatus(sending); return 0; } bool ModuleRtpRtcpImpl::SendingMedia() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "Sending()"); - if (!IsDefaultModule()) { return rtp_sender_.SendingMedia(); } @@ -569,13 +464,6 @@ uint32_t payload_size, const RTPFragmentationHeader* fragmentation, const RTPVideoHeader* rtp_video_hdr) { - WEBRTC_TRACE( - kTraceStream, - kTraceRtpRtcp, - id_, - "SendOutgoingData(frame_type:%d payload_type:%d time_stamp:%u size:%u)", - frame_type, payload_type, time_stamp, payload_size); - rtcp_sender_.SetLastRtpTime(time_stamp, capture_time_ms); if (!IsDefaultModule()) { @@ -619,11 +507,6 @@ if (it == child_modules_.end()) { return -1; } - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SendOutgoingData(SimulcastIdx:%u size:%u, ssrc:0x%x)", - idx, payload_size, (*it)->rtp_sender_.SSRC()); return (*it)->SendOutgoingData(frame_type, payload_type, time_stamp, @@ -656,13 +539,6 @@ uint16_t sequence_number, int64_t capture_time_ms, bool retransmission) { - WEBRTC_TRACE( - kTraceStream, - kTraceRtpRtcp, - id_, - "TimeToSendPacket(ssrc:0x%x sequence_number:%u capture_time_ms:%ll)", - ssrc, sequence_number, capture_time_ms); - if (!IsDefaultModule()) { // Don't send from default module. if (SendingMedia() && ssrc == rtp_sender_.SSRC()) { @@ -686,9 +562,6 @@ } int ModuleRtpRtcpImpl::TimeToSendPadding(int bytes) { - WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, id_, "TimeToSendPadding(bytes: %d)", - bytes); - if (!IsDefaultModule()) { // Don't send from default module. if (SendingMedia()) { @@ -721,16 +594,10 @@ } uint16_t ModuleRtpRtcpImpl::MaxPayloadLength() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "MaxPayloadLength()"); return rtp_sender_.MaxPayloadLength(); } uint16_t ModuleRtpRtcpImpl::MaxDataPayloadLength() const { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "MaxDataPayloadLength()"); - // Assuming IP/UDP. uint16_t min_data_payload_length = IP_PACKET_SIZE - 28; @@ -763,13 +630,6 @@ const bool tcp, const bool ipv6, const uint8_t authentication_overhead) { - WEBRTC_TRACE( - kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetTransportOverhead(TCP:%d, IPV6:%d authentication_overhead:%u)", - tcp, ipv6, authentication_overhead); - uint16_t packet_overhead = 0; if (ipv6) { packet_overhead = 40; @@ -801,11 +661,8 @@ } int32_t ModuleRtpRtcpImpl::SetMaxTransferUnit(const uint16_t mtu) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetMaxTransferUnit(%u)", - mtu); if (mtu > IP_PACKET_SIZE) { - WEBRTC_TRACE(kTraceWarning, kTraceRtpRtcp, id_, - "Invalid in argument to SetMaxTransferUnit(%u)", mtu); + LOG(LS_ERROR) << "Invalid mtu: " << mtu; return -1; } return rtp_sender_.SetMaxPayloadLength(mtu - packet_overhead_, @@ -813,7 +670,6 @@ } RTCPMethod ModuleRtpRtcpImpl::RTCP() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RTCP()"); if (rtcp_sender_.Status() != kRtcpOff) { return rtcp_receiver_.Status(); } @@ -822,8 +678,6 @@ // Configure RTCP status i.e on/off. int32_t ModuleRtpRtcpImpl::SetRTCPStatus(const RTCPMethod method) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetRTCPStatus(%d)", - method); if (rtcp_sender_.SetRTCPStatus(method) == 0) { return rtcp_receiver_.SetRTCPStatus(method); } @@ -837,34 +691,26 @@ } int32_t ModuleRtpRtcpImpl::SetCNAME(const char c_name[RTCP_CNAME_SIZE]) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetCNAME(%s)", c_name); return rtcp_sender_.SetCNAME(c_name); } int32_t ModuleRtpRtcpImpl::CNAME(char c_name[RTCP_CNAME_SIZE]) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "CNAME()"); return rtcp_sender_.CNAME(c_name); } int32_t ModuleRtpRtcpImpl::AddMixedCNAME( const uint32_t ssrc, const char c_name[RTCP_CNAME_SIZE]) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "AddMixedCNAME(SSRC:%u)", ssrc); return rtcp_sender_.AddMixedCNAME(ssrc, c_name); } int32_t ModuleRtpRtcpImpl::RemoveMixedCNAME(const uint32_t ssrc) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "RemoveMixedCNAME(SSRC:%u)", ssrc); return rtcp_sender_.RemoveMixedCNAME(ssrc); } int32_t ModuleRtpRtcpImpl::RemoteCNAME( const uint32_t remote_ssrc, char c_name[RTCP_CNAME_SIZE]) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "RemoteCNAME(SSRC:%u)", remote_ssrc); return rtcp_receiver_.CNAME(remote_ssrc, c_name); } @@ -874,7 +720,6 @@ uint32_t* rtcp_arrival_time_secs, uint32_t* rtcp_arrival_time_frac, uint32_t* rtcp_timestamp) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RemoteNTP()"); return rtcp_receiver_.NTP(received_ntpsecs, received_ntpfrac, rtcp_arrival_time_secs, @@ -888,21 +733,16 @@ uint16_t* avg_rtt, uint16_t* min_rtt, uint16_t* max_rtt) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RTT()"); return rtcp_receiver_.RTT(remote_ssrc, rtt, avg_rtt, min_rtt, max_rtt); } // Reset RoundTripTime statistics. int32_t ModuleRtpRtcpImpl::ResetRTT(const uint32_t remote_ssrc) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "ResetRTT(SSRC:%u)", - remote_ssrc); return rtcp_receiver_.ResetRTT(remote_ssrc); } // Reset RTP data counters for the sending side. int32_t ModuleRtpRtcpImpl::ResetSendDataCountersRTP() { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "ResetSendDataCountersRTP()"); rtp_sender_.ResetDataCounters(); return 0; // TODO(pwestin): change to void. } @@ -910,8 +750,6 @@ // Force a send of an RTCP packet. // Normal SR and RR are triggered via the process function. int32_t ModuleRtpRtcpImpl::SendRTCP(uint32_t rtcp_packet_type) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SendRTCP(0x%x)", - rtcp_packet_type); RTCPSender::FeedbackState feedback_state(this); return rtcp_sender_.SendRTCP(feedback_state, rtcp_packet_type); } @@ -921,23 +759,16 @@ const uint32_t name, const uint8_t* data, const uint16_t length) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetRTCPApplicationSpecificData(sub_type:%d name:0x%x)", - sub_type, name); return rtcp_sender_.SetApplicationSpecificData(sub_type, name, data, length); } // (XR) VOIP metric. int32_t ModuleRtpRtcpImpl::SetRTCPVoIPMetrics( const RTCPVoIPMetric* voip_metric) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetRTCPVoIPMetrics()"); - return rtcp_sender_.SetRTCPVoIPMetrics(voip_metric); } void ModuleRtpRtcpImpl::SetRtcpXrRrtrStatus(bool enable) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetRtcpXrRrtrStatus(%s)", enable ? "true" : "false"); return rtcp_sender_.SendRtcpXrReceiverReferenceTime(enable); } @@ -948,7 +779,6 @@ int32_t ModuleRtpRtcpImpl::DataCountersRTP( uint32_t* bytes_sent, uint32_t* packets_sent) const { - WEBRTC_TRACE(kTraceStream, kTraceRtpRtcp, id_, "DataCountersRTP()"); if (bytes_sent) { *bytes_sent = rtp_sender_.Bytes(); } @@ -959,27 +789,23 @@ } int32_t ModuleRtpRtcpImpl::RemoteRTCPStat(RTCPSenderInfo* sender_info) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RemoteRTCPStat()"); return rtcp_receiver_.SenderInfoReceived(sender_info); } // Received RTCP report. int32_t ModuleRtpRtcpImpl::RemoteRTCPStat( std::vector<RTCPReportBlock>* receive_blocks) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RemoteRTCPStat()"); return rtcp_receiver_.StatisticsReceived(receive_blocks); } int32_t ModuleRtpRtcpImpl::AddRTCPReportBlock( const uint32_t ssrc, const RTCPReportBlock* report_block) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "AddRTCPReportBlock()"); return rtcp_sender_.AddExternalReportBlock(ssrc, report_block); } int32_t ModuleRtpRtcpImpl::RemoveRTCPReportBlock( const uint32_t ssrc) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "RemoveRTCPReportBlock()"); return rtcp_sender_.RemoveExternalReportBlock(ssrc); } @@ -992,44 +818,25 @@ // (REMB) Receiver Estimated Max Bitrate. bool ModuleRtpRtcpImpl::REMB() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "REMB()"); return rtcp_sender_.REMB(); } int32_t ModuleRtpRtcpImpl::SetREMBStatus(const bool enable) { - if (enable) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetREMBStatus(enable)"); - } else { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetREMBStatus(disable)"); - } return rtcp_sender_.SetREMBStatus(enable); } int32_t ModuleRtpRtcpImpl::SetREMBData(const uint32_t bitrate, const uint8_t number_of_ssrc, const uint32_t* ssrc) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetREMBData(bitrate:%d,?,?)", bitrate); return rtcp_sender_.SetREMBData(bitrate, number_of_ssrc, ssrc); } // (IJ) Extended jitter report. bool ModuleRtpRtcpImpl::IJ() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "IJ()"); return rtcp_sender_.IJ(); } int32_t ModuleRtpRtcpImpl::SetIJStatus(const bool enable) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetIJStatus(%s)", enable ? "true" : "false"); return rtcp_sender_.SetIJStatus(enable); } @@ -1046,23 +853,14 @@ // (TMMBR) Temporary Max Media Bit Rate. bool ModuleRtpRtcpImpl::TMMBR() const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "TMMBR()"); return rtcp_sender_.TMMBR(); } int32_t ModuleRtpRtcpImpl::SetTMMBRStatus(const bool enable) { - if (enable) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetTMMBRStatus(enable)"); - } else { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetTMMBRStatus(disable)"); - } return rtcp_sender_.SetTMMBRStatus(enable); } int32_t ModuleRtpRtcpImpl::SetTMMBN(const TMMBRSet* bounding_set) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SetTMMBN()"); uint32_t max_bitrate_kbit = rtp_sender_.MaxConfiguredBitrateVideo() / 1000; return rtcp_sender_.SetTMMBN(bounding_set, max_bitrate_kbit); @@ -1070,32 +868,18 @@ // Returns the currently configured retransmission mode. int ModuleRtpRtcpImpl::SelectiveRetransmissions() const { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "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) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetSelectiveRetransmissions(%u)", - settings); return rtp_sender_.SetSelectiveRetransmissions(settings); } // Send a Negative acknowledgment packet. int32_t ModuleRtpRtcpImpl::SendNACK(const uint16_t* nack_list, const uint16_t size) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SendNACK(size:%u)", size); - // Use RTT from RtcpRttStats class if provided. uint16_t rtt = rtt_ms(); if (rtt == 0) { @@ -1149,14 +933,6 @@ int32_t ModuleRtpRtcpImpl::SetStorePacketsStatus( const bool enable, const uint16_t number_to_store) { - if (enable) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetStorePacketsStatus(enable, number_to_store:%d)", - number_to_store); - } else { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetStorePacketsStatus(disable)"); - } rtp_sender_.SetStorePacketsStatus(enable, number_to_store); return 0; // TODO(pwestin): change to void. } @@ -1180,19 +956,11 @@ const uint8_t key, const uint16_t time_ms, const uint8_t level) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SendTelephoneEventOutband(key:%u, time_ms:%u, level:%u)", key, - time_ms, level); return rtp_sender_.SendTelephoneEvent(key, time_ms, level); } bool ModuleRtpRtcpImpl::SendTelephoneEventActive( int8_t& telephone_event) const { - - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SendTelephoneEventActive()"); return rtp_sender_.SendTelephoneEventActive(&telephone_event); } @@ -1200,40 +968,23 @@ // packet in silence (CNG). int32_t ModuleRtpRtcpImpl::SetAudioPacketSize( const uint16_t packet_size_samples) { - - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetAudioPacketSize(%u)", - packet_size_samples); return rtp_sender_.SetAudioPacketSize(packet_size_samples); } int32_t ModuleRtpRtcpImpl::SetAudioLevel( const uint8_t level_d_bov) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetAudioLevel(level_d_bov:%u)", - level_d_bov); return rtp_sender_.SetAudioLevel(level_d_bov); } // Set payload type for Redundant Audio Data RFC 2198. int32_t ModuleRtpRtcpImpl::SetSendREDPayloadType( const int8_t payload_type) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetSendREDPayloadType(%d)", - payload_type); return rtp_sender_.SetRED(payload_type); } // Get payload type for Redundant Audio Data RFC 2198. int32_t ModuleRtpRtcpImpl::SendREDPayloadType( int8_t& payload_type) const { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "SendREDPayloadType()"); return rtp_sender_.RED(&payload_type); } @@ -1243,8 +994,6 @@ void ModuleRtpRtcpImpl::SetTargetSendBitrate( const std::vector<uint32_t>& stream_bitrates) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, - "SetTargetSendBitrate: %ld streams", stream_bitrates.size()); if (IsDefaultModule()) { CriticalSectionScoped lock(critical_section_module_ptrs_.get()); if (simulcast_) { @@ -1275,20 +1024,11 @@ int32_t ModuleRtpRtcpImpl::SetKeyFrameRequestMethod( const KeyFrameRequestMethod method) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetKeyFrameRequestMethod(method:%u)", - method); key_frame_req_method_ = method; return 0; } int32_t ModuleRtpRtcpImpl::RequestKeyFrame() { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "RequestKeyFrame"); switch (key_frame_req_method_) { case kKeyFrameReqFirRtp: return rtp_sender_.SendRTPIntraRequest(); @@ -1302,22 +1042,12 @@ int32_t ModuleRtpRtcpImpl::SendRTCPSliceLossIndication( const uint8_t picture_id) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SendRTCPSliceLossIndication (picture_id:%d)", - picture_id); RTCPSender::FeedbackState feedback_state(this); return rtcp_sender_.SendRTCP( feedback_state, kRtcpSli, 0, 0, false, picture_id); } int32_t ModuleRtpRtcpImpl::SetCameraDelay(const int32_t delay_ms) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetCameraDelay(%d)", - delay_ms); if (IsDefaultModule()) { CriticalSectionScoped lock(critical_section_module_ptrs_.get()); std::list<ModuleRtpRtcpImpl*>::iterator it = child_modules_.begin(); @@ -1337,18 +1067,6 @@ const bool enable, const uint8_t payload_type_red, const uint8_t payload_type_fec) { - if (enable) { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetGenericFECStatus(enable, %u)", - payload_type_red); - } else { - WEBRTC_TRACE(kTraceModuleCall, - kTraceRtpRtcp, - id_, - "SetGenericFECStatus(disable)"); - } return rtp_sender_.SetGenericFECStatus(enable, payload_type_red, payload_type_fec); @@ -1358,8 +1076,6 @@ bool& enable, uint8_t& payload_type_red, uint8_t& payload_type_fec) { - WEBRTC_TRACE(kTraceModuleCall, kTraceRtpRtcp, id_, "GenericFECStatus()"); - bool child_enabled = false; if (IsDefaultModule()) { // For default we need to check all child modules too.