Mercurial > mplayer.hg
changeset 4008:a37207881d10
minor interface changing and verbosing
author | nick |
---|---|
date | Sun, 06 Jan 2002 16:00:12 +0000 |
parents | 4bf012cfd6ef |
children | 534d10bbff99 |
files | vidix/vidix.h vidix/vidixlib.c |
diffstat | 2 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/vidix/vidix.h Sun Jan 06 15:24:56 2002 +0000 +++ b/vidix/vidix.h Sun Jan 06 16:00:12 2002 +0000 @@ -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 */
--- a/vidix/vidixlib.c Sun Jan 06 15:24:56 2002 +0000 +++ b/vidix/vidixlib.c Sun Jan 06 16:00:12 2002 +0000 @@ -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);