From ae45e28aab6631d0233754b5c2502c931483091a Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 5 Apr 2012 09:01:06 +0200 Subject: capture: Overload perror to hide some OpenCV error messages --- capture.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/capture.c b/capture.c index 6f5ecd0..8576e20 100644 --- a/capture.c +++ b/capture.c @@ -7,6 +7,8 @@ #include #include +#include + /* 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)); +} -- cgit