| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 uint32 framerate_num) override; | 63 uint32 framerate_num) override; |
| 64 void Destroy() override; | 64 void Destroy() override; |
| 65 | 65 |
| 66 // CommandBufferProxyImpl::DeletionObserver implemetnation. | 66 // CommandBufferProxyImpl::DeletionObserver implemetnation. |
| 67 void OnWillDeleteImpl() override; | 67 void OnWillDeleteImpl() override; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 // Only Destroy() should be deleting |this|. | 70 // Only Destroy() should be deleting |this|. |
| 71 ~GpuVideoEncodeAcceleratorHost() override; | 71 ~GpuVideoEncodeAcceleratorHost() override; |
| 72 | 72 |
| 73 // Encode implementations for video frames with different storage types. |
| 74 // Return true on successful completion. |
| 75 bool EncodeNativeTexture(const scoped_refptr<media::VideoFrame>& frame, |
| 76 bool force_keyframe); |
| 77 bool EncodeSharedMemory(const scoped_refptr<media::VideoFrame>& frame, |
| 78 bool force_keyframe); |
| 79 |
| 73 // Notify |client_| of an error. Posts a task to avoid re-entrancy. | 80 // Notify |client_| of an error. Posts a task to avoid re-entrancy. |
| 74 void PostNotifyError(Error); | 81 void PostNotifyError(Error); |
| 75 | 82 |
| 76 void Send(IPC::Message* message); | 83 void Send(IPC::Message* message); |
| 77 | 84 |
| 78 // IPC handlers, proxying media::VideoEncodeAccelerator::Client for the GPU | 85 // IPC handlers, proxying media::VideoEncodeAccelerator::Client for the GPU |
| 79 // process. Should not be called directly. | 86 // process. Should not be called directly. |
| 80 void OnRequireBitstreamBuffers(uint32 input_count, | 87 void OnRequireBitstreamBuffers(uint32 input_count, |
| 81 const gfx::Size& input_coded_size, | 88 const gfx::Size& input_coded_size, |
| 82 uint32 output_buffer_size); | 89 uint32 output_buffer_size); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 112 | 119 |
| 113 // WeakPtr factory for posting tasks back to itself. | 120 // WeakPtr factory for posting tasks back to itself. |
| 114 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; | 121 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; |
| 115 | 122 |
| 116 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); | 123 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); |
| 117 }; | 124 }; |
| 118 | 125 |
| 119 } // namespace content | 126 } // namespace content |
| 120 | 127 |
| 121 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 128 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
| OLD | NEW |