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" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 virtual int32_t Reset( | 50 virtual int32_t Reset( |
51 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; | 51 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; |
52 virtual void Destroy() OVERRIDE; | 52 virtual void Destroy() OVERRIDE; |
53 | 53 |
54 // media::VideoDecodeAccelerator::Client implementation. | 54 // media::VideoDecodeAccelerator::Client implementation. |
55 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, | 55 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, |
56 const gfx::Size& dimensions, | 56 const gfx::Size& dimensions, |
57 uint32 texture_target) OVERRIDE; | 57 uint32 texture_target) OVERRIDE; |
58 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; | 58 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; |
59 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 59 virtual void PictureReady(const media::Picture& picture) OVERRIDE; |
60 virtual void NotifyInitializeDone() OVERRIDE; | |
61 virtual void NotifyError( | 60 virtual void NotifyError( |
62 media::VideoDecodeAccelerator::Error error) OVERRIDE; | 61 media::VideoDecodeAccelerator::Error error) OVERRIDE; |
63 virtual void NotifyFlushDone() OVERRIDE; | 62 virtual void NotifyFlushDone() OVERRIDE; |
64 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; | 63 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; |
65 virtual void NotifyResetDone() OVERRIDE; | 64 virtual void NotifyResetDone() OVERRIDE; |
66 | 65 |
67 private: | 66 private: |
68 virtual ~PPB_VideoDecoder_Impl(); | 67 virtual ~PPB_VideoDecoder_Impl(); |
69 | 68 |
70 explicit PPB_VideoDecoder_Impl(PP_Instance instance); | 69 explicit PPB_VideoDecoder_Impl(PP_Instance instance); |
71 bool Init(PP_Resource graphics_context, | 70 bool Init(PP_Resource graphics_context, |
72 PlatformContext3D* context, | 71 PlatformContext3D* context, |
73 gpu::gles2::GLES2Implementation* gles2_impl, | 72 gpu::gles2::GLES2Implementation* gles2_impl, |
74 PP_VideoDecoder_Profile profile); | 73 PP_VideoDecoder_Profile profile); |
75 | 74 |
76 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is | 75 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is |
77 // swapped with another. | 76 // swapped with another. |
78 scoped_ptr<PlatformVideoDecoder> platform_video_decoder_; | 77 scoped_ptr<PlatformVideoDecoder> platform_video_decoder_; |
79 | 78 |
80 // Reference to the plugin requesting this interface. | 79 // Reference to the plugin requesting this interface. |
81 const PPP_VideoDecoder_Dev* ppp_videodecoder_; | 80 const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
82 | 81 |
83 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); | 82 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace content | 85 } // namespace content |
87 | 86 |
88 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ | 87 #endif // CONTENT_RENDERER_PEPPER_PPB_VIDEO_DECODER_IMPL_H_ |
OLD | NEW |