| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/shared_memory.h" | 12 #include "base/shared_memory.h" |
| 13 #include "content/common/gpu/gpu_command_buffer_stub.h" | 13 #include "content/common/gpu/gpu_command_buffer_stub.h" |
| 14 #include "ipc/ipc_listener.h" | 14 #include "ipc/ipc_listener.h" |
| 15 #include "ipc/ipc_sender.h" | 15 #include "ipc/ipc_sender.h" |
| 16 #include "media/video/video_decode_accelerator.h" | 16 #include "media/video/video_decode_accelerator.h" |
| 17 | 17 |
| 18 namespace content { |
| 19 |
| 18 class GpuVideoDecodeAccelerator | 20 class GpuVideoDecodeAccelerator |
| 19 : public IPC::Listener, | 21 : public IPC::Listener, |
| 20 public IPC::Sender, | 22 public IPC::Sender, |
| 21 public media::VideoDecodeAccelerator::Client, | 23 public media::VideoDecodeAccelerator::Client, |
| 22 public GpuCommandBufferStub::DestructionObserver { | 24 public GpuCommandBufferStub::DestructionObserver { |
| 23 public: | 25 public: |
| 24 // Each of the arguments to the constructor must outlive this object. | 26 // Each of the arguments to the constructor must outlive this object. |
| 25 // |stub->decoder()| will be made current around any operation that touches | 27 // |stub->decoder()| will be made current around any operation that touches |
| 26 // the underlying VDA so that it can make GL calls safely. | 28 // the underlying VDA so that it can make GL calls safely. |
| 27 GpuVideoDecodeAccelerator(IPC::Sender* sender, | 29 GpuVideoDecodeAccelerator(IPC::Sender* sender, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // The underlying VideoDecodeAccelerator. | 89 // The underlying VideoDecodeAccelerator. |
| 88 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 90 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
| 89 | 91 |
| 90 // Callback for making the relevant context current for GL calls. | 92 // Callback for making the relevant context current for GL calls. |
| 91 // Returns false if failed. | 93 // Returns false if failed. |
| 92 base::Callback<bool(void)> make_context_current_; | 94 base::Callback<bool(void)> make_context_current_; |
| 93 | 95 |
| 94 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 96 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
| 95 }; | 97 }; |
| 96 | 98 |
| 99 } // namespace content |
| 100 |
| 97 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 101 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |