aboutsummaryrefslogtreecommitdiffstats
path: root/android/camera/camera-capture-linux.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-09-23 07:58:34 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-09-23 09:08:26 -0700
commitc68dbbef0118eab4256acfc0d9430f0e557a82a1 (patch)
tree2308288c3fae94e758fb5c6a6d770cacebc93483 /android/camera/camera-capture-linux.c
parent65769f5966d86278cccab3f43e2b67f499de4314 (diff)
downloadexternal_qemu-c68dbbef0118eab4256acfc0d9430f0e557a82a1.zip
external_qemu-c68dbbef0118eab4256acfc0d9430f0e557a82a1.tar.gz
external_qemu-c68dbbef0118eab4256acfc0d9430f0e557a82a1.tar.bz2
Timeout frame capturing.
It has been observed on some of the MS camera devices, that device may got stuck on something that would alwais return EAGAIN when queried for the next video frame. This requires us to timeout the loop that repeats attempts to acquire first frame from the device. Also added detection and reporting of I/O errors occurred during frame capturing. Also, this CL contains some cosmetick changes to error and warning reporting. Change-Id: I81edaf5ff8bfe147dbe4510e1446e77a87817f37
Diffstat (limited to 'android/camera/camera-capture-linux.c')
-rw-r--r--android/camera/camera-capture-linux.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/android/camera/camera-capture-linux.c b/android/camera/camera-capture-linux.c
index 0975f0e..8a96c0c 100644
--- a/android/camera/camera-capture-linux.c
+++ b/android/camera/camera-capture-linux.c
@@ -26,9 +26,9 @@
#include "android/camera/camera-capture.h"
#include "android/camera/camera-format-converters.h"
+#define E(...) derror(__VA_ARGS__)
+#define W(...) dwarning(__VA_ARGS__)
#define D(...) VERBOSE_PRINT(camera,__VA_ARGS__)
-#define W(...) VERBOSE_PRINT(camera,__VA_ARGS__)
-#define E(...) VERBOSE_PRINT(camera,__VA_ARGS__)
#define D_ACTIVE VERBOSE_CHECK(camera)
/* the T(...) macro is used to dump traffic */
@@ -498,8 +498,6 @@ _camera_device_open(LinuxCameraDevice* cd)
struct stat st;
if (stat(cd->device_name, &st)) {
- E("%s: Cannot identify camera device '%s': %s",
- __FUNCTION__, cd->device_name, strerror(errno));
return -1;
}