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

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

Issue 1340573002: Refactor RTPPacketHistory to use a packet struct. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove max packet size as a parameter Created 5 years, 3 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 212aa212669457b9e11796d469f4cd77be0128d0..4a99e16977f204b78ca5e44482bd7c0b77af9e32 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.h
@@ -39,7 +39,6 @@ class RTPPacketHistory {
// Stores RTP packet.
int32_t PutRTPPacket(const uint8_t* packet,
size_t packet_length,
- size_t max_packet_length,
int64_t capture_time_ms,
StorageType type);
@@ -88,14 +87,18 @@ class RTPPacketHistory {
rtc::scoped_ptr<CriticalSectionWrapper> critsect_;
bool store_ GUARDED_BY(critsect_);
uint32_t prev_index_ GUARDED_BY(critsect_);
- size_t max_packet_length_ GUARDED_BY(critsect_);
-
- std::vector<std::vector<uint8_t> > stored_packets_ GUARDED_BY(critsect_);
- std::vector<uint16_t> stored_seq_nums_ GUARDED_BY(critsect_);
- std::vector<size_t> stored_lengths_ GUARDED_BY(critsect_);
- std::vector<int64_t> stored_times_ GUARDED_BY(critsect_);
- std::vector<int64_t> stored_send_times_ GUARDED_BY(critsect_);
- std::vector<StorageType> stored_types_ GUARDED_BY(critsect_);
+
+ struct StoredPacket {
+ StoredPacket();
+ uint16_t sequence_number = 0;
+ int64_t time_ms = 0;
+ int64_t send_time = 0;
+ StorageType storage_type = kDontStore;
+
+ uint8_t data[IP_PACKET_SIZE];
+ size_t length = 0;
+ };
+ std::vector<StoredPacket> stored_packets_ GUARDED_BY(critsect_);
};
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_RTP_PACKET_HISTORY_H_
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698