Make FrameBuffer support an unlimited number of dependents per frame

Bug: webrtc:10190
Change-Id: I59680ec0dc05bc77dcbef50ddbb83ce2bcd91f7e
Reviewed-on: https://webrtc-review.googlesource.com/c/116788
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26196}
This commit is contained in:
Elad Alon
2019-01-10 15:02:54 +01:00
committed by Commit Bot
parent 977cd17316
commit 69321ddfb5
3 changed files with 6 additions and 24 deletions

View File

@ -17,6 +17,7 @@
#include <utility>
#include <vector>
#include "absl/container/inlined_vector.h"
#include "api/video/encoded_frame.h"
#include "modules/video_coding/include/video_coding_defines.h"
#include "modules/video_coding/inter_frame_delay.h"
@ -89,15 +90,9 @@ class FrameBuffer {
FrameInfo(FrameInfo&&);
~FrameInfo();
// The maximum number of frames that can depend on this frame.
static constexpr size_t kMaxNumDependentFrames = 8;
// Which other frames that have direct unfulfilled dependencies
// on this frame.
// TODO(philipel): Add simple modify/access functions to prevent adding too
// many |dependent_frames|.
VideoLayerFrameId dependent_frames[kMaxNumDependentFrames];
size_t num_dependent_frames = 0;
absl::InlinedVector<VideoLayerFrameId, 8> dependent_frames;
// A frame is continiuous if it has all its referenced/indirectly
// referenced frames.