diff options
author | bradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 17:29:00 +0000 |
---|---|---|
committer | bradnelson@google.com <bradnelson@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-22 17:29:00 +0000 |
commit | 305ddf7c77a2f082499c584ef00b25cad63654cb (patch) | |
tree | eb3da0a7d0f5f4bb45ab1fd986af2590ebb4c3ac /media/base/video_frame.cc | |
parent | ea6089c7c205c2cbfd1470c430bfe16f97e46370 (diff) | |
download | chromium_src-305ddf7c77a2f082499c584ef00b25cad63654cb.zip chromium_src-305ddf7c77a2f082499c584ef00b25cad63654cb.tar.gz chromium_src-305ddf7c77a2f082499c584ef00b25cad63654cb.tar.bz2 |
Reverting 53348...
Broke webkit build.
BUG=None
TEST=Nont
TBR=jiesun
Review URL: http://codereview.chromium.org/3015018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/video_frame.cc')
-rw-r--r-- | media/base/video_frame.cc | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc index e7da94e..857af70 100644 --- a/media/base/video_frame.cc +++ b/media/base/video_frame.cc @@ -50,26 +50,21 @@ void VideoFrame::CreateFrame(VideoFrame::Format format, *frame_out = alloc_worked ? frame : NULL; } -void VideoFrame::CreateFrameExternal(SurfaceType type, - Format format, +void VideoFrame::CreateFrameExternal(VideoFrame::Format format, size_t width, size_t height, - size_t planes, uint8* const data[kMaxPlanes], const int32 strides[kMaxPlanes], base::TimeDelta timestamp, base::TimeDelta duration, - void* private_buffer, scoped_refptr<VideoFrame>* frame_out) { DCHECK(frame_out); scoped_refptr<VideoFrame> frame = - new VideoFrame(type, format, width, height); + new VideoFrame(VideoFrame::TYPE_SYSTEM_MEMORY, format, width, height); if (frame) { frame->SetTimestamp(timestamp); frame->SetDuration(duration); frame->external_memory_ = true; - frame->planes_ = planes; - frame->private_buffer_ = private_buffer; for (size_t i = 0; i < kMaxPlanes; ++i) { frame->data_[i] = data[i]; frame->strides_[i] = strides[i]; @@ -122,6 +117,26 @@ void VideoFrame::CreateBlackFrame(int width, int height, *frame_out = frame; } +// static +void VideoFrame::CreatePrivateFrame(VideoFrame::SurfaceType type, + VideoFrame::Format format, + size_t width, + size_t height, + base::TimeDelta timestamp, + base::TimeDelta duration, + void* private_buffer, + scoped_refptr<VideoFrame>* frame_out) { + DCHECK(frame_out); + scoped_refptr<VideoFrame> frame = + new VideoFrame(type, format, width, height); + if (frame) { + frame->SetTimestamp(timestamp); + frame->SetDuration(duration); + frame->private_buffer_ = private_buffer; + } + *frame_out = frame; +} + static inline size_t RoundUp(size_t value, size_t alignment) { // Check that |alignment| is a power of 2. DCHECK((alignment + (alignment - 1)) == (alignment | (alignment - 1))); |