diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-05 09:01:06 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-04-05 12:09:37 +0200 |
commit | ae45e28aab6631d0233754b5c2502c931483091a (patch) | |
tree | 5f2ccb05185c09b7e3263b10207a2bc45c3ee876 | |
parent | 46887c48055fb9101ebedadf52c8f8b13b0e8918 (diff) | |
download | cv-ae45e28aab6631d0233754b5c2502c931483091a.tar.gz cv-ae45e28aab6631d0233754b5c2502c931483091a.tar.bz2 cv-ae45e28aab6631d0233754b5c2502c931483091a.zip |
capture: Overload perror to hide some OpenCV error messages
-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)); +} |