summaryrefslogtreecommitdiffstats
path: root/media/base
diff options
context:
space:
mode:
authorjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 16:24:46 +0000
committerjiesun@google.com <jiesun@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-23 16:24:46 +0000
commitf044ce8e4aeef63eb7686345f407bf5640045c18 (patch)
tree1e990d0c5cb32cecd1b130e1c1cbf158f0dc3ab3 /media/base
parent4b4762a2b618580183e2a80b66eae64cb500da75 (diff)
downloadchromium_src-f044ce8e4aeef63eb7686345f407bf5640045c18.zip
chromium_src-f044ce8e4aeef63eb7686345f407bf5640045c18.tar.gz
chromium_src-f044ce8e4aeef63eb7686345f407bf5640045c18.tar.bz2
Remove AVFrame dependency.
Currently AVFrame is used in both OmxVideoDecodeEngine and FFmpegVideoDecodeEngine. This causes an unnecessary memory copy from AVFrame to VideoFrame. We can remove the additional copy by using VideoFrame. Also in the hardware (OpenMAX) path, VideoFrames are allocated inside decode engines, therefore the interface was changed such that VideoFrames are created inside the decode engines but buffered in VideoDecoderImpl. BUGS=none TEST=none Review URL: http://codereview.chromium.org/1669002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r--media/base/video_frame.cc1
-rw-r--r--media/base/video_frame.h11
2 files changed, 12 insertions, 0 deletions
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc
index 0b8239c..6767ee4 100644
--- a/media/base/video_frame.cc
+++ b/media/base/video_frame.cc
@@ -152,6 +152,7 @@ VideoFrame::VideoFrame(VideoFrame::Format format,
width_ = width;
height_ = height;
planes_ = 0;
+ repeat_count_ = 0;
memset(&strides_, 0, sizeof(strides_));
memset(&data_, 0, sizeof(data_));
}
diff --git a/media/base/video_frame.h b/media/base/video_frame.h
index b84d77c..5341c16 100644
--- a/media/base/video_frame.h
+++ b/media/base/video_frame.h
@@ -72,6 +72,14 @@ class VideoFrame : public StreamSample {
// StreamSample interface.
virtual bool IsEndOfStream() const;
+ int GetRepeatCount() const {
+ return repeat_count_;
+ }
+
+ void SetRepeatCount(int repeat_count) {
+ repeat_count_ = repeat_count;
+ }
+
private:
// Clients must use the static CreateFrame() method to create a new frame.
VideoFrame(Format format,
@@ -103,6 +111,9 @@ class VideoFrame : public StreamSample {
// Array of data pointers to each plane.
uint8* data_[kMaxPlanes];
+ // Display meta data
+ int repeat_count_;
+
DISALLOW_COPY_AND_ASSIGN(VideoFrame);
};