| 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_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // platform. | 72 // platform. |
| 73 static std::vector<CreateVEAFp> CreateVEAFps(); | 73 static std::vector<CreateVEAFp> CreateVEAFps(); |
| 74 static scoped_ptr<media::VideoEncodeAccelerator> CreateV4L2VEA(); | 74 static scoped_ptr<media::VideoEncodeAccelerator> CreateV4L2VEA(); |
| 75 static scoped_ptr<media::VideoEncodeAccelerator> CreateVaapiVEA(); | 75 static scoped_ptr<media::VideoEncodeAccelerator> CreateVaapiVEA(); |
| 76 static scoped_ptr<media::VideoEncodeAccelerator> CreateAndroidVEA(); | 76 static scoped_ptr<media::VideoEncodeAccelerator> CreateAndroidVEA(); |
| 77 | 77 |
| 78 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer | 78 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer |
| 79 // process. | 79 // process. |
| 80 void OnEncode(int32 frame_id, | 80 void OnEncode(int32 frame_id, |
| 81 base::SharedMemoryHandle buffer_handle, | 81 base::SharedMemoryHandle buffer_handle, |
| 82 uint32 buffer_offset, |
| 82 uint32 buffer_size, | 83 uint32 buffer_size, |
| 83 bool force_keyframe); | 84 bool force_keyframe); |
| 84 void OnUseOutputBitstreamBuffer(int32 buffer_id, | 85 void OnUseOutputBitstreamBuffer(int32 buffer_id, |
| 85 base::SharedMemoryHandle buffer_handle, | 86 base::SharedMemoryHandle buffer_handle, |
| 86 uint32 buffer_size); | 87 uint32 buffer_size); |
| 87 void OnRequestEncodingParametersChange(uint32 bitrate, uint32 framerate); | 88 void OnRequestEncodingParametersChange(uint32 bitrate, uint32 framerate); |
| 88 | 89 |
| 89 void OnDestroy(); | 90 void OnDestroy(); |
| 90 | 91 |
| 91 void EncodeFrameFinished(int32 frame_id, scoped_ptr<base::SharedMemory> shm); | 92 void EncodeFrameFinished(int32 frame_id, scoped_ptr<base::SharedMemory> shm); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 114 | 115 |
| 115 // Weak pointer for media::VideoFrames that refer back to |this|. | 116 // Weak pointer for media::VideoFrames that refer back to |this|. |
| 116 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; | 117 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; |
| 117 | 118 |
| 118 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); | 119 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); |
| 119 }; | 120 }; |
| 120 | 121 |
| 121 } // namespace content | 122 } // namespace content |
| 122 | 123 |
| 123 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ | 124 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ |
| OLD | NEW |