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

Unified Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp.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/include/rtp_rtcp.h
diff --git a/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h b/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h
index 7c72e5917c8ab2feb8acdac1c119cd3e25b8b5c6..a6c349a8c90578501e705dd62682fb5f4f465e76 100644
--- a/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h
+++ b/webrtc/modules/rtp_rtcp/include/rtp_rtcp.h
@@ -40,45 +40,47 @@ class RtpRtcp : public Module {
struct Configuration {
Configuration();
- /* id - Unique identifier of this RTP/RTCP module object
- * audio - True for a audio version of the RTP/RTCP module
- * object false will create a video version
- * clock - The clock to use to read time. If NULL object
- * will be using the system clock.
- * incoming_data - Callback object that will receive the incoming
- * data. May not be NULL; default callback will do
- * nothing.
- * incoming_messages - Callback object that will receive the incoming
- * RTP messages. May not be NULL; default callback
- * will do nothing.
- * outgoing_transport - Transport object that will be called when packets
- * are ready to be sent out on the network
- * intra_frame_callback - Called when the receiver request a intra frame.
- * bandwidth_callback - Called when we receive a changed estimate from
- * the receiver of out stream.
- * remote_bitrate_estimator - Estimates the bandwidth available for a set of
- * streams from the same client.
- * paced_sender - Spread any bursts of packets into smaller
- * bursts to minimize packet loss.
- */
- bool audio;
- bool receiver_only;
- Clock* clock;
+ // True for a audio version of the RTP/RTCP module object false will create
+ // a video version.
+ bool audio = false;
+ bool receiver_only = false;
+
+ // The clock to use to read time. If nullptr then system clock will be used.
+ Clock* clock = nullptr;
+
ReceiveStatistics* receive_statistics;
- Transport* outgoing_transport;
- RtcpIntraFrameObserver* intra_frame_callback;
- RtcpBandwidthObserver* bandwidth_callback;
- TransportFeedbackObserver* transport_feedback_callback;
- RtcpRttStats* rtt_stats;
- RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer;
- RemoteBitrateEstimator* remote_bitrate_estimator;
- RtpPacketSender* paced_sender;
- TransportSequenceNumberAllocator* transport_sequence_number_allocator;
- BitrateStatisticsObserver* send_bitrate_observer;
- FrameCountObserver* send_frame_count_observer;
- SendSideDelayObserver* send_side_delay_observer;
- RtcEventLog* event_log;
- SendPacketObserver* send_packet_observer;
+
+ // Transport object that will be called when packets are ready to be sent
+ // out on the network.
+ Transport* outgoing_transport = nullptr;
+
+ // Called when the receiver request a intra frame.
+ RtcpIntraFrameObserver* intra_frame_callback = nullptr;
+
+ // Called when we receive a changed estimate from the receiver of out
+ // stream.
+ RtcpBandwidthObserver* bandwidth_callback = nullptr;
+
+ TransportFeedbackObserver* transport_feedback_callback = nullptr;
+ RtcpRttStats* rtt_stats = nullptr;
+ RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer = nullptr;
+
+ // Estimates the bandwidth available for a set of streams from the same
+ // client.
+ RemoteBitrateEstimator* remote_bitrate_estimator = nullptr;
+
+ // Spread any bursts of packets into smaller bursts to minimize packet loss.
+ RtpPacketSender* paced_sender = nullptr;
+
+ TransportSequenceNumberAllocator* transport_sequence_number_allocator =
+ nullptr;
+ BitrateStatisticsObserver* send_bitrate_observer = nullptr;
+ FrameCountObserver* send_frame_count_observer = nullptr;
+ SendSideDelayObserver* send_side_delay_observer = nullptr;
+ RtcEventLog* event_log = nullptr;
+ SendPacketObserver* send_packet_observer = nullptr;
+
+ private:
RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
};
@@ -173,11 +175,11 @@ class RtpRtcp : public Module {
/*
* Unregister a send payload
*
- * payloadType - payload type of codec
+ * payload_type - payload type of codec
*
* return -1 on failure else 0
*/
- virtual int32_t DeRegisterSendPayload(int8_t payloadType) = 0;
+ virtual int32_t DeRegisterSendPayload(int8_t payload_type) = 0;
/*
* (De)register RTP header extension type and id.
@@ -292,23 +294,23 @@ class RtpRtcp : public Module {
* Used by the codec module to deliver a video or audio frame for
* packetization.
*
- * frameType - type of frame to send
- * payloadType - payload type of frame to send
+ * frame_type - type of frame to send
+ * payload_type - payload type of frame to send
* timestamp - timestamp of frame to send
- * payloadData - payload buffer of frame to send
- * payloadSize - size of payload buffer to send
+ * payload_data - payload buffer of frame to send
+ * payload_size - size of payload buffer to send
* fragmentation - fragmentation offset data for fragmented frames such
* as layers or RED
*
* return -1 on failure else 0
*/
virtual int32_t SendOutgoingData(
- FrameType frameType,
- int8_t payloadType,
+ FrameType frame_type,
+ int8_t payload_type,
uint32_t timeStamp,
int64_t capture_time_ms,
- const uint8_t* payloadData,
- size_t payloadSize,
+ const uint8_t* payload_data,
+ size_t payload_size,
const RTPFragmentationHeader* fragmentation = NULL,
const RTPVideoHeader* rtpVideoHdr = NULL) = 0;
@@ -356,7 +358,7 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t RemoteCNAME(uint32_t remoteSSRC,
+ virtual int32_t RemoteCNAME(uint32_t remote_ssrc,
char cName[RTCP_CNAME_SIZE]) const = 0;
/*
@@ -390,11 +392,11 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t RTT(uint32_t remoteSSRC,
- int64_t* RTT,
- int64_t* avgRTT,
- int64_t* minRTT,
- int64_t* maxRTT) const = 0;
+ virtual int32_t RTT(uint32_t remote_ssrc,
+ int64_t* rtt,
+ int64_t* avg_rtt,
+ int64_t* min_rtt,
+ int64_t* max_rtt) const = 0;
/*
* Force a send of a RTCP packet
@@ -402,7 +404,7 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t SendRTCP(RTCPPacketType rtcpPacketType) = 0;
+ virtual int32_t SendRTCP(RTCPPacketType rtcp_packet_type) = 0;
/*
* Force a send of a RTCP packet with more than one packet type.
@@ -411,7 +413,7 @@ class RtpRtcp : public Module {
* return -1 on failure else 0
*/
virtual int32_t SendCompoundRTCP(
- const std::set<RTCPPacketType>& rtcpPacketTypes) = 0;
+ const std::set<RTCPPacketType>& rtcp_packet_types) = 0;
/*
* Good state of RTP receiver inform sender
@@ -453,7 +455,7 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t RemoteRTCPStat(RTCPSenderInfo* senderInfo) = 0;
+ virtual int32_t RemoteRTCPStat(RTCPSenderInfo* sender_info) = 0;
/*
* Get received RTCP report block
@@ -461,14 +463,14 @@ class RtpRtcp : public Module {
* return -1 on failure else 0
*/
virtual int32_t RemoteRTCPStat(
- std::vector<RTCPReportBlock>* receiveBlocks) const = 0;
+ std::vector<RTCPReportBlock>* receive_blocks) const = 0;
/*
* (APP) Application specific data
*
* return -1 on failure else 0
*/
- virtual int32_t SetRTCPApplicationSpecificData(uint8_t subType,
+ virtual int32_t SetRTCPApplicationSpecificData(uint8_t sub_type,
uint32_t name,
const uint8_t* data,
uint16_t length) = 0;
@@ -536,7 +538,7 @@ class RtpRtcp : public Module {
// TODO(philipel): Deprecate this and start using SendNack instead,
// mostly because we want a function that actually send
// NACK for the specified packets.
- virtual int32_t SendNACK(const uint16_t* nackList, uint16_t size) = 0;
+ virtual int32_t SendNACK(const uint16_t* nack_list, uint16_t size) = 0;
/*
* Send NACK for the packets specified.
@@ -575,7 +577,7 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t SetAudioPacketSize(uint16_t packetSizeSamples) = 0;
+ virtual int32_t SetAudioPacketSize(uint16_t packet_size_samples) = 0;
/*
* Send a TelephoneEvent tone using RFC 2833 (4733)
@@ -591,7 +593,7 @@ class RtpRtcp : public Module {
*
* return -1 on failure else 0
*/
- virtual int32_t SetSendREDPayloadType(int8_t payloadType) = 0;
+ virtual int32_t SetSendREDPayloadType(int8_t payload_type) = 0;
/*
* Get payload type for Redundant Audio Data RFC 2198

Powered by Google App Engine
This is Rietveld 408576698