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

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

Issue 2766323006: Correcting the amount of padding when send side bwe includes RTP overhead.
Patch Set: fixing Created 3 years, 8 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_packet_history.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
index dc2b35a375511d226ebd9af0df64809531b16d03..01b8b59403b16b5ba9491f8f8811522bc38bdfdb 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
@@ -49,8 +49,19 @@ class RtpPacketHistory {
int64_t min_elapsed_time_ms,
bool retransmit);
+ // Gets the packet, of which the size is closest to |packet_size|.
std::unique_ptr<RtpPacketToSend> GetBestFittingPacket(
- size_t packet_size) const;
+ size_t packet_size) const {
+ return GetBestFittingPacket(packet_size, true);
+ }
+
+ // Gets the best fitting packet. When |include_header| is true, it gets the
+ // packet of which the total size is closest to |packet_size|, otherwise, it
+ // fits the payload size.
+ // TODO(minyue): Remove this method when we start to always include header.
+ std::unique_ptr<RtpPacketToSend> GetBestFittingPacket(
+ size_t packet_size,
+ bool include_header) const;
bool HasRtpPacket(uint16_t sequence_number) const;
@@ -70,7 +81,7 @@ class RtpPacketHistory {
void Free() EXCLUSIVE_LOCKS_REQUIRED(critsect_);
bool FindSeqNum(uint16_t sequence_number, int* index) const
EXCLUSIVE_LOCKS_REQUIRED(critsect_);
- int FindBestFittingPacket(size_t size) const
+ int FindBestFittingPacket(size_t size, bool include_header) const
EXCLUSIVE_LOCKS_REQUIRED(critsect_);
Clock* clock_;
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc » ('j') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698