summaryrefslogtreecommitdiffstats
path: root/vidix
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-06 16:00:12 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-06 16:00:12 +0000
commitb093edc135d2181c760a988c21032f64c5aa6813 (patch)
tree435f5602bb7e669ff26e100871a61048e6be8ed1 /vidix
parentcf96db14ed4540d32100a554bc61269e39040308 (diff)
downloadmpv-b093edc135d2181c760a988c21032f64c5aa6813.tar.bz2
mpv-b093edc135d2181c760a988c21032f64c5aa6813.tar.xz
minor interface changing and verbosing
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4009 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix')
-rw-r--r--vidix/vidix.h4
-rw-r--r--vidix/vidixlib.c31
2 files changed, 28 insertions, 7 deletions
diff --git a/vidix/vidix.h b/vidix/vidix.h
index 31f8e7ff79..ac3a51df05 100644
--- a/vidix/vidix.h
+++ b/vidix/vidix.h
@@ -104,7 +104,7 @@ typedef struct vidix_yuv_s
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 @@ typedef struct vidix_playback_s
#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 */
diff --git a/vidix/vidixlib.c b/vidix/vidixlib.c
index 80e80ae27f..0111af9c27 100644
--- a/vidix/vidixlib.c
+++ b/vidix/vidixlib.c
@@ -81,17 +81,34 @@ static int vdl_probe_driver(VDL_HANDLE stream,const char *path,const char *name,
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 @@ static int vdl_find_driver(VDL_HANDLE stream,const char *path,unsigned cap,int v
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);