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:
@ -27,23 +27,23 @@ class DecodedFramesHistory {
|
||||
// window_size - how much frames back to the past are actually remembered.
|
||||
explicit DecodedFramesHistory(size_t window_size);
|
||||
~DecodedFramesHistory();
|
||||
// Called for each decoded frame. Assumes picture id's are non-decreasing.
|
||||
void InsertDecoded(const VideoLayerFrameId& frameid, uint32_t timestamp);
|
||||
// Query if the following (picture_id, spatial_id) pair was inserted before.
|
||||
// Should be at most less by window_size-1 than the last inserted picture id.
|
||||
bool WasDecoded(const VideoLayerFrameId& frameid);
|
||||
// Called for each decoded frame. Assumes frame id's are non-decreasing.
|
||||
void InsertDecoded(int64_t frame_id, uint32_t timestamp);
|
||||
// Query if the following (frame_id, spatial_id) pair was inserted before.
|
||||
// Should be at most less by window_size-1 than the last inserted frame id.
|
||||
bool WasDecoded(int64_t frame_id);
|
||||
|
||||
void Clear();
|
||||
|
||||
absl::optional<VideoLayerFrameId> GetLastDecodedFrameId();
|
||||
absl::optional<int64_t> GetLastDecodedFrameId();
|
||||
absl::optional<uint32_t> GetLastDecodedFrameTimestamp();
|
||||
|
||||
private:
|
||||
int PictureIdToIndex(int64_t frame_id) const;
|
||||
int FrameIdToIndex(int64_t frame_id) const;
|
||||
|
||||
std::vector<bool> buffer_;
|
||||
absl::optional<int64_t> last_picture_id_;
|
||||
absl::optional<VideoLayerFrameId> last_decoded_frame_;
|
||||
absl::optional<int64_t> last_frame_id_;
|
||||
absl::optional<int64_t> last_decoded_frame_;
|
||||
absl::optional<uint32_t> last_decoded_frame_timestamp_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user