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_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "media/video/video_decode_accelerator.h" | 11 #include "media/video/video_decode_accelerator.h" |
12 #include "ppapi/c/dev/pp_video_dev.h" | 12 #include "ppapi/c/dev/pp_video_dev.h" |
13 #include "ppapi/c/dev/ppp_video_decoder_dev.h" | 13 #include "ppapi/c/dev/ppp_video_decoder_dev.h" |
14 #include "ppapi/c/pp_var.h" | 14 #include "ppapi/c/pp_var.h" |
15 #include "ppapi/shared_impl/ppb_video_decoder_shared.h" | 15 #include "ppapi/shared_impl/ppb_video_decoder_shared.h" |
16 #include "ppapi/shared_impl/resource.h" | 16 #include "ppapi/shared_impl/resource.h" |
17 #include "ppapi/thunk/ppb_video_decoder_api.h" | 17 #include "ppapi/thunk/ppb_video_decoder_dev_api.h" |
18 | 18 |
19 struct PP_PictureBuffer_Dev; | 19 struct PP_PictureBuffer_Dev; |
20 struct PP_VideoBitstreamBuffer_Dev; | 20 struct PP_VideoBitstreamBuffer_Dev; |
21 | 21 |
22 namespace gpu { | 22 namespace gpu { |
23 namespace gles2 { | 23 namespace gles2 { |
24 class GLES2Implementation; | 24 class GLES2Implementation; |
25 } // namespace gles2 | 25 } // namespace gles2 |
26 } // namespace gpu | 26 } // namespace gpu |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 class PlatformContext3D; | 29 class PlatformContext3D; |
30 class PlatformVideoDecoder; | 30 class PlatformVideoDecoder; |
31 | 31 |
32 class PPB_VideoDecoder_Impl : public ppapi::PPB_VideoDecoder_Shared, | 32 class PPB_VideoDecoder_Impl : public ppapi::PPB_VideoDecoder_Shared, |
33 public media::VideoDecodeAccelerator::Client { | 33 public media::VideoDecodeAccelerator::Client { |
34 public: | 34 public: |
35 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & | 35 // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create & |
36 // initialize. | 36 // initialize. |
37 static PP_Resource Create(PP_Instance instance, | 37 static PP_Resource Create(PP_Instance instance, |
38 PP_Resource graphics_context, | 38 PP_Resource graphics_context, |
39 PP_VideoDecoder_Profile profile); | 39 PP_VideoDecoder_Profile profile); |
40 | 40 |
41 // PPB_VideoDecoder_API implementation. | 41 // PPB_VideoDecoder_Dev_API implementation. |
42 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, | 42 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, |
43 scoped_refptr<ppapi::TrackedCallback> callback) | 43 scoped_refptr<ppapi::TrackedCallback> callback) |
44 OVERRIDE; | 44 OVERRIDE; |
45 virtual void AssignPictureBuffers(uint32_t no_of_buffers, | 45 virtual void AssignPictureBuffers(uint32_t no_of_buffers, |
46 const PP_PictureBuffer_Dev* buffers) | 46 const PP_PictureBuffer_Dev* buffers) |
47 OVERRIDE; | 47 OVERRIDE; |
48 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; | 48 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; |
49 virtual int32_t Flush(scoped_refptr<ppapi::TrackedCallback> callback) | 49 virtual int32_t Flush(scoped_refptr<ppapi::TrackedCallback> callback) |
50 OVERRIDE; | 50 OVERRIDE; |
51 virtual int32_t Reset(scoped_refptr<ppapi::TrackedCallback> callback) | 51 virtual int32_t Reset(scoped_refptr<ppapi::TrackedCallback> callback) |
(...skipping 26 matching lines...) Expand all Loading... |
78 | 78 |
79 // Reference to the plugin requesting this interface. | 79 // Reference to the plugin requesting this interface. |
80 const PPP_VideoDecoder_Dev* ppp_videodecoder_; | 80 const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); | 82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
86 | 86 |
87 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ | 87 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ |
OLD | NEW |