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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // GpuCommandBufferStub::DestructionObserver implementation. | 56 // GpuCommandBufferStub::DestructionObserver implementation. |
57 virtual void OnWillDestroyStub() OVERRIDE; | 57 virtual void OnWillDestroyStub() OVERRIDE; |
58 | 58 |
59 // Static query for supported profiles. This query calls the appropriate | 59 // Static query for supported profiles. This query calls the appropriate |
60 // platform-specific version. | 60 // platform-specific version. |
61 static std::vector<media::VideoEncodeAccelerator::SupportedProfile> | 61 static std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
62 GetSupportedProfiles(); | 62 GetSupportedProfiles(); |
63 | 63 |
64 private: | 64 private: |
65 // Create the appropriate platform-specific VEA. | 65 // Create the appropriate platform-specific VEA. |
66 void CreateEncoder(); | 66 static scoped_ptr<media::VideoEncodeAccelerator> CreateEncoder(); |
67 | 67 |
68 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer | 68 // IPC handlers, proxying media::VideoEncodeAccelerator for the renderer |
69 // process. | 69 // process. |
70 void OnEncode(int32 frame_id, | 70 void OnEncode(int32 frame_id, |
71 base::SharedMemoryHandle buffer_handle, | 71 base::SharedMemoryHandle buffer_handle, |
72 uint32 buffer_size, | 72 uint32 buffer_size, |
73 bool force_keyframe); | 73 bool force_keyframe); |
74 void OnUseOutputBitstreamBuffer(int32 buffer_id, | 74 void OnUseOutputBitstreamBuffer(int32 buffer_id, |
75 base::SharedMemoryHandle buffer_handle, | 75 base::SharedMemoryHandle buffer_handle, |
76 uint32 buffer_size); | 76 uint32 buffer_size); |
(...skipping 27 matching lines...) Expand all Loading... |
104 | 104 |
105 // Weak pointer for media::VideoFrames that refer back to |this|. | 105 // Weak pointer for media::VideoFrames that refer back to |this|. |
106 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; | 106 base::WeakPtrFactory<GpuVideoEncodeAccelerator> weak_this_factory_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); | 108 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAccelerator); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace content | 111 } // namespace content |
112 | 112 |
113 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ | 113 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_ENCODE_ACCELERATOR_H_ |
OLD | NEW |