forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vp9_reference_frame_vector.h
39 lines (27 loc) · 1018 Bytes
/
vp9_reference_frame_vector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_VP9_REFERENCE_FRAME_VECTOR_H_
#define MEDIA_GPU_VP9_REFERENCE_FRAME_VECTOR_H_
#include <array>
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "media/filters/vp9_parser.h"
namespace media {
class VP9Picture;
// This class encapsulates VP9-specific reference frame management code. This
// class is thread afine.
class Vp9ReferenceFrameVector {
public:
Vp9ReferenceFrameVector();
~Vp9ReferenceFrameVector();
void Refresh(scoped_refptr<VP9Picture> pic);
void Clear();
scoped_refptr<VP9Picture> GetFrame(size_t index) const;
private:
std::array<scoped_refptr<VP9Picture>, kVp9NumRefFrames> reference_frames_;
SEQUENCE_CHECKER(sequence_checker_);
DISALLOW_COPY_AND_ASSIGN(Vp9ReferenceFrameVector);
};
} // namespace media
#endif // MEDIA_GPU_VP9_REFERENCE_FRAME_VECTOR_H_