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

Side by Side Diff: content/renderer/pepper_platform_video_decoder_impl.h

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make try bots happy Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/renderer/pepper_platform_video_decoder_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "media/base/data_buffer.h"
12 #include "media/video/video_decode_accelerator.h" 11 #include "media/video/video_decode_accelerator.h"
13 #include "webkit/plugins/ppapi/plugin_delegate.h" 12 #include "webkit/plugins/ppapi/plugin_delegate.h"
14 13
15 class PlatformVideoDecoderImpl 14 class PlatformVideoDecoderImpl
16 : public webkit::ppapi::PluginDelegate::PlatformVideoDecoder, 15 : public webkit::ppapi::PluginDelegate::PlatformVideoDecoder,
17 public media::VideoDecodeAccelerator::Client { 16 public media::VideoDecodeAccelerator::Client {
18 public: 17 public:
19 explicit PlatformVideoDecoderImpl( 18 explicit PlatformVideoDecoderImpl(
20 media::VideoDecodeAccelerator* video_decode_accelerator); 19 media::VideoDecodeAccelerator* video_decode_accelerator);
21 virtual ~PlatformVideoDecoderImpl(); 20 virtual ~PlatformVideoDecoderImpl();
22 21
23 // PlatformVideoDecoder implementation. 22 // PlatformVideoDecoder implementation.
24 virtual const std::vector<uint32>& GetConfig( 23 virtual void GetConfigs(
25 const std::vector<uint32>& prototype_config); 24 const std::vector<uint32>& requested_configs,
26 virtual bool Initialize(const std::vector<uint32>& config); 25 std::vector<uint32>* matched_configs) OVERRIDE;
27 virtual bool Decode(media::BitstreamBuffer* bitstream_buffer, 26 virtual bool Initialize(const std::vector<uint32>& config) OVERRIDE;
28 media::VideoDecodeAcceleratorCallback* callback); 27 virtual bool Decode(
29 virtual void AssignPictureBuffer( 28 const media::BitstreamBuffer& bitstream_buffer,
30 std::vector<media::VideoDecodeAccelerator::PictureBuffer*> 29 media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
31 picture_buffers); 30 virtual void AssignGLESBuffers(
32 virtual void ReusePictureBuffer( 31 const std::vector<media::GLESBuffer>& buffers) OVERRIDE;
33 media::VideoDecodeAccelerator::PictureBuffer* picture_buffer); 32 virtual void AssignSysmemBuffers(
34 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback); 33 const std::vector<media::SysmemBuffer>& buffers) OVERRIDE;
35 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback); 34 virtual void ReusePictureBuffer(uint32 picture_buffer_id) OVERRIDE;
35 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
36 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback) OVERRIDE;
36 37
37 // VideoDecodeAccelerator::Client implementation. 38 // VideoDecodeAccelerator::Client implementation.
38 virtual void ProvidePictureBuffers( 39 virtual void ProvidePictureBuffers(
39 uint32 requested_num_of_buffers, 40 uint32 requested_num_of_buffers,
40 const std::vector<uint32>& buffer_properties) OVERRIDE; 41 gfx::Size dimensions,
42 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE;
41 virtual void PictureReady( 43 virtual void PictureReady(
42 media::VideoDecodeAccelerator::Picture* picture) OVERRIDE; 44 const media::Picture& picture) OVERRIDE;
43 virtual void NotifyEndOfStream() OVERRIDE; 45 virtual void NotifyEndOfStream() OVERRIDE;
44 virtual void NotifyError( 46 virtual void NotifyError(
45 media::VideoDecodeAccelerator::Error error) OVERRIDE; 47 media::VideoDecodeAccelerator::Error error) OVERRIDE;
46 48
47 private: 49 private:
48 // EventHandler lifetime must exceed lifetime of this class. 50 // EventHandler lifetime must exceed lifetime of this class.
49 media::VideoDecodeAccelerator::Client* client_; 51 media::VideoDecodeAccelerator::Client* client_;
50 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; 52 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
51 53
52 std::vector<uint32> configs; 54 std::vector<uint32> configs;
53 55
54 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl); 56 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl);
55 }; 57 };
56 58
57 #endif // CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 59 #endif // CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/renderer/pepper_platform_video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698