diff options
-rw-r--r-- | capture.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -7,6 +7,8 @@ #include <cv.h> #include <highgui.h> +#include <errno.h> + /* Only available as of GTK 3.4 */ #ifndef GDK_BUTTON_PRIMARY #define GDK_BUTTON_PRIMARY 1 @@ -257,3 +259,13 @@ main(int argc, char *argv[]) return 0; } + +/* FIXME: Need to overload perror so that invalid OpenCV messages are hidden. */ +void +perror(const char *s) +{ + if (strcmp("VIDIOC_QUERYMENU", s) == 0) + return; + + fprintf(stderr, "%s: %s\n", s, strerror(errno)); +} |