diff options
author | danilchap <danilchap@webrtc.org> | 2015-12-15 02:54:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-15 10:54:50 +0000 |
commit | 6db6cdc604f9a866991ecf8454eb7f7aa69918ea (patch) | |
tree | ca2ed5c30ecd8ce4194855bdc581e067e5b05c70 /webrtc/modules | |
parent | 9638143033f27a3a58d68eb0183eec71350c5479 (diff) | |
download | webrtc-6db6cdc604f9a866991ecf8454eb7f7aa69918ea.tar.gz |
[rtp_rtcp] fixed lint errors in rtp_rtcp module that are not fixed in other CLs
BUG=webrtc:5277
R=mflodman
Review URL: https://codereview.webrtc.org/1513303003
Cr-Commit-Position: refs/heads/master@{#11025}
Diffstat (limited to 'webrtc/modules')
22 files changed, 67 insertions, 56 deletions
diff --git a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h index 334d81172c..796be1304c 100644 --- a/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h +++ b/webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h @@ -112,7 +112,10 @@ class MockRtpRtcp : public RtpRtcp { MOCK_CONST_METHOD0(SendingMedia, bool()); MOCK_CONST_METHOD4(BitrateSent, - void(uint32_t* totalRate, uint32_t* videoRate, uint32_t* fecRate, uint32_t* nackRate)); + void(uint32_t* totalRate, + uint32_t* videoRate, + uint32_t* fecRate, + uint32_t* nackRate)); MOCK_METHOD1(RegisterVideoBitrateObserver, void(BitrateStatisticsObserver*)); MOCK_CONST_METHOD0(GetVideoBitrateObserver, BitrateStatisticsObserver*(void)); MOCK_CONST_METHOD1(EstimatedReceiveBandwidth, @@ -176,7 +179,10 @@ class MockRtpRtcp : public RtpRtcp { MOCK_CONST_METHOD1(RemoteRTCPStat, int32_t(std::vector<RTCPReportBlock>* receiveBlocks)); MOCK_METHOD4(SetRTCPApplicationSpecificData, - int32_t(const uint8_t subType, const uint32_t name, const uint8_t* data, const uint16_t length)); + int32_t(const uint8_t subType, + const uint32_t name, + const uint8_t* data, + const uint16_t length)); MOCK_METHOD1(SetRTCPVoIPMetrics, int32_t(const RTCPVoIPMetric* VoIPMetric)); MOCK_METHOD1(SetRtcpXrRrtrStatus, @@ -221,8 +227,6 @@ class MockRtpRtcp : public RtpRtcp { MOCK_CONST_METHOD1(SendREDPayloadType, int32_t(int8_t* payloadType)); MOCK_METHOD2(SetRTPAudioLevelIndicationStatus, int32_t(const bool enable, const uint8_t ID)); - MOCK_CONST_METHOD2(GetRTPAudioLevelIndicationStatus, - int32_t(bool& enable, uint8_t& ID)); MOCK_METHOD1(SetAudioLevel, int32_t(const uint8_t level_dBov)); MOCK_METHOD1(SetTargetSendBitrate, @@ -242,8 +246,6 @@ class MockRtpRtcp : public RtpRtcp { int32_t(const KeyFrameRequestMethod method)); MOCK_METHOD0(RequestKeyFrame, int32_t()); - MOCK_CONST_METHOD3(Version, - int32_t(char* version, uint32_t& remaining_buffer_in_bytes, uint32_t& position)); MOCK_METHOD0(TimeUntilNextProcess, int64_t()); MOCK_METHOD0(Process, diff --git a/webrtc/modules/rtp_rtcp/source/CPPLINT.cfg b/webrtc/modules/rtp_rtcp/source/CPPLINT.cfg new file mode 100644 index 0000000000..7edbb96e9b --- /dev/null +++ b/webrtc/modules/rtp_rtcp/source/CPPLINT.cfg @@ -0,0 +1,8 @@ +#tmmbr_help is refactored in CL#1474693002 +exclude_files=tmmbr_help.* +#rtp_utility is refactored in CL#1481773004 +exclude_files=rtp_utility.* +#rtcp_utility planned to be removed when webrtc:5260 will be finished. +exclude_files=rtcp_utility.* +#rtcp_receiver/rtcp_receiver_help will be refactored more deeply as part of webrtc:5260 +exclude_files=rtcp_receiver.* diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h index b79f6ba2f4..6a63813f40 100644 --- a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h +++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h @@ -25,7 +25,7 @@ class CriticalSectionWrapper; class FecReceiverImpl : public FecReceiver { public: - FecReceiverImpl(RtpData* callback); + explicit FecReceiverImpl(RtpData* callback); virtual ~FecReceiverImpl(); int32_t AddReceivedRedPacket(const RTPHeader& rtp_header, diff --git a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc index e7d8fd71a5..e19c31bfec 100644 --- a/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/nack_rtx_unittest.cc @@ -53,7 +53,7 @@ class VerifyingRtxReceiver : public NullRtpData { class TestRtpFeedback : public NullRtpFeedback { public: - TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} + explicit TestRtpFeedback(RtpRtcp* rtp_rtcp) : rtp_rtcp_(rtp_rtcp) {} virtual ~TestRtpFeedback() {} void OnIncomingSSRCChanged(const uint32_t ssrc) override { diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc index a639f7f7f5..87c0259b3e 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_format_remb_unittest.cc @@ -26,7 +26,8 @@ namespace { class TestTransport : public Transport { public: - TestTransport(RTCPReceiver* rtcp_receiver) : rtcp_receiver_(rtcp_receiver) {} + explicit TestTransport(RTCPReceiver* rtcp_receiver) + : rtcp_receiver_(rtcp_receiver) {} bool SendRtp(const uint8_t* /*data*/, size_t /*len*/, diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc index e1721394f8..d65b04c8ab 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc @@ -746,7 +746,7 @@ bool RTCPReceiver::UpdateRTCPReceiveInformationTimers() { return updateBoundingSet; } -int32_t RTCPReceiver::BoundingSet(bool &tmmbrOwner, TMMBRSet* boundingSetRec) { +int32_t RTCPReceiver::BoundingSet(bool* tmmbrOwner, TMMBRSet* boundingSetRec) { CriticalSectionScoped lock(_criticalSectionRTCPReceiver); std::map<uint32_t, RTCPReceiveInformation*>::iterator receiveInfoIt = @@ -766,7 +766,7 @@ int32_t RTCPReceiver::BoundingSet(bool &tmmbrOwner, TMMBRSet* boundingSetRec) { i++) { if(receiveInfo->TmmbnBoundingSet.Ssrc(i) == main_ssrc_) { // owner of bounding set - tmmbrOwner = true; + *tmmbrOwner = true; } boundingSetRec->SetEntry(i, receiveInfo->TmmbnBoundingSet.Tmmbr(i), diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h index a22fd81b85..24861bd49e 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h +++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.h @@ -103,7 +103,7 @@ public: bool UpdateRTCPReceiveInformationTimers(); - int32_t BoundingSet(bool &tmmbrOwner, TMMBRSet* boundingSetRec); + int32_t BoundingSet(bool* tmmbrOwner, TMMBRSet* boundingSetRec); int32_t UpdateTMMBR(); diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc index ea62fcb0d6..15f9388b57 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_sender.cc @@ -645,7 +645,7 @@ rtc::scoped_ptr<rtcp::RtcpPacket> RTCPSender::BuildTMMBR( // will accuire criticalSectionRTCPReceiver_ is a potental deadlock but // since RTCPreceiver is not doing the reverse we should be fine int32_t lengthOfBoundingSet = - ctx.feedback_state_.module->BoundingSet(tmmbrOwner, candidateSet); + ctx.feedback_state_.module->BoundingSet(&tmmbrOwner, candidateSet); if (lengthOfBoundingSet > 0) { for (int32_t i = 0; i < lengthOfBoundingSet; i++) { @@ -1077,7 +1077,7 @@ bool RTCPSender::AllVolatileFlagsConsumed() const { bool RTCPSender::SendFeedbackPacket(const rtcp::TransportFeedback& packet) { class Sender : public rtcp::RtcpPacket::PacketReadyCallback { public: - Sender(Transport* transport) + explicit Sender(Transport* transport) : transport_(transport), send_failure_(false) {} void OnPacketReady(uint8_t* data, size_t length) override { diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h index 37966de6c2..342e38a1f2 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extension.h @@ -28,7 +28,7 @@ const size_t kVideoRotationLength = 2; const size_t kTransportSequenceNumberLength = 3; struct HeaderExtension { - HeaderExtension(RTPExtensionType extension_type) + explicit HeaderExtension(RTPExtensionType extension_type) : type(extension_type), length(0), active(true) { Init(); } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h index 3d4c09ab95..8e1a732b19 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h @@ -29,7 +29,7 @@ static const size_t kMaxHistoryCapacity = 9600; class RTPPacketHistory { public: - RTPPacketHistory(Clock* clock); + explicit RTPPacketHistory(Clock* clock); ~RTPPacketHistory(); void SetStorePacketsStatus(bool enable, uint16_t number_to_store); diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc index bdc05c6f7b..fb9b206cd1 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.cc @@ -170,7 +170,7 @@ bool RtpReceiverImpl::IncomingRtpPacket( int8_t first_payload_byte = payload_length > 0 ? payload[0] : 0; bool is_red = false; - if (CheckPayloadChanged(rtp_header, first_payload_byte, is_red, + if (CheckPayloadChanged(rtp_header, first_payload_byte, &is_red, &payload_specific) == -1) { if (payload_length == 0) { // OK, keep-alive packet. @@ -320,7 +320,7 @@ void RtpReceiverImpl::CheckSSRCChanged(const RTPHeader& rtp_header) { // last known payload). int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header, const int8_t first_payload_byte, - bool& is_red, + bool* is_red, PayloadUnion* specific_payload) { bool re_initialize_decoder = false; @@ -338,7 +338,7 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header, if (rtp_payload_registry_->red_payload_type() == payload_type) { // Get the real codec payload type. payload_type = first_payload_byte & 0x7f; - is_red = true; + *is_red = true; if (rtp_payload_registry_->red_payload_type() == payload_type) { // Invalid payload type, traced by caller. If we proceeded here, @@ -360,7 +360,7 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header, &should_discard_changes); if (should_discard_changes) { - is_red = false; + *is_red = false; return 0; } @@ -390,7 +390,7 @@ int32_t RtpReceiverImpl::CheckPayloadChanged(const RTPHeader& rtp_header, } } else { rtp_media_receiver_->GetLastMediaSpecificPayload(specific_payload); - is_red = false; + *is_red = false; } } // End critsect. diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h index 4ec35315d2..eaa07d98bb 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_impl.h @@ -71,7 +71,7 @@ class RtpReceiverImpl : public RtpReceiver { void CheckCSRC(const WebRtcRTPHeader& rtp_header); int32_t CheckPayloadChanged(const RTPHeader& rtp_header, const int8_t first_payload_byte, - bool& is_red, + bool* is_red, PayloadUnion* payload); Clock* clock_; diff --git a/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h b/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h index 0e0a34a4a4..0f7ad30e87 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_receiver_strategy.h @@ -95,7 +95,7 @@ class RTPReceiverStrategy { // Note: Implementations may call the callback for other reasons than calls // to ParseRtpPacket, for instance if the implementation somehow recovers a // packet. - RTPReceiverStrategy(RtpData* data_callback); + explicit RTPReceiverStrategy(RtpData* data_callback); rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; PayloadUnion last_payload_; diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc index 30b1b96d93..450eed698e 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc @@ -956,8 +956,8 @@ bool ModuleRtpRtcpImpl::UpdateRTCPReceiveInformationTimers() { } // Called from RTCPsender. -int32_t ModuleRtpRtcpImpl::BoundingSet(bool& tmmbr_owner, - TMMBRSet*& bounding_set) { +int32_t ModuleRtpRtcpImpl::BoundingSet(bool* tmmbr_owner, + TMMBRSet* bounding_set) { return rtcp_receiver_.BoundingSet(tmmbr_owner, bounding_set); } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h index 24cbbe4079..04e09c1217 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h @@ -295,7 +295,7 @@ class ModuleRtpRtcpImpl : public RtpRtcp { bool LastReceivedXrReferenceTimeInfo(RtcpReceiveTimeInfo* info) const; - virtual int32_t BoundingSet(bool& tmmbr_owner, TMMBRSet*& bounding_set_rec); + int32_t BoundingSet(bool* tmmbr_owner, TMMBRSet* bounding_set_rec); void BitrateSent(uint32_t* total_rate, uint32_t* video_rate, diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc index f975ededdc..405a78d8c5 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc @@ -97,7 +97,7 @@ class SendTransport : public Transport, class RtpRtcpModule : public RtcpPacketTypeCounterObserver { public: - RtpRtcpModule(SimulatedClock* clock) + explicit RtpRtcpModule(SimulatedClock* clock) : receive_statistics_(ReceiveStatistics::Create(clock)) { RtpRtcp::Configuration config; config.audio = false; diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc index 4e91a299bd..17fbbac791 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc @@ -326,11 +326,11 @@ int32_t RTPSender::RegisterPayload( return -1; } int32_t ret_val = 0; - RtpUtility::Payload* payload = NULL; + RtpUtility::Payload* payload = nullptr; if (audio_configured_) { // TODO(mflodman): Change to CreateAudioPayload and make static. ret_val = audio_->RegisterAudioPayload(payload_name, payload_number, - frequency, channels, rate, payload); + frequency, channels, rate, &payload); } else { payload = video_->CreateVideoPayload(payload_name, payload_number, rate); } @@ -455,7 +455,7 @@ int32_t RTPSender::CheckPayloadType(int8_t payload_type, } if (audio_configured_) { int8_t red_pl_type = -1; - if (audio_->RED(red_pl_type) == 0) { + if (audio_->RED(&red_pl_type) == 0) { // We have configured RED. if (red_pl_type == payload_type) { // And it's a match... @@ -1001,7 +1001,7 @@ bool RTPSender::IsFecPacket(const uint8_t* buffer, bool fec_enabled; uint8_t pt_red; uint8_t pt_fec; - video_->GenericFECStatus(fec_enabled, pt_red, pt_fec); + video_->GenericFECStatus(&fec_enabled, &pt_red, &pt_fec); return fec_enabled && header.payloadType == pt_red && buffer[header.headerLength] == pt_fec; @@ -1778,7 +1778,7 @@ int32_t RTPSender::RED(int8_t *payload_type) const { if (!audio_configured_) { return -1; } - return audio_->RED(*payload_type); + return audio_->RED(payload_type); } RtpVideoCodecTypes RTPSender::VideoCodecType() const { @@ -1804,7 +1804,7 @@ void RTPSender::GenericFECStatus(bool* enable, uint8_t* payload_type_red, uint8_t* payload_type_fec) const { RTC_DCHECK(!audio_configured_); - video_->GenericFECStatus(*enable, *payload_type_red, *payload_type_fec); + video_->GenericFECStatus(enable, payload_type_red, payload_type_fec); } int32_t RTPSender::SetFecParameters( diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc index 3bc861ccda..86407f9f40 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc @@ -68,7 +68,7 @@ int32_t RTPSenderAudio::RegisterAudioPayload( const uint32_t frequency, const uint8_t channels, const uint32_t rate, - RtpUtility::Payload*& payload) { + RtpUtility::Payload** payload) { if (RtpUtility::StringCompare(payloadName, "cn", 2)) { CriticalSectionScoped cs(_sendAudioCritsect.get()); // we can have multiple CNG payload types @@ -96,13 +96,13 @@ int32_t RTPSenderAudio::RegisterAudioPayload( return 0; // The default timestamp rate is 8000 Hz, but other rates may be defined. } - payload = new RtpUtility::Payload; - payload->typeSpecific.Audio.frequency = frequency; - payload->typeSpecific.Audio.channels = channels; - payload->typeSpecific.Audio.rate = rate; - payload->audio = true; - payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = '\0'; - strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1); + *payload = new RtpUtility::Payload; + (*payload)->typeSpecific.Audio.frequency = frequency; + (*payload)->typeSpecific.Audio.channels = channels; + (*payload)->typeSpecific.Audio.rate = rate; + (*payload)->audio = true; + (*payload)->name[RTP_PAYLOAD_NAME_SIZE - 1] = '\0'; + strncpy((*payload)->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1); return 0; } @@ -384,13 +384,13 @@ int32_t RTPSenderAudio::SetRED(int8_t payloadType) { } // Get payload type for Redundant Audio Data RFC 2198 -int32_t RTPSenderAudio::RED(int8_t& payloadType) const { +int32_t RTPSenderAudio::RED(int8_t* payloadType) const { CriticalSectionScoped cs(_sendAudioCritsect.get()); if (_REDPayloadType == -1) { // not configured return -1; } - payloadType = _REDPayloadType; + *payloadType = _REDPayloadType; return 0; } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h index 381bc13f97..a3cee5e707 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h @@ -31,7 +31,7 @@ class RTPSenderAudio : public DTMFqueue { uint32_t frequency, uint8_t channels, uint32_t rate, - RtpUtility::Payload*& payload); + RtpUtility::Payload** payload); int32_t SendAudio(FrameType frameType, int8_t payloadType, @@ -58,7 +58,7 @@ class RTPSenderAudio : public DTMFqueue { int32_t SetRED(int8_t payloadType); // Get payload type for Redundant Audio Data RFC 2198 - int32_t RED(int8_t& payloadType) const; + int32_t RED(int8_t* payloadType) const; protected: int32_t SendTelephoneEventPacket( diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc index 80967b2966..1ca7831ab2 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc @@ -1281,9 +1281,9 @@ TEST_F(RtpSenderAudioTest, CheckMarkerBitForTelephoneEvents) { // For Telephone events, payload is not added to the registered payload list, // it will register only the payload used for audio stream. // Registering the payload again for audio stream with different payload name. - strcpy(payload_name, "payload_name"); + const char kPayloadName[] = "payload_name"; ASSERT_EQ( - 0, rtp_sender_->RegisterPayload(payload_name, payload_type, 8000, 1, 0)); + 0, rtp_sender_->RegisterPayload(kPayloadName, payload_type, 8000, 1, 0)); int64_t capture_time_ms = fake_clock_.TimeInMilliseconds(); // DTMF event key=9, duration=500 and attenuationdB=10 rtp_sender_->SendTelephoneEvent(9, 500, 10); diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc index bec3623656..e4604f97c9 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -190,13 +190,13 @@ void RTPSenderVideo::SetGenericFECStatus(const bool enable, kFecMaskRandom; } -void RTPSenderVideo::GenericFECStatus(bool& enable, - uint8_t& payloadTypeRED, - uint8_t& payloadTypeFEC) const { +void RTPSenderVideo::GenericFECStatus(bool* enable, + uint8_t* payloadTypeRED, + uint8_t* payloadTypeFEC) const { CriticalSectionScoped cs(crit_.get()); - enable = fec_enabled_; - payloadTypeRED = red_payload_type_; - payloadTypeFEC = fec_payload_type_; + *enable = fec_enabled_; + *payloadTypeRED = red_payload_type_; + *payloadTypeFEC = fec_payload_type_; } size_t RTPSenderVideo::FECPacketOverhead() const { diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h index 465240e581..e59321ab93 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h +++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h @@ -67,9 +67,9 @@ class RTPSenderVideo { const uint8_t payloadTypeRED, const uint8_t payloadTypeFEC); - void GenericFECStatus(bool& enable, - uint8_t& payloadTypeRED, - uint8_t& payloadTypeFEC) const; + void GenericFECStatus(bool* enable, + uint8_t* payloadTypeRED, + uint8_t* payloadTypeFEC) const; void SetFecParameters(const FecProtectionParams* delta_params, const FecProtectionParams* key_params); |