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 27 matching lines...) Expand all Loading... |
38 : public IPC::Listener, | 38 : public IPC::Listener, |
39 public media::VideoEncodeAccelerator, | 39 public media::VideoEncodeAccelerator, |
40 public CommandBufferProxyImpl::DeletionObserver, | 40 public CommandBufferProxyImpl::DeletionObserver, |
41 public base::NonThreadSafe { | 41 public base::NonThreadSafe { |
42 public: | 42 public: |
43 // |this| is guaranteed not to outlive |channel| and |impl|. (See comments | 43 // |this| is guaranteed not to outlive |channel| and |impl|. (See comments |
44 // for |channel_| and |impl_|.) | 44 // for |channel_| and |impl_|.) |
45 GpuVideoEncodeAcceleratorHost(GpuChannelHost* channel, | 45 GpuVideoEncodeAcceleratorHost(GpuChannelHost* channel, |
46 CommandBufferProxyImpl* impl); | 46 CommandBufferProxyImpl* impl); |
47 | 47 |
48 static std::vector<media::VideoEncodeAccelerator::SupportedProfile> | |
49 ConvertGpuToMediaProfiles(const std::vector< | |
50 gpu::VideoEncodeAcceleratorSupportedProfile>& gpu_profiles); | |
51 | |
52 // IPC::Listener implementation. | 48 // IPC::Listener implementation. |
53 bool OnMessageReceived(const IPC::Message& message) override; | 49 bool OnMessageReceived(const IPC::Message& message) override; |
54 void OnChannelError() override; | 50 void OnChannelError() override; |
55 | 51 |
56 // media::VideoEncodeAccelerator implementation. | 52 // media::VideoEncodeAccelerator implementation. |
57 std::vector<SupportedProfile> GetSupportedProfiles() override; | 53 std::vector<SupportedProfile> GetSupportedProfiles() override; |
58 bool Initialize(media::VideoFrame::Format input_format, | 54 bool Initialize(media::VideoFrame::Format input_format, |
59 const gfx::Size& input_visible_size, | 55 const gfx::Size& input_visible_size, |
60 media::VideoCodecProfile output_profile, | 56 media::VideoCodecProfile output_profile, |
61 uint32 initial_bitrate, | 57 uint32 initial_bitrate, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 112 |
117 // WeakPtr factory for posting tasks back to itself. | 113 // WeakPtr factory for posting tasks back to itself. |
118 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; | 114 base::WeakPtrFactory<GpuVideoEncodeAcceleratorHost> weak_this_factory_; |
119 | 115 |
120 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); | 116 DISALLOW_COPY_AND_ASSIGN(GpuVideoEncodeAcceleratorHost); |
121 }; | 117 }; |
122 | 118 |
123 } // namespace content | 119 } // namespace content |
124 | 120 |
125 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ | 121 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_VIDEO_ENCODE_ACCELERATOR_HOST_H_ |
OLD | NEW |