Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1067)

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h

Issue 2067673004: Style cleanups in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix compilation Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
index 4bc0266b7d2c62287cc4b70035f548f0ed44d3e2..6d52c72c14a6a8aa97d6b56db58c94ad5dcb8b22 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_audio.h
@@ -21,33 +21,34 @@
#include "webrtc/typedefs.h"
namespace webrtc {
+
class RTPSenderAudio : public DTMFqueue {
public:
RTPSenderAudio(Clock* clock, RTPSender* rtpSender);
virtual ~RTPSenderAudio();
int32_t RegisterAudioPayload(const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- int8_t payloadType,
+ int8_t payload_type,
uint32_t frequency,
size_t channels,
uint32_t rate,
RtpUtility::Payload** payload);
- int32_t SendAudio(FrameType frameType,
- int8_t payloadType,
- uint32_t captureTimeStamp,
- const uint8_t* payloadData,
- size_t payloadSize,
+ int32_t SendAudio(FrameType frame_type,
+ int8_t payload_type,
+ uint32_t capture_timestamp,
+ const uint8_t* payload_data,
+ size_t payload_size,
const RTPFragmentationHeader* fragmentation);
// set audio packet size, used to determine when it's time to send a DTMF
// packet in silence (CNG)
- int32_t SetAudioPacketSize(uint16_t packetSizeSamples);
+ int32_t SetAudioPacketSize(uint16_t acket_size_samples_);
danilchap 2016/06/15 13:40:01 p
danilchap 2016/06/15 13:41:15 and remove _
Sergey Ulanov 2016/06/15 18:27:53 Done.
// Store the audio level in dBov for
// header-extension-for-audio-level-indication.
// Valid range is [0,100]. Actual value is negative.
- int32_t SetAudioLevel(uint8_t level_dBov);
+ int32_t SetAudioLevel(uint8_t level_dbov);
// Send a DTMF tone using RFC 2833 (4733)
int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level);
@@ -55,10 +56,10 @@ class RTPSenderAudio : public DTMFqueue {
int AudioFrequency() const;
// Set payload type for Redundant Audio Data RFC 2198
- int32_t SetRED(int8_t payloadType);
+ int32_t SetRED(int8_t payload_type);
// Get payload type for Redundant Audio Data RFC 2198
- int32_t RED(int8_t* payloadType) const;
+ int32_t RED(int8_t* payload_type) const;
protected:
int32_t SendTelephoneEventPacket(
@@ -68,42 +69,43 @@ class RTPSenderAudio : public DTMFqueue {
uint16_t duration,
bool markerBit); // set on first packet in talk burst
- bool MarkerBit(const FrameType frameType, const int8_t payloadType);
+ bool MarkerBit(const FrameType frame_type, const int8_t payload_type);
private:
- Clock* const _clock;
- RTPSender* const _rtpSender;
+ Clock* const clock_;
+ RTPSender* const rtp_sender_;
- rtc::CriticalSection _sendAudioCritsect;
+ rtc::CriticalSection send_audio_critsect_;
- uint16_t _packetSizeSamples GUARDED_BY(_sendAudioCritsect);
+ uint16_t packet_size_samples_ GUARDED_BY(send_audio_critsect_);
// DTMF
- bool _dtmfEventIsOn;
- bool _dtmfEventFirstPacketSent;
- int8_t _dtmfPayloadType GUARDED_BY(_sendAudioCritsect);
- uint32_t _dtmfTimestamp;
- uint8_t _dtmfKey;
- uint32_t _dtmfLengthSamples;
- uint8_t _dtmfLevel;
- int64_t _dtmfTimeLastSent;
- uint32_t _dtmfTimestampLastSent;
-
- int8_t _REDPayloadType GUARDED_BY(_sendAudioCritsect);
-
- // VAD detection, used for markerbit
- bool _inbandVADactive GUARDED_BY(_sendAudioCritsect);
- int8_t _cngNBPayloadType GUARDED_BY(_sendAudioCritsect);
- int8_t _cngWBPayloadType GUARDED_BY(_sendAudioCritsect);
- int8_t _cngSWBPayloadType GUARDED_BY(_sendAudioCritsect);
- int8_t _cngFBPayloadType GUARDED_BY(_sendAudioCritsect);
- int8_t _lastPayloadType GUARDED_BY(_sendAudioCritsect);
+ bool dtmf_event_is_on_;
+ bool dtmf_event_first_packet_sent_;
+ int8_t dtmf_payload_type_ GUARDED_BY(send_audio_critsect_);
+ uint32_t dtmf_timestamp_;
+ uint8_t dtmf_key_;
+ uint32_t dtmf_length_samples_;
+ uint8_t dtmf_level_;
+ int64_t dtmf_time_last_sent_;
+ uint32_t dtmf_timestamp_last_sent_;
+
+ int8_t red_payload_type_ GUARDED_BY(send_audio_critsect_);
+
+ // VAD detection, used for markerbit.
+ bool inband_vad_active_ GUARDED_BY(send_audio_critsect_);
+ int8_t cngnb_payload_type_ GUARDED_BY(send_audio_critsect_);
+ int8_t cngwb_payload_type_ GUARDED_BY(send_audio_critsect_);
+ int8_t cngswb_payload_type_ GUARDED_BY(send_audio_critsect_);
+ int8_t cngfb_payload_type_ GUARDED_BY(send_audio_critsect_);
+ int8_t last_payload_type_ GUARDED_BY(send_audio_critsect_);
// Audio level indication
// (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/)
- uint8_t _audioLevel_dBov GUARDED_BY(_sendAudioCritsect);
+ uint8_t audio_level_dbov_ GUARDED_BY(send_audio_critsect_);
OneTimeEvent first_packet_sent_;
};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_AUDIO_H_

Powered by Google App Engine
This is Rietveld 408576698