| 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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 // Each of the arguments to the constructor must outlive this object. | 34 // Each of the arguments to the constructor must outlive this object. |
| 35 // |stub->decoder()| will be made current around any operation that touches | 35 // |stub->decoder()| will be made current around any operation that touches |
| 36 // the underlying VDA so that it can make GL calls safely. | 36 // the underlying VDA so that it can make GL calls safely. |
| 37 GpuVideoDecodeAccelerator( | 37 GpuVideoDecodeAccelerator( |
| 38 int32 host_route_id, | 38 int32 host_route_id, |
| 39 GpuCommandBufferStub* stub, | 39 GpuCommandBufferStub* stub, |
| 40 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); | 40 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); |
| 41 | 41 |
| 42 // IPC::Listener implementation. | 42 // IPC::Listener implementation. |
| 43 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 43 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 44 | 44 |
| 45 // media::VideoDecodeAccelerator::Client implementation. | 45 // media::VideoDecodeAccelerator::Client implementation. |
| 46 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, | 46 virtual void ProvidePictureBuffers(uint32 requested_num_of_buffers, |
| 47 const gfx::Size& dimensions, | 47 const gfx::Size& dimensions, |
| 48 uint32 texture_target) OVERRIDE; | 48 uint32 texture_target) override; |
| 49 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; | 49 virtual void DismissPictureBuffer(int32 picture_buffer_id) override; |
| 50 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 50 virtual void PictureReady(const media::Picture& picture) override; |
| 51 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; | 51 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) override; |
| 52 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) OVERRIDE; | 52 virtual void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override; |
| 53 virtual void NotifyFlushDone() OVERRIDE; | 53 virtual void NotifyFlushDone() override; |
| 54 virtual void NotifyResetDone() OVERRIDE; | 54 virtual void NotifyResetDone() override; |
| 55 | 55 |
| 56 // GpuCommandBufferStub::DestructionObserver implementation. | 56 // GpuCommandBufferStub::DestructionObserver implementation. |
| 57 virtual void OnWillDestroyStub() OVERRIDE; | 57 virtual void OnWillDestroyStub() override; |
| 58 | 58 |
| 59 // Function to delegate sending to actual sender. | 59 // Function to delegate sending to actual sender. |
| 60 virtual bool Send(IPC::Message* message) OVERRIDE; | 60 virtual bool Send(IPC::Message* message) override; |
| 61 | 61 |
| 62 // Initialize the accelerator with the given profile and send the | 62 // Initialize the accelerator with the given profile and send the |
| 63 // |init_done_msg| when done. | 63 // |init_done_msg| when done. |
| 64 void Initialize(const media::VideoCodecProfile profile, | 64 void Initialize(const media::VideoCodecProfile profile, |
| 65 IPC::Message* init_done_msg); | 65 IPC::Message* init_done_msg); |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 class MessageFilter; | 68 class MessageFilter; |
| 69 | 69 |
| 70 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. | 70 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 | 132 |
| 133 // A map from picture buffer ID to TextureRef that have not been cleared. | 133 // A map from picture buffer ID to TextureRef that have not been cleared. |
| 134 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 134 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
| 135 | 135 |
| 136 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 136 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace content | 139 } // namespace content |
| 140 | 140 |
| 141 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 141 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |