Prepare to replace VideoLayerFrameId with int64_t.

Bug: webrtc:12206
Change-Id: I10bfdefbc95a79e0595956c1a0e688051da6d2b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207180
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33265}
This commit is contained in:
philipel
2021-02-15 13:31:29 +01:00
committed by Commit Bot
parent 563fbc1dc5
commit 9aa9b8dbbe
29 changed files with 233 additions and 271 deletions

View File

@ -58,7 +58,6 @@ class FrameBuffer {
// Insert a frame into the frame buffer. Returns the picture id
// of the last continuous frame or -1 if there is no continuous frame.
// TODO(philipel): Return a VideoLayerFrameId and not only the picture id.
int64_t InsertFrame(std::unique_ptr<EncodedFrame> frame);
// Get the next frame for decoding. Will return at latest after
@ -95,7 +94,7 @@ class FrameBuffer {
// Which other frames that have direct unfulfilled dependencies
// on this frame.
absl::InlinedVector<VideoLayerFrameId, 8> dependent_frames;
absl::InlinedVector<int64_t, 8> dependent_frames;
// A frame is continiuous if it has all its referenced/indirectly
// referenced frames.
@ -115,7 +114,7 @@ class FrameBuffer {
std::unique_ptr<EncodedFrame> frame;
};
using FrameMap = std::map<VideoLayerFrameId, FrameInfo>;
using FrameMap = std::map<int64_t, FrameInfo>;
// Check that the references of |frame| are valid.
bool ValidReferences(const EncodedFrame& frame) const;
@ -178,8 +177,7 @@ class FrameBuffer {
VCMJitterEstimator jitter_estimator_ RTC_GUARDED_BY(mutex_);
VCMTiming* const timing_ RTC_GUARDED_BY(mutex_);
VCMInterFrameDelay inter_frame_delay_ RTC_GUARDED_BY(mutex_);
absl::optional<VideoLayerFrameId> last_continuous_frame_
RTC_GUARDED_BY(mutex_);
absl::optional<int64_t> last_continuous_frame_ RTC_GUARDED_BY(mutex_);
std::vector<FrameMap::iterator> frames_to_decode_ RTC_GUARDED_BY(mutex_);
bool stopped_ RTC_GUARDED_BY(mutex_);
VCMVideoProtection protection_mode_ RTC_GUARDED_BY(mutex_);