Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1760)

Unified Diff: content/common/gpu/media/h264_dpb.h

Issue 1040513003: VAVDA: Use the new, generic video decoder and accelerator infrastructure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/media/h264_dpb.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/h264_dpb.h
diff --git a/content/common/gpu/media/h264_dpb.h b/content/common/gpu/media/h264_dpb.h
index a46e681371d216ca72f79a0a63d8fccdaa668a00..67330d944c76ff8b69c0bb550d5254cabc7bb25d 100644
--- a/content/common/gpu/media/h264_dpb.h
+++ b/content/common/gpu/media/h264_dpb.h
@@ -17,17 +17,24 @@
namespace content {
class V4L2H264Picture;
+class VaapiH264Picture;
// A picture (a frame or a field) in the H.264 spec sense.
// See spec at http://www.itu.int/rec/T-REC-H.264
-struct H264PictureBase {
+class H264Picture : public base::RefCounted<H264Picture> {
+ public:
+ using Vector = std::vector<scoped_refptr<H264Picture>>;
+
enum Field {
FIELD_NONE,
FIELD_TOP,
FIELD_BOTTOM,
};
- H264PictureBase();
+ H264Picture();
+
+ virtual V4L2H264Picture* AsV4L2H264Picture();
+ virtual VaapiH264Picture* AsVaapiH264Picture();
// Values calculated per H.264 specification or taken from slice header.
// See spec for more details on each (some names have been converted from
@@ -65,21 +72,12 @@ struct H264PictureBase {
// Position in DPB (i.e. index in DPB).
int dpb_position;
-};
-
-class H264Picture : public H264PictureBase,
- public base::RefCounted<H264Picture> {
- public:
- H264Picture();
-
- virtual V4L2H264Picture* AsV4L2H264Picture();
-
- using Vector = std::vector<scoped_refptr<H264Picture>>;
protected:
friend class base::RefCounted<H264Picture>;
virtual ~H264Picture();
+ private:
DISALLOW_COPY_AND_ASSIGN(H264Picture);
};
@@ -139,8 +137,12 @@ class H264DPB {
H264Picture::Vector::iterator end() { return pics_.end(); }
H264Picture::Vector::const_iterator begin() const { return pics_.begin(); }
H264Picture::Vector::const_iterator end() const { return pics_.end(); }
- H264Picture::Vector::reverse_iterator rbegin() { return pics_.rbegin(); }
- H264Picture::Vector::reverse_iterator rend() { return pics_.rend(); }
+ H264Picture::Vector::const_reverse_iterator rbegin() const {
+ return pics_.rbegin();
+ }
+ H264Picture::Vector::const_reverse_iterator rend() const {
+ return pics_.rend();
+ }
size_t size() const { return pics_.size(); }
bool IsFull() const { return pics_.size() == max_num_pics_; }
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/media/h264_dpb.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698