| 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 "content/common/gpu/media/generic_v4l2_device.h" |
| 7 |
| 6 #include <errno.h> | 8 #include <errno.h> |
| 7 #include <fcntl.h> | 9 #include <fcntl.h> |
| 8 #include <libdrm/drm_fourcc.h> | 10 #include <libdrm/drm_fourcc.h> |
| 9 #include <linux/videodev2.h> | 11 #include <linux/videodev2.h> |
| 10 #include <poll.h> | 12 #include <poll.h> |
| 11 #include <string.h> | 13 #include <string.h> |
| 12 #include <sys/eventfd.h> | 14 #include <sys/eventfd.h> |
| 13 #include <sys/ioctl.h> | 15 #include <sys/ioctl.h> |
| 14 #include <sys/mman.h> | 16 #include <sys/mman.h> |
| 15 | 17 |
| 18 #include <memory> |
| 19 |
| 16 #include "base/files/scoped_file.h" | 20 #include "base/files/scoped_file.h" |
| 17 #include "base/macros.h" | 21 #include "base/macros.h" |
| 18 #include "base/posix/eintr_wrapper.h" | 22 #include "base/posix/eintr_wrapper.h" |
| 19 #include "base/trace_event/trace_event.h" | 23 #include "base/trace_event/trace_event.h" |
| 20 #include "build/build_config.h" | 24 #include "build/build_config.h" |
| 21 #include "content/common/gpu/media/generic_v4l2_device.h" | |
| 22 #include "ui/gl/egl_util.h" | 25 #include "ui/gl/egl_util.h" |
| 23 #include "ui/gl/gl_bindings.h" | 26 #include "ui/gl/gl_bindings.h" |
| 24 | 27 |
| 25 #if defined(USE_LIBV4L2) | 28 #if defined(USE_LIBV4L2) |
| 26 // Auto-generated for dlopen libv4l2 libraries | 29 // Auto-generated for dlopen libv4l2 libraries |
| 27 #include "content/common/gpu/media/v4l2_stubs.h" | 30 #include "content/common/gpu/media/v4l2_stubs.h" |
| 28 #include "third_party/v4l-utils/lib/include/libv4l2.h" | 31 #include "third_party/v4l-utils/lib/include/libv4l2.h" |
| 29 | 32 |
| 30 using content_common_gpu_media::kModuleV4l2; | 33 using content_common_gpu_media::kModuleV4l2; |
| 31 using content_common_gpu_media::InitializeStubs; | 34 using content_common_gpu_media::InitializeStubs; |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 StubPathMap paths; | 328 StubPathMap paths; |
| 326 paths[kModuleV4l2].push_back(kV4l2Lib); | 329 paths[kModuleV4l2].push_back(kV4l2Lib); |
| 327 | 330 |
| 328 return InitializeStubs(paths); | 331 return InitializeStubs(paths); |
| 329 #else | 332 #else |
| 330 return true; | 333 return true; |
| 331 #endif | 334 #endif |
| 332 } | 335 } |
| 333 | 336 |
| 334 } // namespace content | 337 } // namespace content |
| OLD | NEW |