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

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

Issue 852103002: Revert of Add accelerated video decoder interface, VP8 and H.264 implementations and hook up to V4L2SVDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h"
13 #include "base/message_loop/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
14 #include "base/stl_util.h" 13 #include "base/stl_util.h"
15 14
16 #include "content/common/gpu/gpu_channel.h" 15 #include "content/common/gpu/gpu_channel.h"
17 #include "content/common/gpu/gpu_messages.h" 16 #include "content/common/gpu/gpu_messages.h"
18 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
19 #include "gpu/command_buffer/common/command_buffer.h" 18 #include "gpu/command_buffer/common/command_buffer.h"
20 #include "ipc/ipc_message_macros.h" 19 #include "ipc/ipc_message_macros.h"
21 #include "ipc/ipc_message_utils.h" 20 #include "ipc/ipc_message_utils.h"
22 #include "ipc/message_filter.h" 21 #include "ipc/message_filter.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 293 }
295 #endif 294 #endif
296 return decoder.Pass(); 295 return decoder.Pass();
297 } 296 }
298 297
299 scoped_ptr<media::VideoDecodeAccelerator> 298 scoped_ptr<media::VideoDecodeAccelerator>
300 GpuVideoDecodeAccelerator::CreateV4L2VDA() { 299 GpuVideoDecodeAccelerator::CreateV4L2VDA() {
301 scoped_ptr<media::VideoDecodeAccelerator> decoder; 300 scoped_ptr<media::VideoDecodeAccelerator> decoder;
302 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ 301 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \
303 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) 302 (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
304 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 303 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
305 if (device.get()) { 304 if (device.get()) {
306 decoder.reset(new V4L2VideoDecodeAccelerator( 305 decoder.reset(new V4L2VideoDecodeAccelerator(
307 gfx::GLSurfaceEGL::GetHardwareDisplay(), 306 gfx::GLSurfaceEGL::GetHardwareDisplay(),
308 stub_->decoder()->GetGLContext()->GetHandle(), 307 stub_->decoder()->GetGLContext()->GetHandle(),
309 weak_factory_for_io_.GetWeakPtr(), 308 weak_factory_for_io_.GetWeakPtr(),
310 make_context_current_, 309 make_context_current_,
311 device, 310 device.Pass(),
312 io_message_loop_)); 311 io_message_loop_));
313 } 312 }
314 #endif 313 #endif
315 return decoder.Pass(); 314 return decoder.Pass();
316 } 315 }
317 316
318 scoped_ptr<media::VideoDecodeAccelerator> 317 scoped_ptr<media::VideoDecodeAccelerator>
319 GpuVideoDecodeAccelerator::CreateVaapiVDA() { 318 GpuVideoDecodeAccelerator::CreateVaapiVDA() {
320 scoped_ptr<media::VideoDecodeAccelerator> decoder; 319 scoped_ptr<media::VideoDecodeAccelerator> decoder;
321 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 320 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 return stub_->channel()->Send(message); 555 return stub_->channel()->Send(message);
557 } 556 }
558 557
559 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 558 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
560 bool succeeded) { 559 bool succeeded) {
561 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 560 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
562 Send(message); 561 Send(message);
563 } 562 }
564 563
565 } // namespace content 564 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/generic_v4l2_video_device.h ('k') | content/common/gpu/media/gpu_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698