Mercurial > mplayer.hg
comparison vidix/vidixlib.c @ 4509:90386125ec1f
using dlerror() instead strerror(), displays unresolved symbol messages
author | alex |
---|---|
date | Sun, 03 Feb 2002 13:05:30 +0000 |
parents | 62a6135d090e |
children | fcd6e49cb3cc |
comparison
equal
deleted
inserted
replaced
4508:fb02f169e8e2 | 4509:90386125ec1f |
---|---|
82 /* check driver viability */ | 82 /* check driver viability */ |
83 if(!( t_vdl(stream)->get_caps && t_vdl(stream)->query_fourcc && | 83 if(!( t_vdl(stream)->get_caps && t_vdl(stream)->query_fourcc && |
84 t_vdl(stream)->config_playback && t_vdl(stream)->playback_on && | 84 t_vdl(stream)->config_playback && t_vdl(stream)->playback_on && |
85 t_vdl(stream)->playback_off)) | 85 t_vdl(stream)->playback_off)) |
86 { | 86 { |
87 printf("vidixlib: Incomplete driver: some features are missed in it.\n"); | 87 printf("vidixlib: Incomplete driver: some of essential features are missed in it.\n"); |
88 return 0; | 88 return 0; |
89 } | 89 } |
90 return 1; | 90 return 1; |
91 } | 91 } |
92 | 92 |
99 strcpy(drv_name,path); | 99 strcpy(drv_name,path); |
100 strcat(drv_name,name); | 100 strcat(drv_name,name); |
101 if(verbose) printf("vidixlib: PROBING: %s\n",drv_name); | 101 if(verbose) printf("vidixlib: PROBING: %s\n",drv_name); |
102 if(!(t_vdl(stream)->handle = dlopen(drv_name,RTLD_LAZY|RTLD_GLOBAL))) | 102 if(!(t_vdl(stream)->handle = dlopen(drv_name,RTLD_LAZY|RTLD_GLOBAL))) |
103 { | 103 { |
104 if(verbose) printf("vidixlib: %s not driver: %s\n",drv_name,strerror(errno)); | 104 if(verbose) printf("vidixlib: %s not driver: %s\n",drv_name,dlerror()); |
105 return 0; | 105 return 0; |
106 } | 106 } |
107 _ver = dlsym(t_vdl(stream)->handle,"vixGetVersion"); | 107 _ver = dlsym(t_vdl(stream)->handle,"vixGetVersion"); |
108 _probe = dlsym(t_vdl(stream)->handle,"vixProbe"); | 108 _probe = dlsym(t_vdl(stream)->handle,"vixProbe"); |
109 _cap = dlsym(t_vdl(stream)->handle,"vixGetCapability"); | 109 _cap = dlsym(t_vdl(stream)->handle,"vixGetCapability"); |
170 unsigned version = 0; | 170 unsigned version = 0; |
171 strcpy(drv_name,path); | 171 strcpy(drv_name,path); |
172 strcat(drv_name,name); | 172 strcat(drv_name,name); |
173 if(!(t_vdl(stream)->handle = dlopen(drv_name,RTLD_NOW|RTLD_GLOBAL))) | 173 if(!(t_vdl(stream)->handle = dlopen(drv_name,RTLD_NOW|RTLD_GLOBAL))) |
174 { | 174 { |
175 if (verbose) | |
176 printf("vidixlib: dlopen error: %s\n", dlerror()); | |
175 err: | 177 err: |
176 free(stream); | 178 free(stream); |
177 return NULL; | 179 return NULL; |
178 } | 180 } |
179 ver = dlsym(t_vdl(stream)->handle,"vixGetVersion"); | 181 ver = dlsym(t_vdl(stream)->handle,"vixGetVersion"); |