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

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

Issue 1903523003: Convert Vp9 Rtp headers to frame references. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comments. Created 4 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/video_coding/packet_buffer.h
diff --git a/webrtc/modules/video_coding/packet_buffer.h b/webrtc/modules/video_coding/packet_buffer.h
index caa81f6b99e99f8400298dbc70558676ddcb2606..37fdab7ef1c5bbe399542ddb39ecbdcf4dfadc1b 100644
--- a/webrtc/modules/video_coding/packet_buffer.h
+++ b/webrtc/modules/video_coding/packet_buffer.h
@@ -12,6 +12,7 @@
#define WEBRTC_MODULES_VIDEO_CODING_PACKET_BUFFER_H_
#include <array>
+#include <utility>
#include <vector>
#include <map>
#include <set>
@@ -20,6 +21,7 @@
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
+#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/video_coding/packet.h"
#include "webrtc/modules/video_coding/sequence_number_util.h"
@@ -52,6 +54,7 @@ class PacketBuffer {
static const int kMaxStashedFrames = 10;
static const int kMaxLayerInfo = 10;
static const int kMaxNotYetReceivedFrames = 20;
+ static const int kMaxGofSaved = 5;
stefan-webrtc 2016/04/26 08:15:12 This constant seems to only be used in the .cc fil
stefan-webrtc 2016/04/26 08:15:12 I wonder if 5 GOFs will actually be enough... It c
philipel 2016/04/28 09:40:42 Increased to 15.
philipel 2016/04/28 09:40:42 This is used on line 193 in the .h file.
friend RtpFrameObject;
// Since we want the packet buffer to be as packet type agnostic
@@ -115,6 +118,15 @@ class PacketBuffer {
void CompletedFrameVp8(std::unique_ptr<RtpFrameObject> frame)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ // Find references for Vp9 frames
+ void ManageFrameVp9(std::unique_ptr<RtpFrameObject> frame)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
+ // Unwrap the picture id and the frame references and then call the
+ // |frame_callback| callback with the completed frame.
+ void CompletedFrameVp9(std::unique_ptr<RtpFrameObject> frame)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
+
// All picture ids are unwrapped to 16 bits.
uint16_t UnwrapPictureId(uint16_t picture_id)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
@@ -172,6 +184,19 @@ class PacketBuffer {
std::map<uint8_t,
std::array<int16_t, kMaxTemporalLayer>,
DescendingSeqNumComp<uint8_t>> layer_info_ GUARDED_BY(crit_);
+
+ // Where the current scalability structure is in the
+ // |scalability_structures_| array.
+ uint8_t current_ss_idx_;
+
+ // Holds received scalability structures.
+ std::array<GofInfoVP9, kMaxGofSaved>
+ scalability_structures_ GUARDED_BY(crit_);
+
+ // Holds the picture id and the Gof information for a given TL0 picture index.
+ std::map<uint8_t,
+ std::pair<uint16_t, GofInfoVP9*>,
+ DescendingSeqNumComp<uint8_t>> gof_info_ GUARDED_BY(crit_);
};
} // namespace video_coding

Powered by Google App Engine
This is Rietveld 408576698