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

Side by Side Diff: webrtc/media/devices/v4llookup.h

Issue 1751583002: Remove unused libudev on Linux. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 9 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 | « webrtc/media/devices/libudevsymboltable.cc ('k') | webrtc/media/devices/v4llookup.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2009 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 /*
12 * Author: lexnikitin@google.com (Alexey Nikitin)
13 *
14 * V4LLookup provides basic functionality to work with V2L2 devices in Linux
15 * The functionality is implemented as a class with virtual methods for
16 * the purpose of unit testing.
17 */
18 #ifndef WEBRTC_MEDIA_DEVICES_V4LLOOKUP_H_
19 #define WEBRTC_MEDIA_DEVICES_V4LLOOKUP_H_
20
21 #include <string>
22
23 #ifdef WEBRTC_LINUX
24 namespace cricket {
25 class V4LLookup {
26 public:
27 virtual ~V4LLookup() {}
28
29 static bool IsV4L2Device(const std::string& device_path) {
30 return GetV4LLookup()->CheckIsV4L2Device(device_path);
31 }
32
33 static void SetV4LLookup(V4LLookup* v4l_lookup) {
34 v4l_lookup_ = v4l_lookup;
35 }
36
37 static V4LLookup* GetV4LLookup() {
38 if (!v4l_lookup_) {
39 v4l_lookup_ = new V4LLookup();
40 }
41 return v4l_lookup_;
42 }
43
44 protected:
45 static V4LLookup* v4l_lookup_;
46 // Making virtual so it is easier to mock
47 virtual bool CheckIsV4L2Device(const std::string& device_path);
48 };
49
50 } // namespace cricket
51
52 #endif // WEBRTC_LINUX
53 #endif // WEBRTC_MEDIA_DEVICES_V4LLOOKUP_H_
OLDNEW
« no previous file with comments | « webrtc/media/devices/libudevsymboltable.cc ('k') | webrtc/media/devices/v4llookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698