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

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

Issue 1945773002: RtpPacketHistory rewritten to use RtpPacket class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.h b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
index f501d27a723c62f745b3120d76e7e338734e1da0..e8334e5b60b2406940308acbc79d8144b59b743b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.h
@@ -33,9 +33,10 @@
namespace webrtc {
+class RtcEventLog;
+class RtpPacketToSend;
class RTPSenderAudio;
class RTPSenderVideo;
-class RtcEventLog;
class RTPSenderInterface {
public:
@@ -255,12 +256,16 @@ class RTPSender : public RTPSenderInterface {
uint32_t Timestamp() const override;
uint32_t SSRC() const override;
+ // Deprecated. Create RtpPacketToSend instead and use next function.
int32_t SendToNetwork(uint8_t* data_buffer,
size_t payload_length,
size_t rtp_header_length,
int64_t capture_time_ms,
StorageType storage,
RtpPacketSender::Priority priority) override;
+ bool SendToNetwork(std::unique_ptr<RtpPacketToSend> packet,
+ StorageType storage,
+ RtpPacketSender::Priority priority);
// Audio.
@@ -333,9 +338,7 @@ class RTPSender : public RTPSenderInterface {
void UpdateNACKBitRate(uint32_t bytes, int64_t now);
- bool PrepareAndSendPacket(uint8_t* buffer,
- size_t length,
- int64_t capture_time_ms,
+ bool PrepareAndSendPacket(std::unique_ptr<RtpPacketToSend> packet,
bool send_over_rtx,
bool is_retransmit);
@@ -343,15 +346,10 @@ class RTPSender : public RTPSenderInterface {
// return a larger value that their argument.
size_t TrySendRedundantPayloads(size_t bytes);
- void BuildPaddingPacket(uint8_t* packet,
- size_t header_length,
- size_t padding_length);
-
- void BuildRtxPacket(uint8_t* buffer, size_t* length,
- uint8_t* buffer_rtx);
+ std::unique_ptr<RtpPacketToSend> BuildRtxPacket(
+ const RtpPacketToSend& packet);
- bool SendPacketToNetwork(const uint8_t* packet,
- size_t size,
+ bool SendPacketToNetwork(const RtpPacketToSend& packet,
const PacketOptions& options);
void UpdateDelayStatistics(int64_t capture_time_ms, int64_t now_ms);
@@ -367,28 +365,12 @@ class RTPSender : public RTPSenderInterface {
const RTPHeader& rtp_header,
size_t* position) const;
- void UpdateTransmissionTimeOffset(uint8_t* rtp_packet,
- size_t rtp_packet_length,
- const RTPHeader& rtp_header,
- int64_t time_diff_ms) const;
- void UpdateAbsoluteSendTime(uint8_t* rtp_packet,
- size_t rtp_packet_length,
- const RTPHeader& rtp_header,
- int64_t now_ms) const;
-
- bool UpdateTransportSequenceNumber(uint16_t sequence_number,
- uint8_t* rtp_packet,
- size_t rtp_packet_length,
- const RTPHeader& rtp_header) const;
-
bool AllocateTransportSequenceNumber(int* packet_id) const;
- void UpdateRtpStats(const uint8_t* buffer,
- size_t packet_length,
- const RTPHeader& header,
+ void UpdateRtpStats(const RtpPacketToSend& packet,
bool is_rtx,
bool is_retransmit);
- bool IsFecPacket(const uint8_t* buffer, const RTPHeader& header) const;
+ bool IsFecPacket(const RtpPacketToSend& packet) const;
class BitrateAggregator {
public:
@@ -459,7 +441,7 @@ class RTPSender : public RTPSenderInterface {
size_t nack_byte_count_[NACK_BYTECOUNT_SIZE];
Bitrate nack_bitrate_;
- RTPPacketHistory packet_history_;
+ RtpPacketHistory packet_history_;
// Statistics
rtc::CriticalSection statistics_crit_;

Powered by Google App Engine
This is Rietveld 408576698