2
* Copyright 2009, Google Inc.
3
* Author: lexnikitin@google.com (Alexey Nikitin)
5
* V4LLookup provides basic functionality to work with V2L2 devices in Linux
6
* The functionality is implemented as a class with virtual methods for
7
* the purpose of unit testing.
9
#ifndef TALK_SESSION_PHONE_V4LLOOKUP_H_
10
#define TALK_SESSION_PHONE_V4LLOOKUP_H_
18
virtual ~V4LLookup() {}
20
static bool IsV4L2Device(const std::string& device_path) {
21
return GetV4LLookup()->CheckIsV4L2Device(device_path);
24
static void SetV4LLookup(V4LLookup* v4l_lookup) {
25
v4l_lookup_ = v4l_lookup;
28
static V4LLookup* GetV4LLookup() {
30
v4l_lookup_ = new V4LLookup();
36
static V4LLookup* v4l_lookup_;
37
// Making virtual so it is easier to mock
38
virtual bool CheckIsV4L2Device(const std::string& device_path);
41
} // namespace cricket
44
#endif // TALK_SESSION_PHONE_V4LLOOKUP_H_