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 <fcntl.h> | 6 #include <fcntl.h> |
7 #include <libdrm/drm_fourcc.h> | 7 #include <libdrm/drm_fourcc.h> |
8 #include <linux/videodev2.h> | 8 #include <linux/videodev2.h> |
9 #include <poll.h> | 9 #include <poll.h> |
10 #include <sys/eventfd.h> | 10 #include <sys/eventfd.h> |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace content { | 34 namespace content { |
35 | 35 |
36 namespace { | 36 namespace { |
37 const char kDecoderDevice[] = "/dev/video-dec"; | 37 const char kDecoderDevice[] = "/dev/video-dec"; |
38 const char kEncoderDevice[] = "/dev/video-enc"; | 38 const char kEncoderDevice[] = "/dev/video-enc"; |
39 const char kImageProcessorDevice[] = "/dev/gsc0"; | 39 const char kImageProcessorDevice[] = "/dev/gsc0"; |
40 } | 40 } |
41 | 41 |
42 GenericV4L2Device::GenericV4L2Device(Type type) | 42 GenericV4L2Device::GenericV4L2Device(Type type) |
43 : type_(type), | 43 : V4L2Device(type), |
44 use_libv4l2_(false) { | 44 use_libv4l2_(false) { |
45 } | 45 } |
46 | 46 |
47 GenericV4L2Device::~GenericV4L2Device() { | 47 GenericV4L2Device::~GenericV4L2Device() { |
48 #if defined(USE_LIBV4L2) | 48 #if defined(USE_LIBV4L2) |
49 if (use_libv4l2_ && device_fd_.is_valid()) | 49 if (use_libv4l2_ && device_fd_.is_valid()) |
50 v4l2_close(device_fd_.release()); | 50 v4l2_close(device_fd_.release()); |
51 #endif | 51 #endif |
52 } | 52 } |
53 | 53 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 StubPathMap paths; | 290 StubPathMap paths; |
291 paths[kModuleV4l2].push_back(kV4l2Lib); | 291 paths[kModuleV4l2].push_back(kV4l2Lib); |
292 | 292 |
293 return InitializeStubs(paths); | 293 return InitializeStubs(paths); |
294 #else | 294 #else |
295 return true; | 295 return true; |
296 #endif | 296 #endif |
297 } | 297 } |
298 | 298 |
299 } // namespace content | 299 } // namespace content |
OLD | NEW |