| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 5 |
| 6 #include "media/gpu/generic_v4l2_device.h" | 6 #include "media/gpu/generic_v4l2_device.h" |
| 7 | 7 |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <libdrm/drm_fourcc.h> | 10 #include <libdrm/drm_fourcc.h> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "base/posix/eintr_wrapper.h" | 23 #include "base/posix/eintr_wrapper.h" |
| 24 #include "base/strings/stringprintf.h" | 24 #include "base/strings/stringprintf.h" |
| 25 #include "base/trace_event/trace_event.h" | 25 #include "base/trace_event/trace_event.h" |
| 26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 27 #include "media/gpu/generic_v4l2_device.h" | 27 #include "media/gpu/generic_v4l2_device.h" |
| 28 #include "ui/gl/egl_util.h" | 28 #include "ui/gl/egl_util.h" |
| 29 #include "ui/gl/gl_bindings.h" | 29 #include "ui/gl/gl_bindings.h" |
| 30 | 30 |
| 31 #if defined(USE_LIBV4L2) | 31 #if defined(USE_LIBV4L2) |
| 32 // Auto-generated for dlopen libv4l2 libraries | 32 // Auto-generated for dlopen libv4l2 libraries |
| 33 #include "media/gpu/v4l2_stubs.h" | 33 #include "media/gpu/v4l2/v4l2_stubs.h" |
| 34 #include "third_party/v4l-utils/lib/include/libv4l2.h" | 34 #include "third_party/v4l-utils/lib/include/libv4l2.h" |
| 35 | 35 |
| 36 using media_gpu::kModuleV4l2; | 36 using media_gpu_v4l2::kModuleV4l2; |
| 37 using media_gpu::InitializeStubs; | 37 using media_gpu_v4l2::InitializeStubs; |
| 38 using media_gpu::StubPathMap; | 38 using media_gpu_v4l2::StubPathMap; |
| 39 | 39 |
| 40 static const base::FilePath::CharType kV4l2Lib[] = | 40 static const base::FilePath::CharType kV4l2Lib[] = |
| 41 FILE_PATH_LITERAL("/usr/lib/libv4l2.so"); | 41 FILE_PATH_LITERAL("/usr/lib/libv4l2.so"); |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 namespace media { | 44 namespace media { |
| 45 | 45 |
| 46 GenericV4L2Device::GenericV4L2Device() { | 46 GenericV4L2Device::GenericV4L2Device() { |
| 47 #if defined(USE_LIBV4L2) | 47 #if defined(USE_LIBV4L2) |
| 48 use_libv4l2_ = false; | 48 use_libv4l2_ = false; |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 for (const auto& device : devices) { | 486 for (const auto& device : devices) { |
| 487 if (std::find(device.second.begin(), device.second.end(), pixfmt) != | 487 if (std::find(device.second.begin(), device.second.end(), pixfmt) != |
| 488 device.second.end()) | 488 device.second.end()) |
| 489 return device.first; | 489 return device.first; |
| 490 } | 490 } |
| 491 | 491 |
| 492 return std::string(); | 492 return std::string(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace media | 495 } // namespace media |
| OLD | NEW |