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 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 5 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "gpu/command_buffer/client/gles2_implementation.h" | 8 #include "gpu/command_buffer/client/gles2_implementation.h" |
9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // You must call Init() before using this class. | 28 // You must call Init() before using this class. |
29 explicit VideoDecoder(const HostResource& resource); | 29 explicit VideoDecoder(const HostResource& resource); |
30 virtual ~VideoDecoder(); | 30 virtual ~VideoDecoder(); |
31 | 31 |
32 static VideoDecoder* Create(const HostResource& resource, | 32 static VideoDecoder* Create(const HostResource& resource, |
33 PP_Resource graphics_context, | 33 PP_Resource graphics_context, |
34 PP_VideoDecoder_Profile profile); | 34 PP_VideoDecoder_Profile profile); |
35 | 35 |
36 // PPB_VideoDecoder_Dev_API implementation. | 36 // PPB_VideoDecoder_Dev_API implementation. |
37 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, | 37 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, |
38 scoped_refptr<TrackedCallback> callback) OVERRIDE; | 38 scoped_refptr<TrackedCallback> callback) override; |
39 virtual void AssignPictureBuffers( | 39 virtual void AssignPictureBuffers( |
40 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; | 40 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) override; |
41 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; | 41 virtual void ReusePictureBuffer(int32_t picture_buffer_id) override; |
42 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) OVERRIDE; | 42 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback) override; |
43 virtual int32_t Reset(scoped_refptr<TrackedCallback> callback) OVERRIDE; | 43 virtual int32_t Reset(scoped_refptr<TrackedCallback> callback) override; |
44 virtual void Destroy() OVERRIDE; | 44 virtual void Destroy() override; |
45 | 45 |
46 private: | 46 private: |
47 friend class PPB_VideoDecoder_Proxy; | 47 friend class PPB_VideoDecoder_Proxy; |
48 | 48 |
49 PluginDispatcher* GetDispatcher() const; | 49 PluginDispatcher* GetDispatcher() const; |
50 | 50 |
51 // Run the callbacks that were passed into the plugin interface. | 51 // Run the callbacks that were passed into the plugin interface. |
52 void FlushACK(int32_t result); | 52 void FlushACK(int32_t result); |
53 void ResetACK(int32_t result); | 53 void ResetACK(int32_t result); |
54 void EndOfBitstreamACK(int32_t buffer_id, int32_t result); | 54 void EndOfBitstreamACK(int32_t buffer_id, int32_t result); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 void PPB_VideoDecoder_Proxy::OnMsgResetACK( | 315 void PPB_VideoDecoder_Proxy::OnMsgResetACK( |
316 const HostResource& decoder, int32_t result) { | 316 const HostResource& decoder, int32_t result) { |
317 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); | 317 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); |
318 if (enter.succeeded()) | 318 if (enter.succeeded()) |
319 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); | 319 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); |
320 } | 320 } |
321 | 321 |
322 } // namespace proxy | 322 } // namespace proxy |
323 } // namespace ppapi | 323 } // namespace ppapi |
OLD | NEW |