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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 size_t payload_size, | 53 size_t payload_size, |
54 bool key_frame) override; | 54 bool key_frame) override; |
55 void NotifyError(media::VideoEncodeAccelerator::Error error) override; | 55 void NotifyError(media::VideoEncodeAccelerator::Error error) override; |
56 | 56 |
57 // GpuCommandBufferStub::DestructionObserver implementation. | 57 // GpuCommandBufferStub::DestructionObserver implementation. |
58 void OnWillDestroyStub() override; | 58 void OnWillDestroyStub() override; |
59 | 59 |
60 // Static query for supported profiles. This query calls the appropriate | 60 // Static query for supported profiles. This query calls the appropriate |
61 // platform-specific version. | 61 // platform-specific version. |
62 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> | 62 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
63 GetSupportedProfiles(); | 63 GetSupportedProfiles(); |
64 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> | 64 static std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
65 ConvertMediaToGpuProfiles(const std::vector< | 65 ConvertMediaToGpuProfiles(const std::vector< |
66 media::VideoEncodeAccelerator::SupportedProfile>& media_profiles); | 66 media::VideoEncodeAccelerator::SupportedProfile>& media_profiles); |
67 | 67 |
68 private: | 68 private: |
69 // Create the appropriate platform-specific VEA. | 69 // Create and return the pointers of the appropriate platform-specific VEAs. |
Pawel Osciak
2014/12/28 23:28:03
s/of/to/
henryhsu
2014/12/29 09:43:27
Done.
| |
70 static scoped_ptr<media::VideoEncodeAccelerator> CreateEncoder(); | 70 static std::vector<media::VideoEncodeAccelerator*> CreateEncoders(); |
Pawel Osciak
2014/12/28 23:28:03
This makes me worried. Who owns the pointers? How
henryhsu
2014/12/29 09:43:26
ScopedVector doesn't support DefaultDeleter. As di
| |
71 | 71 |
72 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer | 72 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer |
73 // process. | 73 // process. |
74 void OnEncode(int32 frame_id, | 74 void OnEncode(int32 frame_id, |
75 base::SharedMemoryHandle buffer_handle, | 75 base::SharedMemoryHandle buffer_handle, |
76 uint32 buffer_size, | 76 uint32 buffer_size, |
77 bool force_keyframe); | 77 bool force_keyframe); |
78 void OnUseOutputBitstreamBuffer(int32 buffer_id, | 78 void OnUseOutputBitstreamBuffer(int32 buffer_id, |
79 base::SharedMemoryHandle buffer_handle, | 79 base::SharedMemoryHandle buffer_handle, |
80 uint32 buffer_size); | 80 uint32 buffer_size); |
(...skipping 27 matching lines...) Expand all Loading... | |
108 | 108 |
109 // Weak pointer for media::VideoFrames that refer back to |this|. | 109 // Weak pointer for media::VideoFrames that refer back to |this|. |
110 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; | 110 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); | 112 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace content | 115 } // namespace content |
116 | 116 |
117 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ | 117 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |