Chromium Code Reviews| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 // media::VideoDecodeAccelerator::Client implementation. | 44 // media::VideoDecodeAccelerator::Client implementation. |
| 45 void ProvidePictureBuffers(uint32 requested_num_of_buffers, | 45 void ProvidePictureBuffers(uint32 requested_num_of_buffers, |
| 46 const gfx::Size& dimensions, | 46 const gfx::Size& dimensions, |
| 47 uint32 texture_target) override; | 47 uint32 texture_target) override; |
| 48 void DismissPictureBuffer(int32 picture_buffer_id) override; | 48 void DismissPictureBuffer(int32 picture_buffer_id) override; |
| 49 void PictureReady(const media::Picture& picture) override; | 49 void PictureReady(const media::Picture& picture) override; |
| 50 void NotifyError(media::VideoDecodeAccelerator::Error error) override; | 50 void NotifyError(media::VideoDecodeAccelerator::Error error) override; |
| 51 void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override; | 51 void NotifyEndOfBitstreamBuffer(int32 bitstream_buffer_id) override; |
| 52 void NotifyFlushDone() override; | 52 void NotifyFlushDone() override; |
| 53 void NotifyResetDone() override; | 53 void NotifyResetDone() override; |
| 54 void NotifyCdmSet(bool success) override; | |
|
liberato (no reviews please)
2015/11/11 23:29:10
was broken before, but would you mind reordering t
xhwang
2015/11/13 01:16:55
Done.
| |
| 54 | 55 |
| 55 // GpuCommandBufferStub::DestructionObserver implementation. | 56 // GpuCommandBufferStub::DestructionObserver implementation. |
| 56 void OnWillDestroyStub() override; | 57 void OnWillDestroyStub() override; |
| 57 | 58 |
| 58 // Function to delegate sending to actual sender. | 59 // Function to delegate sending to actual sender. |
| 59 bool Send(IPC::Message* message) override; | 60 bool Send(IPC::Message* message) override; |
| 60 | 61 |
| 61 // Initialize VDAs from the set of VDAs supported for current platform until | 62 // Initialize VDAs from the set of VDAs supported for current platform until |
| 62 // one of them succeeds for given |profile|. Send the |init_done_msg| when | 63 // one of them succeeds for given |profile|. Send the |init_done_msg| when |
| 63 // done. filter_ is passed to GpuCommandBufferStub channel only if the chosen | 64 // done. filter_ is passed to GpuCommandBufferStub channel only if the chosen |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 87 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. | 88 // We only allow self-delete, from OnWillDestroyStub(), after cleanup there. |
| 88 ~GpuVideoDecodeAccelerator() override; | 89 ~GpuVideoDecodeAccelerator() override; |
| 89 | 90 |
| 90 // Handlers for IPC messages. | 91 // Handlers for IPC messages. |
| 91 void OnDecode(const AcceleratedVideoDecoderMsg_Decode_Params& params); | 92 void OnDecode(const AcceleratedVideoDecoderMsg_Decode_Params& params); |
| 92 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, | 93 void OnAssignPictureBuffers(const std::vector<int32>& buffer_ids, |
| 93 const std::vector<uint32>& texture_ids); | 94 const std::vector<uint32>& texture_ids); |
| 94 void OnReusePictureBuffer(int32 picture_buffer_id); | 95 void OnReusePictureBuffer(int32 picture_buffer_id); |
| 95 void OnFlush(); | 96 void OnFlush(); |
| 96 void OnReset(); | 97 void OnReset(); |
| 98 void OnSetCdm(int cdm_id); | |
| 97 void OnDestroy(); | 99 void OnDestroy(); |
| 98 | 100 |
| 99 // Called on IO thread when |filter_| has been removed. | 101 // Called on IO thread when |filter_| has been removed. |
| 100 void OnFilterRemoved(); | 102 void OnFilterRemoved(); |
| 101 | 103 |
| 102 // Sets the texture to cleared. | 104 // Sets the texture to cleared. |
| 103 void SetTextureCleared(const media::Picture& picture); | 105 void SetTextureCleared(const media::Picture& picture); |
| 104 | 106 |
| 105 // Helper for replying to the creation request. | 107 // Helper for replying to the creation request. |
| 106 void SendCreateDecoderReply(IPC::Message* message, bool succeeded); | 108 void SendCreateDecoderReply(IPC::Message* message, bool succeeded); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 156 |
| 155 // A map from picture buffer ID to TextureRef that have not been cleared. | 157 // A map from picture buffer ID to TextureRef that have not been cleared. |
| 156 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 158 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
| 157 | 159 |
| 158 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 160 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 159 }; | 161 }; |
| 160 | 162 |
| 161 } // namespace content | 163 } // namespace content |
| 162 | 164 |
| 163 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 165 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |