diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-23 07:58:34 -0700 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2011-09-23 09:08:26 -0700 |
commit | c68dbbef0118eab4256acfc0d9430f0e557a82a1 (patch) | |
tree | 2308288c3fae94e758fb5c6a6d770cacebc93483 /android/camera/camera-capture-windows.c | |
parent | 65769f5966d86278cccab3f43e2b67f499de4314 (diff) | |
download | external_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-windows.c')
-rwxr-xr-x | android/camera/camera-capture-windows.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/android/camera/camera-capture-windows.c b/android/camera/camera-capture-windows.c index fff078e..28820a8 100755 --- a/android/camera/camera-capture-windows.c +++ b/android/camera/camera-capture-windows.c @@ -23,9 +23,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 */ @@ -252,8 +252,6 @@ camera_device_start_capturing(CameraDevice* cd, /* Connect capture window to the video capture driver. */ if (!capDriverConnect(wcd->cap_window, wcd->input_channel)) { - E("%s: Unable to connect to the video capturing driver #%d: %d", - __FUNCTION__, wcd->input_channel, GetLastError()); return -1; } |