diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 22:03:16 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-17 22:03:16 +0000 |
commit | 1318e92f70e240d7ae71320ea7e4fcae18f2ce3e (patch) | |
tree | 412ee9192a850d9867bea3a841d800f67081ebe3 /chrome/renderer/media | |
parent | 9fcd39385ae39a68d3509238bd9ef83af1868fc7 (diff) | |
download | chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.zip chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.tar.gz chromium_src-1318e92f70e240d7ae71320ea7e4fcae18f2ce3e.tar.bz2 |
Resubmit GpuVideoDecoder and related patches.
BUG=53714
TEST=Tree is green
Review URL: http://codereview.chromium.org/3442006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/media')
-rw-r--r-- | chrome/renderer/media/gles2_video_decode_context.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/media/gles2_video_decode_context.h | 12 | ||||
-rw-r--r-- | chrome/renderer/media/ipc_video_decoder.cc | 7 |
3 files changed, 20 insertions, 12 deletions
diff --git a/chrome/renderer/media/gles2_video_decode_context.cc b/chrome/renderer/media/gles2_video_decode_context.cc index 075f80a..b7eec02 100644 --- a/chrome/renderer/media/gles2_video_decode_context.cc +++ b/chrome/renderer/media/gles2_video_decode_context.cc @@ -20,15 +20,20 @@ void* Gles2VideoDecodeContext::GetDevice() { } void Gles2VideoDecodeContext::AllocateVideoFrames( - int n, size_t width, size_t height, AllocationCompleteCallback* callback) { + int n, size_t width, size_t height, media::VideoFrame::Format format, + std::vector<scoped_refptr<media::VideoFrame> >* frames, Task* task) { // TODO(hclam): Implement. } -void Gles2VideoDecodeContext::ReleaseVideoFrames(int n, - media::VideoFrame* frames) { +void Gles2VideoDecodeContext::ReleaseAllVideoFrames() { // TODO(hclam): Implement. } -void Gles2VideoDecodeContext::Destroy(DestructionCompleteCallback* callback) { +void Gles2VideoDecodeContext::UploadToVideoFrame( + void* buffer, scoped_refptr<media::VideoFrame> frame, Task* task) { + // TODO(hclam): Implement. +} + +void Gles2VideoDecodeContext::Destroy(Task* task) { // TODO(hclam): Implement. } diff --git a/chrome/renderer/media/gles2_video_decode_context.h b/chrome/renderer/media/gles2_video_decode_context.h index e087bb3..4f556ab 100644 --- a/chrome/renderer/media/gles2_video_decode_context.h +++ b/chrome/renderer/media/gles2_video_decode_context.h @@ -95,10 +95,14 @@ class Gles2VideoDecodeContext : public media::VideoDecodeContext { // media::VideoDecodeContext implementation. virtual void* GetDevice(); - virtual void AllocateVideoFrames(int n, size_t width, size_t height, - AllocationCompleteCallback* callback); - virtual void ReleaseVideoFrames(int n, media::VideoFrame* frames); - virtual void Destroy(DestructionCompleteCallback* callback); + virtual void AllocateVideoFrames( + int n, size_t width, size_t height, media::VideoFrame::Format format, + std::vector<scoped_refptr<media::VideoFrame> >* frames, Task* task); + virtual void ReleaseAllVideoFrames(); + virtual void UploadToVideoFrame(void* buffer, + scoped_refptr<media::VideoFrame> frame, + Task* task); + virtual void Destroy(Task* task); //-------------------------------------------------------------------------- // Any thread diff --git a/chrome/renderer/media/ipc_video_decoder.cc b/chrome/renderer/media/ipc_video_decoder.cc index 0b6896b..eda8696 100644 --- a/chrome/renderer/media/ipc_video_decoder.cc +++ b/chrome/renderer/media/ipc_video_decoder.cc @@ -111,10 +111,9 @@ void IpcVideoDecoder::OnInitializeDone( media::mime_type::kUncompressedVideo); media_format_.SetAsInteger(media::MediaFormat::kWidth, width_); media_format_.SetAsInteger(media::MediaFormat::kHeight, height_); - media_format_.SetAsInteger(media::MediaFormat::kSurfaceType, - static_cast<int>(param.surface_type)); - media_format_.SetAsInteger(media::MediaFormat::kSurfaceFormat, - static_cast<int>(param.format)); + media_format_.SetAsInteger( + media::MediaFormat::kSurfaceType, + static_cast<int>(media::VideoFrame::TYPE_GL_TEXTURE)); state_ = kPlaying; } else { LOG(ERROR) << "IpcVideoDecoder initialization failed!"; |