Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/pepper_platform_video_decoder_impl.h" | 5 #include "content/renderer/pepper_platform_video_decoder_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "content/renderer/video_decode_accelerator_host.h" | 10 #include "content/renderer/video_decode_accelerator_host.h" |
| 11 #include "media/base/buffers.h" | 11 #include "media/base/buffers.h" |
|
scherkus (not reviewing)
2011/04/29 20:33:01
I don't think this header file is needed
vrk (LEFT CHROMIUM)
2011/05/03 18:19:58
Done.
| |
| 12 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
|
scherkus (not reviewing)
2011/04/29 20:33:01
I don't think this header file is needed
vrk (LEFT CHROMIUM)
2011/05/03 18:19:58
Done.
| |
| 13 | 13 |
| 14 using media::BitstreamBuffer; | 14 using media::BitstreamBuffer; |
| 15 using media::VideoDecodeAccelerator; | |
| 16 using media::VideoDecodeAcceleratorCallback; | 15 using media::VideoDecodeAcceleratorCallback; |
| 17 | 16 |
| 18 PlatformVideoDecoderImpl::PlatformVideoDecoderImpl( | 17 PlatformVideoDecoderImpl::PlatformVideoDecoderImpl( |
| 19 VideoDecodeAccelerator* video_decode_accelerator) | 18 VideoDecodeAccelerator* video_decode_accelerator) |
| 20 : client_(NULL), | 19 : client_(NULL), |
| 21 video_decode_accelerator_(video_decode_accelerator) { | 20 video_decode_accelerator_(video_decode_accelerator) { |
| 22 } | 21 } |
| 23 | 22 |
| 24 PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {} | 23 PlatformVideoDecoderImpl::~PlatformVideoDecoderImpl() {} |
| 25 | 24 |
| 26 const std::vector<uint32>& PlatformVideoDecoderImpl::GetConfig( | 25 const std::vector<uint32>& PlatformVideoDecoderImpl::GetConfig( |
| 27 const std::vector<uint32>& prototype_config) { | 26 const std::vector<uint32>& prototype_config) { |
| 28 NOTIMPLEMENTED(); | 27 NOTIMPLEMENTED(); |
| 29 return configs; | 28 return configs; |
| 30 } | 29 } |
| 31 | 30 |
| 32 bool PlatformVideoDecoderImpl::Initialize(const std::vector<uint32>& config) { | 31 bool PlatformVideoDecoderImpl::Initialize(const std::vector<uint32>& config) { |
| 33 // TODO(vmr): Create video decoder in GPU process. | 32 // TODO(vmr): Create video decoder in GPU process. |
| 34 | 33 |
| 35 return true; | 34 return true; |
| 36 } | 35 } |
| 37 | 36 |
| 38 bool PlatformVideoDecoderImpl::Decode( | 37 bool PlatformVideoDecoderImpl::Decode( |
| 39 BitstreamBuffer* bitstream_buffer, | 38 const BitstreamBuffer& bitstream_buffer, |
| 40 VideoDecodeAcceleratorCallback* callback) { | 39 VideoDecodeAcceleratorCallback* callback) { |
| 41 // TODO(vmr): Implement me! | 40 // TODO(vmr): Implement me! |
| 42 NOTIMPLEMENTED(); | 41 NOTIMPLEMENTED(); |
| 43 // Put the incoming buffer into bitstream_buffer queue | 42 // Put the incoming buffer into bitstream_buffer queue |
| 44 return false; | 43 return false; |
| 45 } | 44 } |
| 46 | 45 |
| 47 void PlatformVideoDecoderImpl::AssignPictureBuffer( | 46 void PlatformVideoDecoderImpl::AssignPictureBuffer( |
| 48 std::vector<VideoDecodeAccelerator::PictureBuffer*> picture_buffers) { | 47 const std::vector<media::PictureBuffer>& picture_buffers) { |
| 49 } | 48 } |
| 50 | 49 |
| 51 void PlatformVideoDecoderImpl::ReusePictureBuffer( | 50 void PlatformVideoDecoderImpl::ReusePictureBuffer(uint32 picture_buffer_id) { |
| 52 VideoDecodeAccelerator::PictureBuffer* picture_buffer) { | |
| 53 } | 51 } |
| 54 | 52 |
| 55 bool PlatformVideoDecoderImpl::Flush( | 53 bool PlatformVideoDecoderImpl::Flush( |
| 56 VideoDecodeAcceleratorCallback* callback) { | 54 VideoDecodeAcceleratorCallback* callback) { |
| 57 // TODO(vmr): Implement me! | 55 // TODO(vmr): Implement me! |
| 58 NOTIMPLEMENTED(); | 56 NOTIMPLEMENTED(); |
| 59 | 57 |
| 60 // Call GPU video decoder to flush. | 58 // Call GPU video decoder to flush. |
| 61 return video_decode_accelerator_->Flush(callback); | 59 return video_decode_accelerator_->Flush(callback); |
| 62 } | 60 } |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 76 } | 74 } |
| 77 | 75 |
| 78 void PlatformVideoDecoderImpl::NotifyError( | 76 void PlatformVideoDecoderImpl::NotifyError( |
| 79 VideoDecodeAccelerator::Error error) { | 77 VideoDecodeAccelerator::Error error) { |
| 80 // TODO(vmr): Implement. | 78 // TODO(vmr): Implement. |
| 81 NOTIMPLEMENTED(); | 79 NOTIMPLEMENTED(); |
| 82 } | 80 } |
| 83 | 81 |
| 84 void PlatformVideoDecoderImpl::ProvidePictureBuffers( | 82 void PlatformVideoDecoderImpl::ProvidePictureBuffers( |
| 85 uint32 requested_num_of_buffers, | 83 uint32 requested_num_of_buffers, |
| 86 const std::vector<uint32>& buffer_properties) { | 84 gfx::Size dimensions, |
| 85 media::PictureBuffer::MemoryType type) { | |
| 87 // TODO(vmr): Implement. | 86 // TODO(vmr): Implement. |
| 88 NOTIMPLEMENTED(); | 87 NOTIMPLEMENTED(); |
| 89 } | 88 } |
| 90 | 89 |
| 91 void PlatformVideoDecoderImpl::PictureReady( | 90 void PlatformVideoDecoderImpl::PictureReady( |
| 92 VideoDecodeAccelerator::Picture* picture) { | 91 const media::Picture& picture) { |
| 93 // TODO(vmr): Implement. | 92 // TODO(vmr): Implement. |
| 94 NOTIMPLEMENTED(); | 93 NOTIMPLEMENTED(); |
| 95 } | 94 } |
| OLD | NEW |