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

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

Issue 2067673004: Style cleanups in RtpSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 5 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_video.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
index 7ce889b83c68c683e50e51957b5da6922ec11b24..682b6db9b7753f12667a807a9b663f393114df9d 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
@@ -31,7 +31,7 @@ namespace webrtc {
class RTPSenderVideo {
public:
- RTPSenderVideo(Clock* clock, RTPSenderInterface* rtpSender);
+ RTPSenderVideo(Clock* clock, RTPSenderInterface* rtp_sender);
virtual ~RTPSenderVideo();
virtual RtpVideoCodecTypes VideoCodecType() const;
@@ -39,16 +39,16 @@ class RTPSenderVideo {
size_t FECPacketOverhead() const;
static RtpUtility::Payload* CreateVideoPayload(
- const char payloadName[RTP_PAYLOAD_NAME_SIZE],
- const int8_t payloadType);
+ const char payload_name[RTP_PAYLOAD_NAME_SIZE],
+ int8_t payload_type);
- int32_t SendVideo(const RtpVideoCodecTypes videoType,
- const FrameType frameType,
- const int8_t payloadType,
- const uint32_t captureTimeStamp,
+ int32_t SendVideo(RtpVideoCodecTypes video_type,
+ FrameType frame_type,
+ int8_t payload_type,
+ uint32_t capture_timestamp,
int64_t capture_time_ms,
- const uint8_t* payloadData,
- const size_t payloadSize,
+ const uint8_t* payload_data,
+ size_t payload_size,
const RTPFragmentationHeader* fragmentation,
const RTPVideoHeader* video_header);
@@ -57,13 +57,13 @@ class RTPSenderVideo {
void SetVideoCodecType(RtpVideoCodecTypes type);
// FEC
- void SetGenericFECStatus(const bool enable,
- const uint8_t payloadTypeRED,
- const uint8_t payloadTypeFEC);
+ void SetGenericFECStatus(bool enable,
+ uint8_t payload_type_red,
+ uint8_t payload_type_fec);
void GenericFECStatus(bool* enable,
- uint8_t* payloadTypeRED,
- uint8_t* payloadTypeFEC) const;
+ uint8_t* payload_type_red,
+ uint8_t* payload_type_fec) const;
void SetFecParameters(const FecProtectionParams* delta_params,
const FecProtectionParams* key_params);
@@ -75,39 +75,41 @@ class RTPSenderVideo {
void SetSelectiveRetransmissions(uint8_t settings);
private:
- void SendVideoPacket(uint8_t* dataBuffer,
- const size_t payloadLength,
- const size_t rtpHeaderLength,
+ void SendVideoPacket(uint8_t* data_buffer,
+ size_t payload_length,
+ size_t rtp_header_length,
uint16_t seq_num,
- const uint32_t capture_timestamp,
+ uint32_t capture_timestamp,
int64_t capture_time_ms,
StorageType storage);
- void SendVideoPacketAsRed(uint8_t* dataBuffer,
- const size_t payloadLength,
- const size_t rtpHeaderLength,
+ void SendVideoPacketAsRed(uint8_t* data_buffer,
+ size_t payload_length,
+ size_t rtp_header_length,
uint16_t video_seq_num,
- const uint32_t capture_timestamp,
+ uint32_t capture_timestamp,
int64_t capture_time_ms,
StorageType media_packet_storage,
bool protect);
- RTPSenderInterface& _rtpSender;
+ RTPSenderInterface* const rtp_sender_;
Clock* const clock_;
// Should never be held when calling out of this class.
rtc::CriticalSection crit_;
- RtpVideoCodecTypes _videoType;
- int32_t _retransmissionSettings GUARDED_BY(crit_);
+ RtpVideoCodecTypes video_type_ = kRtpVideoGeneric;
+ int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer;
// FEC
ForwardErrorCorrection fec_;
- bool fec_enabled_ GUARDED_BY(crit_);
- int8_t red_payload_type_ GUARDED_BY(crit_);
- int8_t fec_payload_type_ GUARDED_BY(crit_);
- FecProtectionParams delta_fec_params_ GUARDED_BY(crit_);
- FecProtectionParams key_fec_params_ GUARDED_BY(crit_);
+ bool fec_enabled_ GUARDED_BY(crit_) = false;
+ int8_t red_payload_type_ GUARDED_BY(crit_) = 0;
+ int8_t fec_payload_type_ GUARDED_BY(crit_) = 0;
+ FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{
+ 0, 1, kFecMaskRandom};
+ FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{
+ 0, 1, kFecMaskRandom};
ProducerFec producer_fec_ GUARDED_BY(crit_);
rtc::CriticalSection stats_crit_;
@@ -118,6 +120,7 @@ class RTPSenderVideo {
RateStatistics video_bitrate_ GUARDED_BY(stats_crit_);
OneTimeEvent first_frame_sent_;
};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698