OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ |
6 #define CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ | 6 #define CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "media/video/video_decode_accelerator.h" | 13 #include "media/video/video_decode_accelerator.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 | 16 |
17 class PlatformVideoDecoder : public media::VideoDecodeAccelerator, | 17 class PlatformVideoDecoder : public media::VideoDecodeAccelerator, |
18 public media::VideoDecodeAccelerator::Client { | 18 public media::VideoDecodeAccelerator::Client { |
19 public: | 19 public: |
20 PlatformVideoDecoder(media::VideoDecodeAccelerator::Client* client, | 20 explicit PlatformVideoDecoder(int32 command_buffer_route_id); |
21 int32 command_buffer_route_id); | |
22 virtual ~PlatformVideoDecoder(); | 21 virtual ~PlatformVideoDecoder(); |
23 | 22 |
24 // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation. | 23 // PlatformVideoDecoder (a.k.a. VideoDecodeAccelerator) implementation. |
25 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; | 24 virtual bool Initialize(media::VideoCodecProfile profile, |
| 25 media::VideoDecodeAccelerator::Client* client) |
| 26 OVERRIDE; |
26 virtual void Decode( | 27 virtual void Decode( |
27 const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; | 28 const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |
28 virtual void AssignPictureBuffers( | 29 virtual void AssignPictureBuffers( |
29 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; | 30 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; |
30 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; | 31 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |
31 virtual void Flush() OVERRIDE; | 32 virtual void Flush() OVERRIDE; |
32 virtual void Reset() OVERRIDE; | 33 virtual void Reset() OVERRIDE; |
33 virtual void Destroy() OVERRIDE; | 34 virtual void Destroy() OVERRIDE; |
34 | 35 |
35 // VideoDecodeAccelerator::Client implementation. | 36 // VideoDecodeAccelerator::Client implementation. |
(...skipping 21 matching lines...) Expand all Loading... |
57 | 58 |
58 // Holds a GpuVideoDecodeAcceleratorHost. | 59 // Holds a GpuVideoDecodeAcceleratorHost. |
59 scoped_ptr<media::VideoDecodeAccelerator> decoder_; | 60 scoped_ptr<media::VideoDecodeAccelerator> decoder_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoder); | 62 DISALLOW_COPY_AND_ASSIGN(PlatformVideoDecoder); |
62 }; | 63 }; |
63 | 64 |
64 } // namespace content | 65 } // namespace content |
65 | 66 |
66 #endif // CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ | 67 #endif // CONTENT_RENDERER_MEDIA_PEPPER_PLATFORM_VIDEO_DECODER_H_ |
OLD | NEW |