Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Side by Side Diff: content/common/gpu/media/gpu_video_encode_accelerator.cc

Issue 668633002: Duplicate VideoEncodeAccelerator::SupportedProfile in gpu_info.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_encode_accelerator.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 void GpuVideoEncodeAccelerator::OnWillDestroyStub() { 157 void GpuVideoEncodeAccelerator::OnWillDestroyStub() {
158 DCHECK(stub_); 158 DCHECK(stub_);
159 stub_->channel()->RemoveRoute(host_route_id_); 159 stub_->channel()->RemoveRoute(host_route_id_);
160 stub_->RemoveDestructionObserver(this); 160 stub_->RemoveDestructionObserver(this);
161 encoder_.reset(); 161 encoder_.reset();
162 delete this; 162 delete this;
163 } 163 }
164 164
165 // static 165 // static
166 std::vector<media::VideoEncodeAccelerator::SupportedProfile> 166 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>
167 GpuVideoEncodeAccelerator::GetSupportedProfiles() { 167 GpuVideoEncodeAccelerator::GetSupportedProfiles() {
168 #if defined(OS_CHROMEOS) && defined(USE_X11) && defined(ARCH_CPU_ARMEL) 168 #if defined(OS_CHROMEOS) && defined(USE_X11) && defined(ARCH_CPU_ARMEL)
169 // This is a work-around for M39 because the video device is not ready at 169 // This is a work-around for M39 because the video device is not ready at
170 // boot. 170 // boot.
171 // TODO(wuchengli): remove this after http://crbug.com/418762 is fixed. 171 // TODO(wuchengli): remove this after http://crbug.com/418762 is fixed.
172 return V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic(); 172 return V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic();
173 #endif 173 #endif
174 scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder(); 174 scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder();
175 if (!encoder) 175 if (!encoder)
176 return std::vector<media::VideoEncodeAccelerator::SupportedProfile>(); 176 return std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>();
177 return encoder->GetSupportedProfiles(); 177 return encoder->GetSupportedProfiles();
178 } 178 }
179 179
180 scoped_ptr<media::VideoEncodeAccelerator> 180 scoped_ptr<media::VideoEncodeAccelerator>
181 GpuVideoEncodeAccelerator::CreateEncoder() { 181 GpuVideoEncodeAccelerator::CreateEncoder() {
182 scoped_ptr<media::VideoEncodeAccelerator> encoder; 182 scoped_ptr<media::VideoEncodeAccelerator> encoder;
183 #if defined(OS_CHROMEOS) && defined(USE_X11) 183 #if defined(OS_CHROMEOS) && defined(USE_X11)
184 #if defined(ARCH_CPU_ARMEL) 184 #if defined(ARCH_CPU_ARMEL)
185 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); 185 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder);
186 if (device) 186 if (device)
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 stub_->channel()->Send(message); 304 stub_->channel()->Send(message);
305 } 305 }
306 306
307 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, 307 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message,
308 bool succeeded) { 308 bool succeeded) {
309 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); 309 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded);
310 Send(message); 310 Send(message);
311 } 311 }
312 312
313 } // namespace content 313 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698