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

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: 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..9ed75f0e436757e4ba3e8e94aec306333bbeb3bf 100644
--- a/content/common/gpu/media/h264_dpb.h
+++ b/content/common/gpu/media/h264_dpb.h
@@ -17,18 +17,25 @@
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:
+ H264Picture();
+
+ virtual V4L2H264Picture* AsV4L2H264Picture();
+ virtual VaapiH264Picture* AsVaapiH264Picture();
+
+ using Vector = std::vector<scoped_refptr<H264Picture>>;
kcwu1 2015/04/07 09:42:47 move this line and enum to front of ctor.
Pawel Osciak 2015/04/08 08:36:03 Done.
+
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,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_; }

Powered by Google App Engine
This is Rietveld 408576698