[Mplayer-cvslog] CVS: main/vidix vidix.h,1.2,1.3 vidixlib.c,1.2,1.3

Nick Kurshev nick at mplayer.dev.hu
Sun Jan 6 17:00:15 CET 2002


Update of /cvsroot/mplayer/main/vidix
In directory mplayer:/var/tmp.root/cvs-serv32133

Modified Files:
	vidix.h vidixlib.c 
Log Message:
minor interface changing and verbosing

Index: vidix.h
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/vidix.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vidix.h	5 Jan 2002 18:16:19 -0000	1.2
+++ vidix.h	6 Jan 2002 16:00:12 -0000	1.3
@@ -104,7 +104,7 @@
 typedef struct vidix_rect_s
 {
 	unsigned x,y,w,h;	/* in pixels */
-	vidix_yuv_t pitch;	/* bytes per line */
+	vidix_yuv_t pitch;	/* line-align in bytes */
 }vidix_rect_t;
 
 typedef struct vidix_color_key_s
@@ -145,7 +145,7 @@
 #define KEYS_XOR	3
 	unsigned	key_op;		/* app -> driver: keys operations */
 	/* memory model */
-	unsigned	frame_size;		/* app -> driver */
+	unsigned	frame_size;		/* driver -> app; destinition frame size */
 	unsigned	num_frames;		/* app -> driver; after call: driver -> app */
 #define LVO_MAXFRAMES 32
 	unsigned	offsets[LVO_MAXFRAMES];	/* driver -> app */

Index: vidixlib.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/vidixlib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vidixlib.c	5 Jan 2002 18:16:19 -0000	1.2
+++ vidixlib.c	6 Jan 2002 16:00:12 -0000	1.3
@@ -81,17 +81,34 @@
   int      (*_cap)(vidix_capability_t*);
   strcpy(drv_name,path);
   strcat(drv_name,name);
+  if(verbose) printf("vidixlib: PROBING: %s\n",drv_name);
   if(!(t_vdl(stream)->handle = dlopen(drv_name,RTLD_NOW|RTLD_GLOBAL))) return 0;
   _ver = dlsym(t_vdl(stream)->handle,"vixGetVersion");
   _probe = dlsym(t_vdl(stream)->handle,"vixProbe");
   _cap = dlsym(t_vdl(stream)->handle,"vixGetCapability");
-  if(_ver) { if((*_ver)() != VIDIX_VERSION) { err: dlclose(t_vdl(stream)->handle); t_vdl(stream)->handle = 0; return 0; } }
-  else goto err;
+  if(_ver) 
+  {
+    if((*_ver)() != VIDIX_VERSION) 
+    { 
+      if(verbose) printf("vidixlib: %s has wrong version\n",drv_name);
+      err:
+      dlclose(t_vdl(stream)->handle);
+      t_vdl(stream)->handle = 0;
+      return 0;
+     }
+  }
+  else
+  {
+    fatal_err:
+    if(verbose) printf("vidixlib: %s has no function definition\n",drv_name);
+    goto err;
+  }
   if(_probe) { if((*_probe)(verbose) != 0) goto err; }
-  else goto err;
+  else goto fatal_err;
   if(_cap) { if((*_cap)(&vid_cap) != 0) goto err; }
-  else goto err;
+  else goto fatal_err;
   if((vid_cap.type & cap) != cap) goto err;
+  if(verbose) printf("vidixlib: %s probed o'k\n",drv_name);
   return 1;
 }
 
@@ -104,7 +121,11 @@
   while(!done)
   {
     name = readdir(dstream);
-    if(name) { if(vdl_probe_driver(stream,path,name->d_name,cap,verbose)) break; }
+    if(name) 
+    { 
+      if(name->d_name[0] != '.')
+	if(vdl_probe_driver(stream,path,name->d_name,cap,verbose)) break; 
+    }
     else done = 1;
   }
   closedir(dstream);




More information about the MPlayer-cvslog mailing list