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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace gpu { | 26 namespace gpu { |
27 namespace gles2 { | 27 namespace gles2 { |
28 class GLES2Implementation; | 28 class GLES2Implementation; |
29 } // namespace gles2 | 29 } // namespace gles2 |
30 } // namespace gpu | 30 } // namespace gpu |
31 | 31 |
32 namespace webkit { | 32 namespace webkit { |
33 namespace ppapi { | 33 namespace ppapi { |
34 | 34 |
35 class PPB_VideoDecoder_Impl : public ::ppapi::Resource, | 35 class PPB_VideoDecoder_Impl : public ::ppapi::PPB_VideoDecoder_Shared, |
36 public ::ppapi::PPB_VideoDecoder_Shared, | |
37 public media::VideoDecodeAccelerator::Client { | 36 public media::VideoDecodeAccelerator::Client { |
38 public: | 37 public: |
39 virtual ~PPB_VideoDecoder_Impl(); | 38 virtual ~PPB_VideoDecoder_Impl(); |
40 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & | 39 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & |
41 // initialize. | 40 // initialize. |
42 static PP_Resource Create(PP_Instance instance, | 41 static PP_Resource Create(PP_Instance instance, |
43 PP_Resource graphics_context, | 42 PP_Resource graphics_context, |
44 PP_VideoDecoder_Profile profile); | 43 PP_VideoDecoder_Profile profile); |
45 | 44 |
46 // Resource overrides. | |
47 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE; | |
48 | |
49 // PPB_VideoDecoder_API implementation. | 45 // PPB_VideoDecoder_API implementation. |
50 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, | 46 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, |
51 PP_CompletionCallback callback) OVERRIDE; | 47 PP_CompletionCallback callback) OVERRIDE; |
52 virtual void AssignPictureBuffers( | 48 virtual void AssignPictureBuffers( |
53 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; | 49 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; |
54 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; | 50 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; |
55 virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE; | 51 virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE; |
56 virtual int32_t Reset(PP_CompletionCallback callback) OVERRIDE; | 52 virtual int32_t Reset(PP_CompletionCallback callback) OVERRIDE; |
57 virtual void Destroy() OVERRIDE; | 53 virtual void Destroy() OVERRIDE; |
58 | 54 |
(...skipping 24 matching lines...) Expand all Loading... |
83 // Reference to the plugin requesting this interface. | 79 // Reference to the plugin requesting this interface. |
84 const PPP_VideoDecoder_Dev* ppp_videodecoder_; | 80 const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
85 | 81 |
86 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); | 82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
87 }; | 83 }; |
88 | 84 |
89 } // namespace ppapi | 85 } // namespace ppapi |
90 } // namespace webkit | 86 } // namespace webkit |
91 | 87 |
92 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 88 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
OLD | NEW |