summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-08-09 09:15:56 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-08-09 09:15:56 +0000
commit592e18828f4a93966ba152b2e3bfb9877c5accc1 (patch)
treee72a374d5e6822b7c99f43548f9f5c0b5486baeb /legacy/emotion/src/lib
parent6ac11a98068eb727cd65e8191e53fa16b570cc33 (diff)
emotion: make v4l2 optionnal.
SVN revision: 62243
Diffstat (limited to 'legacy/emotion/src/lib')
-rw-r--r--legacy/emotion/src/lib/emotion_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/legacy/emotion/src/lib/emotion_main.c b/legacy/emotion/src/lib/emotion_main.c
index f25fa37cfe..80c7ed72aa 100644
--- a/legacy/emotion/src/lib/emotion_main.c
+++ b/legacy/emotion/src/lib/emotion_main.c
@@ -6,7 +6,9 @@
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8# include <sys/ioctl.h> 8# include <sys/ioctl.h>
9# include <linux/videodev2.h> 9# ifdef HAVE_V4L2
10# include <linux/videodev2.h>
11# endif
10 12
11# include <Ecore.h> 13# include <Ecore.h>
12# include <Eeze.h> 14# include <Eeze.h>
@@ -144,12 +146,15 @@ emotion_webcam_destroy(Emotion_Webcam *ew)
144static void 146static void
145_emotion_check_device(Emotion_Webcam *ew) 147_emotion_check_device(Emotion_Webcam *ew)
146{ 148{
149#ifdef HAVE_V4L2
147 Emotion_Webcam *check; 150 Emotion_Webcam *check;
148 Eina_List *l; 151 Eina_List *l;
149 struct v4l2_capability caps; 152 struct v4l2_capability caps;
150 int fd; 153 int fd;
154#endif
151 155
152 if (!ew) return ; 156 if (!ew) return ;
157#ifdef HAVE_V4L2
153 if (!ew->device) goto on_error; 158 if (!ew->device) goto on_error;
154 159
155 fd = open(ew->filename, O_RDONLY); 160 fd = open(ew->filename, O_RDONLY);
@@ -175,6 +180,7 @@ _emotion_check_device(Emotion_Webcam *ew)
175 return ; 180 return ;
176 181
177 on_error: 182 on_error:
183#endif
178 fprintf(stderr, "'%s' is not a webcam ['%s']\n", ew->name, strerror(errno)); 184 fprintf(stderr, "'%s' is not a webcam ['%s']\n", ew->name, strerror(errno));
179 eina_stringshare_del(ew->syspath); 185 eina_stringshare_del(ew->syspath);
180 eina_stringshare_del(ew->device); 186 eina_stringshare_del(ew->device);