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

Unified Diff: webrtc/modules/video_coding/packet_buffer.h

Issue 2926083002: Only create H264 frames if there are no gaps in the packet sequence number. (Closed)
Patch Set: Created 3 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/video_coding/packet_buffer.h
diff --git a/webrtc/modules/video_coding/packet_buffer.h b/webrtc/modules/video_coding/packet_buffer.h
index 3d9eb9cb421515aeb4a8f48b13cecf8699b2817a..1018ac468a1049463b5edc7688823ac7d56dadef 100644
--- a/webrtc/modules/video_coding/packet_buffer.h
+++ b/webrtc/modules/video_coding/packet_buffer.h
@@ -11,8 +11,9 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_
#define WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_
-#include <vector>
#include <memory>
+#include <set>
+#include <vector>
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ref_ptr.h"
@@ -54,6 +55,7 @@ class PacketBuffer {
virtual bool InsertPacket(VCMPacket* packet);
void ClearTo(uint16_t seq_num);
void Clear();
+ void PaddingReceived(uint16_t seq_num);
stefan-webrtc 2017/06/07 11:39:17 It can probably be discussed how important this is
philipel 2017/06/07 14:04:35 I think we should make a PSA that only media packe
// Timestamp (not RTP timestamp) of the last received packet/keyframe packet.
rtc::Optional<int64_t> LastReceivedPacketMs() const;
@@ -121,6 +123,8 @@ class PacketBuffer {
// Virtual for testing.
virtual void ReturnFrame(RtpFrameObject* frame);
+ void UpdateMissingPackets(uint16_t seq_num) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
rtc::CriticalSection crit_;
// Buffer size_ and max_size_ must always be a power of two.
@@ -150,6 +154,10 @@ class PacketBuffer {
rtc::Optional<int64_t> last_received_packet_ms_ GUARDED_BY(crit_);
rtc::Optional<int64_t> last_received_keyframe_packet_ms_ GUARDED_BY(crit_);
+ rtc::Optional<uint16_t> last_inserted_seq_num_ GUARDED_BY(crit_);
+ std::set<uint16_t, DescendingSeqNumComp<uint16_t>> missing_packets_
+ GUARDED_BY(crit_);
+
mutable volatile int ref_count_ = 0;
};
« no previous file with comments | « no previous file | webrtc/modules/video_coding/packet_buffer.cc » ('j') | webrtc/modules/video_coding/packet_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698