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

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: Fixing a few parameter types 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
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" 11 #include "media/base/data_buffer.h"
scherkus (not reviewing) 2011/04/29 20:33:01 I don't think this header file is used
vrk (LEFT CHROMIUM) 2011/05/03 18:19:58 Correct! Removed.
12 #include "media/video/video_decode_accelerator.h" 12 #include "media/video/video_decode_accelerator.h"
13 #include "webkit/plugins/ppapi/plugin_delegate.h" 13 #include "webkit/plugins/ppapi/plugin_delegate.h"
14 14
15 class PlatformVideoDecoderImpl 15 class PlatformVideoDecoderImpl
16 : public webkit::ppapi::PluginDelegate::PlatformVideoDecoder, 16 : public webkit::ppapi::PluginDelegate::PlatformVideoDecoder,
17 public media::VideoDecodeAccelerator::Client { 17 public media::VideoDecodeAccelerator::Client {
18 public: 18 public:
19 explicit PlatformVideoDecoderImpl( 19 explicit PlatformVideoDecoderImpl(
20 media::VideoDecodeAccelerator* video_decode_accelerator); 20 media::VideoDecodeAccelerator* video_decode_accelerator);
21 virtual ~PlatformVideoDecoderImpl(); 21 virtual ~PlatformVideoDecoderImpl();
22 22
23 // PlatformVideoDecoder implementation. 23 // PlatformVideoDecoder implementation.
24 virtual const std::vector<uint32>& GetConfig( 24 virtual const std::vector<uint32>& GetConfig(
25 const std::vector<uint32>& prototype_config); 25 const std::vector<uint32>& prototype_config);
26 virtual bool Initialize(const std::vector<uint32>& config); 26 virtual bool Initialize(const std::vector<uint32>& config);
27 virtual bool Decode(media::BitstreamBuffer* bitstream_buffer, 27 virtual bool Decode(const media::BitstreamBuffer& bitstream_buffer,
28 media::VideoDecodeAcceleratorCallback* callback); 28 media::VideoDecodeAcceleratorCallback* callback);
29 virtual void AssignPictureBuffer( 29 virtual void AssignPictureBuffer(
30 std::vector<media::VideoDecodeAccelerator::PictureBuffer*> 30 const std::vector<media::PictureBuffer>& picture_buffers);
31 picture_buffers); 31 virtual void ReusePictureBuffer(uint32 picture_buffer_id);
32 virtual void ReusePictureBuffer(
33 media::VideoDecodeAccelerator::PictureBuffer* picture_buffer);
34 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback); 32 virtual bool Flush(media::VideoDecodeAcceleratorCallback* callback);
35 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback); 33 virtual bool Abort(media::VideoDecodeAcceleratorCallback* callback);
36 34
37 // VideoDecodeAccelerator::Client implementation. 35 // VideoDecodeAccelerator::Client implementation.
38 virtual void ProvidePictureBuffers( 36 virtual void ProvidePictureBuffers(
39 uint32 requested_num_of_buffers, 37 uint32 requested_num_of_buffers,
40 const std::vector<uint32>& buffer_properties) OVERRIDE; 38 gfx::Size dimensions,
39 media::PictureBuffer::MemoryType type) OVERRIDE;
41 virtual void PictureReady( 40 virtual void PictureReady(
42 media::VideoDecodeAccelerator::Picture* picture) OVERRIDE; 41 const media::Picture& picture) OVERRIDE;
43 virtual void NotifyEndOfStream() OVERRIDE; 42 virtual void NotifyEndOfStream() OVERRIDE;
44 virtual void NotifyError( 43 virtual void NotifyError(
45 media::VideoDecodeAccelerator::Error error) OVERRIDE; 44 media::VideoDecodeAccelerator::Error error) OVERRIDE;
46 45
47 private: 46 private:
48 // EventHandler lifetime must exceed lifetime of this class. 47 // EventHandler lifetime must exceed lifetime of this class.
49 media::VideoDecodeAccelerator::Client* client_; 48 media::VideoDecodeAccelerator::Client* client_;
50 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; 49 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_;
51 50
52 std::vector<uint32> configs; 51 std::vector<uint32> configs;
53 52
54 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl); 53 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoderImpl);
55 }; 54 };
56 55
57 #endif // CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_ 56 #endif // CONTENT_RENDERER_PEPPER_PLATFORM_VIDEO_DECODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698