]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
Fixes of camera demos
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Feb 2009 16:19:04 +0000 (17:19 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 10 Feb 2009 16:19:04 +0000 (17:19 +0100)
demo/camera/Makefile.omk
demo/camera/camera.c
demo/camera/camera.h
demo/camera/capture_v4l.c
demo/camera/show_video_v4l_capture.c
demo/camera/show_video_v4l_main.c
demo/dcamera/Makefile.omk
demo/dcamera/camclient.c
demo/dcamera/camserver.c
demo/dcamera/show_video_v4l_main.c

index 4781243d970d474899713739d2a705650be95e20..f59b84fcc1d4f6b2640d1ffe06adb44d201b3794 100644 (file)
@@ -1,10 +1,9 @@
 LDFLAGS+= -L/usr/X11R6/lib 
 C_INCLUDE_PATH = -I/usr/X11R6/include
 GLUT_LIBS = glut GL GLU 
-FRSH_LIBS = frshaqcpu frsh qreslib
+FRSH_LIBS = frsh
 lib_LOADLIBES+= $(GLUT_LIBS) m pthread rt $(FRSH_LIBS)
 
 bin_PROGRAMS = camera
 camera_SOURCES = camera.c show_video_v4l_main.c show_video_v4l_capture.c\
                        capture_v4l.c extract_skin_color.c
-include_HEADERS = show_video_v4l.h capture_v4l.h extract_skin_color.h camera.h
index d528079ad85115ae6c900a195ea5131ba60532ca..11efd3da72f8e9015dc0a206edadabb29fd3c88f 100644 (file)
@@ -1,8 +1,7 @@
 #include <frsh.h>
-#include <aqcpu_res.h>
 #include <error.h>
 
-#include <camera.h>
+#include "camera.h"
 
 int main(int argc, char *argv[])
 {
index 389ab2bfd3bfb2ba4574ee6aea1cbbeccadb0f22..1fbd1c782a7b692bd5a63b28565c071422a1f709 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef CAMERA_H
 #define CAMERA_H
 
+#define  PORT  65111
+#define  PROTO FRSH_NETPF_FWP
+
 typedef struct video_args{
        int argc;
        char** argv;
index 53922d9600c449a94d13b0b165236747d7f1c1be..38b0e6db159c0fbae6b2b34d0b89f761e8fef9ce 100644 (file)
@@ -266,7 +266,7 @@ int CaptureV4LSimpleCapture( int fd , struct video_mmap *vmap )
     if( ioctl( fd , VIDIOCSYNC , &(vmap->frame) ) == -1 ) {
        return -1;
     }
-
+    return 0;
 }
 
 int CaptureV4LDoubleBufferingInitCapture( int fd , struct video_mmap *vmap )
@@ -283,7 +283,7 @@ int CaptureV4LDoubleBufferingInitCapture( int fd , struct video_mmap *vmap )
     }
     /*=== Set initial frame number ===*/
     vmap->frame = 0;
-
+    return 0;
 }
 
 int CaptureV4LDoubleBufferingCaptureWait( int fd , struct video_mmap *vmap ) 
index 8396d70b22022aa4a800369a1f4c63c187da6710..84cf66ebf543663fd093577722d73baff14e1784 100644 (file)
@@ -25,7 +25,7 @@ extern int extract_skin_color;        /* global variable for enabling image processing
 void ShowVideoCaptureImage()
 {
 
-    static char image_prefix[1024]=PREFIX_IMAGE_FILE;                  /* Prefix of output image file */
+       //static char image_prefix[1024]=PREFIX_IMAGE_FILE;                     /* Prefix of output image file */
     static unsigned char image[IMAGE_WIDTH_DS*IMAGE_HEIGHT_DS*RGB];    /* Captured image */
     static unsigned char skin_map[IMAGE_WIDTH_DS*IMAGE_HEIGHT_DS];     /* Skin color map */
 
index ff7f242753e7d7dc797b12b4cfe7fd1ed96edb6f..15cc98c6cee504d506fb0b88bd798377e3db7ce5 100644 (file)
@@ -8,7 +8,7 @@
 
 int extract_skin_color;        /* global variable for enabling image processing */
 
-#include <camera.h>
+#include "camera.h"
 //int main( int argc , char *argv[] )
 void* video_thread(void* args)
 {
index 74815093115a660b7d206f8dc6f92de02f825251..b9e98c844a7884608c9a37643816499dfda60a77 100644 (file)
@@ -9,4 +9,3 @@ camserver_SOURCES = camserver.c show_video_v4l_main.c show_video_v4l_capture.c\
                        capture_v4l.c extract_skin_color.c
 camclient_SOURCES = camclient.c show_video_v4l_main.c show_video_v4l_capture.c\
                        capture_v4l.c extract_skin_color.c
-include_HEADERS = show_video_v4l.h capture_v4l.h extract_skin_color.h camera.h
index 7e794fad606aad1960884c42f19d00740c02f0b6..b8a0637010372374cf0a4705361f12bce83bfd61 100644 (file)
@@ -1,8 +1,8 @@
 #include <frsh.h>
 #include <error.h>
 
-#include <camera.h>
-#include <show_video_v4l.h>
+#include "camera.h"
+#include "show_video_v4l.h"
 
 int cpu_negotiated  = 0; 
 int exit_flag = 1;
index 4f4f5ee122cf10ee6063a2e6cc6e02dba1a93eba..0ac6371cacf0f817671ae444499bbb386825b47f 100644 (file)
@@ -1,8 +1,8 @@
 #include <frsh.h>
 #include <error.h>
 
-#include <camera.h>
-#include <show_video_v4l.h>
+#include "camera.h"
+#include "show_video_v4l.h"
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -16,7 +16,7 @@
 #define MSGBUDGET      1
 #define MSGBYTES       MSGSIZE*MSGBUDGET
 
-#define        FRAMEDELAY      500
+#define        FRAMEDELAY      (1000/25)
 
 int cpu_negotiated  = 0; 
 int exit_flag = 1;
index fda9cf5366c2b2c2ecda2385b16abebb741c45c6..ab53bf179634ff6a8c7b0c99d35bd8364295c8af 100644 (file)
@@ -8,7 +8,7 @@
 
 int extract_skin_color;        /* global variable for enabling image processing */
 
-#include <camera.h>
+#include "camera.h"
 //int main( int argc , char *argv[] )
 void* video_thread(void* args)
 {