summaryrefslogtreecommitdiff
path: root/camera/V4LCameraAdapter/V4LM2M.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera/V4LCameraAdapter/V4LM2M.cpp')
-rw-r--r--camera/V4LCameraAdapter/V4LM2M.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/camera/V4LCameraAdapter/V4LM2M.cpp b/camera/V4LCameraAdapter/V4LM2M.cpp
index deb0637..d3556ac 100644
--- a/camera/V4LCameraAdapter/V4LM2M.cpp
+++ b/camera/V4LCameraAdapter/V4LM2M.cpp
@@ -78,6 +78,7 @@
#define DEVICE "/dev/videoxx"
#define DEVICE_PATH "/dev/"
#define DEVICE_NAME "videoxx"
+#define DRIVER_NAME "vpe"
/**< File descriptor for device */
@@ -406,6 +407,7 @@ char *detectM2MDevice()
int tempHandle = NULL;
int ret;
struct v4l2_capability cap;
+ char* driver;
memset((void*)&cap, 0, sizeof(v4l2_capability));
@@ -435,6 +437,15 @@ char *detectM2MDevice()
close(tempHandle);
continue;
}
+
+ driver = (char*) cap.driver;
+ //check driver name since non vpe drivers can match all of these other criteria.
+ if (strncmp(driver, DRIVER_NAME, 3) != 0) {
+ ALOGE("Error while checking driver: Not VPE");
+ close(tempHandle);
+ continue;
+ }
+
close(tempHandle);
strcpy(device, video_device_list[i]);
ALOGE("Found VPE M2M device %s!!!", device);