[artoolkit-commits] artoolkit/lib/SRC/VideoLinuxV4L video.c, 1.6, 1.7
Optical marker tracking and overlay for augmented reality.
Brought to you by:
philip_lamb
From: Philip L. <phi...@us...> - 2006-09-18 23:31:21
|
Update of /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinuxV4L In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv9349 Modified Files: video.c Log Message: Make default behaviour consistent across Linux video libs. Index: video.c =================================================================== RCS file: /cvsroot/artoolkit/artoolkit/lib/SRC/VideoLinuxV4L/video.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** video.c 18 Sep 2006 05:24:06 -0000 1.6 --- video.c 18 Sep 2006 23:31:18 -0000 1.7 *************** *** 144,148 **** } ! AR2VideoParamT *ar2VideoOpen( char *config ) { AR2VideoParamT *vid; --- 144,148 ---- } ! AR2VideoParamT *ar2VideoOpen( char *config_in ) { AR2VideoParamT *vid; *************** *** 150,175 **** struct video_channel vc[MAXCHANNEL]; struct video_picture vp; ! char *a, line[256]; int i; int adjust = 1; ! /* following plainly copied from Wayne :) */ ! /* If no config string is supplied, we should use the environment variable otherwise set a sane default */ ! if (!strcmp (config, "")) { ! ! /* None suppplied, lets see if the user supplied one from the shell */ ! char *envconf = getenv ("ARTOOLKIT_CONFIG"); ! if ((envconf != NULL) && (strcmp (envconf, ""))) { config = envconf; ! printf ("Using config string from environment [%s]\n", config); ! } ! else { ! printf ("No config string supplied, please consult documentation\n"); } ! } else ! printf ("Using supplied config string [%s]\n", config); ! ! arMalloc( vid, AR2VideoParamT, 1 ); --- 150,173 ---- struct video_channel vc[MAXCHANNEL]; struct video_picture vp; ! char *config, *a, line[256]; int i; int adjust = 1; ! /* If no config string is supplied, we should use the environment variable, otherwise set a sane default */ ! if (!config_in || !(config_in[0])) { ! /* None suppplied, lets see if the user supplied one from the shell */ ! char *envconf = getenv ("ARTOOLKIT_CONFIG"); ! if (envconf) { config = envconf; ! printf ("Using config string from environment [%s].\n", envconf); ! } else { ! config = NULL; ! printf ("No video config string supplied, using defaults.\n"); } ! } else { ! config = config_in; ! printf ("Using supplied video config string [%s].\n", config_in); ! } arMalloc( vid, AR2VideoParamT, 1 ); *************** *** 192,196 **** vid->videoBuffer=NULL; ! a = config; if( a != NULL) { for(;;) { --- 190,194 ---- vid->videoBuffer=NULL; ! a = config; if( a != NULL) { for(;;) { |