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

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

Issue 650183002: Make V4L2VEA GetSupportedProfiles static. (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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
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<media::VideoEncodeAccelerator::SupportedProfile>
167 GpuVideoEncodeAccelerator::GetSupportedProfiles() { 167 GpuVideoEncodeAccelerator::GetSupportedProfiles() {
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
170 // boot.
171 // TODO(wuchengli): remove this.
kcwu 2014/10/14 00:56:58 Please describe the remove condition (or bug id) h
wuchengli 2014/10/14 08:48:46 Done.
172 return V4L2VideoEncodeAccelerator::GetSupportedProfilesStatic();
173 #endif
168 scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder(); 174 scoped_ptr<media::VideoEncodeAccelerator> encoder = CreateEncoder();
169 if (!encoder) 175 if (!encoder)
170 return std::vector<media::VideoEncodeAccelerator::SupportedProfile>(); 176 return std::vector<media::VideoEncodeAccelerator::SupportedProfile>();
171 return encoder->GetSupportedProfiles(); 177 return encoder->GetSupportedProfiles();
172 } 178 }
173 179
174 scoped_ptr<media::VideoEncodeAccelerator> 180 scoped_ptr<media::VideoEncodeAccelerator>
175 GpuVideoEncodeAccelerator::CreateEncoder() { 181 GpuVideoEncodeAccelerator::CreateEncoder() {
176 scoped_ptr<media::VideoEncodeAccelerator> encoder; 182 scoped_ptr<media::VideoEncodeAccelerator> encoder;
177 #if defined(OS_CHROMEOS) && defined(USE_X11) 183 #if defined(OS_CHROMEOS) && defined(USE_X11)
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 stub_->channel()->Send(message); 304 stub_->channel()->Send(message);
299 } 305 }
300 306
301 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, 307 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message,
302 bool succeeded) { 308 bool succeeded) {
303 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); 309 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded);
304 Send(message); 310 Send(message);
305 } 311 }
306 312
307 } // namespace content 313 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698