Moved FrameKey to api/video/encoded_frame.h and renamed it to VideoLayerFrameId.
Since we want the VideoStreamDecoder to callback with the last continuous frame we need to move the FrameKey into the public API. Bug: webrtc:8909 Change-Id: I39634145d848b8163778e31a1e0d04d91f9bbeb8 Reviewed-on: https://webrtc-review.googlesource.com/60864 Commit-Queue: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22495}
This commit is contained in:
@ -78,23 +78,6 @@ class FrameBuffer {
|
||||
void UpdateRtt(int64_t rtt_ms);
|
||||
|
||||
private:
|
||||
struct FrameKey {
|
||||
FrameKey() : picture_id(-1), spatial_layer(0) {}
|
||||
FrameKey(int64_t picture_id, uint8_t spatial_layer)
|
||||
: picture_id(picture_id), spatial_layer(spatial_layer) {}
|
||||
|
||||
bool operator<(const FrameKey& rhs) const {
|
||||
if (picture_id == rhs.picture_id)
|
||||
return spatial_layer < rhs.spatial_layer;
|
||||
return picture_id < rhs.picture_id;
|
||||
}
|
||||
|
||||
bool operator<=(const FrameKey& rhs) const { return !(rhs < *this); }
|
||||
|
||||
int64_t picture_id;
|
||||
uint8_t spatial_layer;
|
||||
};
|
||||
|
||||
struct FrameInfo {
|
||||
// The maximum number of frames that can depend on this frame.
|
||||
static constexpr size_t kMaxNumDependentFrames = 8;
|
||||
@ -103,7 +86,7 @@ class FrameBuffer {
|
||||
// on this frame.
|
||||
// TODO(philipel): Add simple modify/access functions to prevent adding too
|
||||
// many |dependent_frames|.
|
||||
FrameKey dependent_frames[kMaxNumDependentFrames];
|
||||
VideoLayerFrameId dependent_frames[kMaxNumDependentFrames];
|
||||
size_t num_dependent_frames = 0;
|
||||
|
||||
// A frame is continiuous if it has all its referenced/indirectly
|
||||
@ -124,7 +107,7 @@ class FrameBuffer {
|
||||
std::unique_ptr<EncodedFrame> frame;
|
||||
};
|
||||
|
||||
using FrameMap = std::map<FrameKey, FrameInfo>;
|
||||
using FrameMap = std::map<VideoLayerFrameId, FrameInfo>;
|
||||
|
||||
// Check that the references of |frame| are valid.
|
||||
bool ValidReferences(const EncodedFrame& frame) const;
|
||||
|
||||
Reference in New Issue
Block a user