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

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

Issue 902143002: Clean up V4L2 codec-related flags and defines (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « content/common/common.gni ('k') | content/common/gpu/media/gpu_video_encode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 13 matching lines...) Expand all
24 #include "ui/gl/gl_context.h" 24 #include "ui/gl/gl_context.h"
25 #include "ui/gl/gl_image.h" 25 #include "ui/gl/gl_image.h"
26 #include "ui/gl/gl_surface_egl.h" 26 #include "ui/gl/gl_surface_egl.h"
27 27
28 #if defined(OS_WIN) 28 #if defined(OS_WIN)
29 #include "base/win/windows_version.h" 29 #include "base/win/windows_version.h"
30 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" 30 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
31 #elif defined(OS_MACOSX) 31 #elif defined(OS_MACOSX)
32 #include "content/common/gpu/media/vt_video_decode_accelerator.h" 32 #include "content/common/gpu/media/vt_video_decode_accelerator.h"
33 #elif defined(OS_CHROMEOS) 33 #elif defined(OS_CHROMEOS)
34 #if defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2) 34 #if defined(USE_V4L2_CODEC)
35 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" 35 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
36 #endif // defined(ARCH_CPU_ARMEL)
37 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
38 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" 36 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
39 #include "content/common/gpu/media/v4l2_video_device.h" 37 #include "content/common/gpu/media/v4l2_video_device.h"
40 // defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
41 #endif 38 #endif
42 #if defined(ARCH_CPU_X86_FAMILY) 39 #if defined(ARCH_CPU_X86_FAMILY)
43 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" 40 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
44 #include "ui/gl/gl_implementation.h" 41 #include "ui/gl/gl_implementation.h"
45 #endif // defined(ARCH_CPU_X86_FAMILY) 42 #endif
46 #elif defined(USE_OZONE) 43 #elif defined(USE_OZONE)
47 #include "media/ozone/media_ozone_platform.h" 44 #include "media/ozone/media_ozone_platform.h"
48 #elif defined(OS_ANDROID) 45 #elif defined(OS_ANDROID)
49 #include "content/common/gpu/media/android_video_decode_accelerator.h" 46 #include "content/common/gpu/media/android_video_decode_accelerator.h"
50 #endif 47 #endif
51 48
52 #include "ui/gfx/geometry/size.h" 49 #include "ui/gfx/geometry/size.h"
53 50
54 namespace content { 51 namespace content {
55 52
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } else { 293 } else {
297 NOTIMPLEMENTED() << "HW video decode acceleration not available."; 294 NOTIMPLEMENTED() << "HW video decode acceleration not available.";
298 } 295 }
299 #endif 296 #endif
300 return decoder.Pass(); 297 return decoder.Pass();
301 } 298 }
302 299
303 scoped_ptr<media::VideoDecodeAccelerator> 300 scoped_ptr<media::VideoDecodeAccelerator>
304 GpuVideoDecodeAccelerator::CreateV4L2VDA() { 301 GpuVideoDecodeAccelerator::CreateV4L2VDA() {
305 scoped_ptr<media::VideoDecodeAccelerator> decoder; 302 scoped_ptr<media::VideoDecodeAccelerator> decoder;
306 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ 303 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
307 (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
308 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 304 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
309 if (device.get()) { 305 if (device.get()) {
310 decoder.reset(new V4L2VideoDecodeAccelerator( 306 decoder.reset(new V4L2VideoDecodeAccelerator(
311 gfx::GLSurfaceEGL::GetHardwareDisplay(), 307 gfx::GLSurfaceEGL::GetHardwareDisplay(),
312 stub_->decoder()->GetGLContext()->GetHandle(), 308 stub_->decoder()->GetGLContext()->GetHandle(),
313 weak_factory_for_io_.GetWeakPtr(), 309 weak_factory_for_io_.GetWeakPtr(),
314 make_context_current_, 310 make_context_current_,
315 device, 311 device,
316 io_message_loop_)); 312 io_message_loop_));
317 } 313 }
318 #endif 314 #endif
319 return decoder.Pass(); 315 return decoder.Pass();
320 } 316 }
321 317
322 scoped_ptr<media::VideoDecodeAccelerator> 318 scoped_ptr<media::VideoDecodeAccelerator>
323 GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() { 319 GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() {
324 scoped_ptr<media::VideoDecodeAccelerator> decoder; 320 scoped_ptr<media::VideoDecodeAccelerator> decoder;
325 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2) 321 #if defined(OS_CHROMEOS) && defined(USE_V4L2_CODEC)
326 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 322 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
327 if (device.get()) { 323 if (device.get()) {
328 decoder.reset(new V4L2SliceVideoDecodeAccelerator( 324 decoder.reset(new V4L2SliceVideoDecodeAccelerator(
329 device, 325 device,
330 gfx::GLSurfaceEGL::GetHardwareDisplay(), 326 gfx::GLSurfaceEGL::GetHardwareDisplay(),
331 stub_->decoder()->GetGLContext()->GetHandle(), 327 stub_->decoder()->GetGLContext()->GetHandle(),
332 weak_factory_for_io_.GetWeakPtr(), 328 weak_factory_for_io_.GetWeakPtr(),
333 make_context_current_, 329 make_context_current_,
334 io_message_loop_)); 330 io_message_loop_));
335 } 331 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 return stub_->channel()->Send(message); 581 return stub_->channel()->Send(message);
586 } 582 }
587 583
588 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 584 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
589 bool succeeded) { 585 bool succeeded) {
590 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 586 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
591 Send(message); 587 Send(message);
592 } 588 }
593 589
594 } // namespace content 590 } // namespace content
OLDNEW
« no previous file with comments | « content/common/common.gni ('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