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

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: Fix whitespace Created 5 years, 9 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
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..d7523d8932aff37e73fbb6c8060163360c8bb90d 100644
--- a/content/common/gpu/media/h264_dpb.h
+++ b/content/common/gpu/media/h264_dpb.h
@@ -17,18 +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 {
+struct H264Picture : public base::RefCounted<H264Picture> {
wuchengli 2015/03/30 11:02:54 This is complicated enough to be a class.
Pawel Osciak 2015/04/03 07:06:00 Done.
+ H264Picture();
+
+ virtual V4L2H264Picture* AsV4L2H264Picture();
+ virtual VaapiH264Picture* AsVaapiH264Picture();
+
+ using Vector = std::vector<scoped_refptr<H264Picture>>;
+
enum Field {
FIELD_NONE,
FIELD_TOP,
FIELD_BOTTOM,
};
- H264PictureBase();
-
// Values calculated per H.264 specification or taken from slice header.
// See spec for more details on each (some names have been converted from
// CamelCase in spec to Chromium-style names).
@@ -65,16 +71,6 @@ 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>;
@@ -139,8 +135,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_; }

Powered by Google App Engine
This is Rietveld 408576698