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

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

Issue 828063009: Clean up V4L2 codec-related flags and defines (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"
(...skipping 12 matching lines...) Expand all
23 #include "media/base/limits.h" 23 #include "media/base/limits.h"
24 #include "ui/gl/gl_context.h" 24 #include "ui/gl/gl_context.h"
25 #include "ui/gl/gl_surface_egl.h" 25 #include "ui/gl/gl_surface_egl.h"
26 26
27 #if defined(OS_WIN) 27 #if defined(OS_WIN)
28 #include "base/win/windows_version.h" 28 #include "base/win/windows_version.h"
29 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" 29 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
30 #elif defined(OS_MACOSX) 30 #elif defined(OS_MACOSX)
31 #include "content/common/gpu/media/vt_video_decode_accelerator.h" 31 #include "content/common/gpu/media/vt_video_decode_accelerator.h"
32 #elif defined(OS_CHROMEOS) 32 #elif defined(OS_CHROMEOS)
33 #if defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2)
34 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
35 #endif // defined(ARCH_CPU_ARMEL)
36 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) 33 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
37 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" 34 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h"
38 #include "content/common/gpu/media/v4l2_video_device.h" 35 #include "content/common/gpu/media/v4l2_video_device.h"
36 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h"
Pawel Osciak 2015/01/22 08:30:02 Lexicographical order please.
henryhsu 2015/01/22 09:09:09 Done.
39 // defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) 37 // defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC))
Pawel Osciak 2015/01/22 08:30:02 I think this is more confusing than helpful. I'd r
henryhsu 2015/01/22 09:09:09 Done.
40 #endif 38 #endif
41 #if defined(ARCH_CPU_X86_FAMILY) 39 #if defined(ARCH_CPU_X86_FAMILY)
42 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" 40 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
43 #include "ui/gl/gl_implementation.h" 41 #include "ui/gl/gl_implementation.h"
44 #endif // defined(ARCH_CPU_X86_FAMILY) 42 #endif // defined(ARCH_CPU_X86_FAMILY)
45 #elif defined(USE_OZONE) 43 #elif defined(USE_OZONE)
46 #include "media/ozone/media_ozone_platform.h" 44 #include "media/ozone/media_ozone_platform.h"
47 #elif defined(OS_ANDROID) 45 #elif defined(OS_ANDROID)
48 #include "content/common/gpu/media/android_video_decode_accelerator.h" 46 #include "content/common/gpu/media/android_video_decode_accelerator.h"
49 #endif 47 #endif
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 device, 313 device,
316 io_message_loop_)); 314 io_message_loop_));
317 } 315 }
318 #endif 316 #endif
319 return decoder.Pass(); 317 return decoder.Pass();
320 } 318 }
321 319
322 scoped_ptr<media::VideoDecodeAccelerator> 320 scoped_ptr<media::VideoDecodeAccelerator>
323 GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() { 321 GpuVideoDecodeAccelerator::CreateV4L2SliceVDA() {
324 scoped_ptr<media::VideoDecodeAccelerator> decoder; 322 scoped_ptr<media::VideoDecodeAccelerator> decoder;
325 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2) 323 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \
324 (defined(USE_OZONE) && defined(USE_V4L2_CODEC)))
326 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); 325 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder);
327 if (device.get()) { 326 if (device.get()) {
328 decoder.reset(new V4L2SliceVideoDecodeAccelerator( 327 decoder.reset(new V4L2SliceVideoDecodeAccelerator(
329 device, 328 device,
330 gfx::GLSurfaceEGL::GetHardwareDisplay(), 329 gfx::GLSurfaceEGL::GetHardwareDisplay(),
331 stub_->decoder()->GetGLContext()->GetHandle(), 330 stub_->decoder()->GetGLContext()->GetHandle(),
332 weak_factory_for_io_.GetWeakPtr(), 331 weak_factory_for_io_.GetWeakPtr(),
333 make_context_current_, 332 make_context_current_,
334 io_message_loop_)); 333 io_message_loop_));
335 } 334 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 return stub_->channel()->Send(message); 577 return stub_->channel()->Send(message);
579 } 578 }
580 579
581 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 580 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
582 bool succeeded) { 581 bool succeeded) {
583 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 582 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
584 Send(message); 583 Send(message);
585 } 584 }
586 585
587 } // namespace content 586 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698