19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: driverproc.c,v 1.3 2004-04-02 21:29:21 edgomez Exp $ |
* $Id: driverproc.c,v 1.4 2004-04-05 20:36:37 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
33 |
#include "status.h" |
#include "status.h" |
34 |
#include "resource.h" |
#include "resource.h" |
35 |
|
|
36 |
|
static int clean_dll_bindings(CODEC* codec); |
37 |
|
|
38 |
BOOL WINAPI DllMain( |
BOOL WINAPI DllMain( |
39 |
HANDLE hModule, |
HANDLE hModule, |
113 |
/* compress_end/decompress_end don't always get called */ |
/* compress_end/decompress_end don't always get called */ |
114 |
compress_end(codec); |
compress_end(codec); |
115 |
decompress_end(codec); |
decompress_end(codec); |
116 |
|
clean_dll_bindings(codec); |
117 |
status_destroy_always(&codec->status); |
status_destroy_always(&codec->status); |
118 |
free(codec); |
free(codec); |
119 |
return DRV_OK; |
return DRV_OK; |
297 |
} |
} |
298 |
} |
} |
299 |
|
|
|
|
|
300 |
void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow) |
void WINAPI Configure(HWND hwnd, HINSTANCE hinst, LPTSTR lpCmdLine, int nCmdShow) |
301 |
{ |
{ |
302 |
DWORD dwDriverId; |
DWORD dwDriverId; |
308 |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
309 |
} |
} |
310 |
} |
} |
311 |
|
|
312 |
|
static int clean_dll_bindings(CODEC* codec) |
313 |
|
{ |
314 |
|
if(codec->m_hdll) |
315 |
|
{ |
316 |
|
FreeLibrary(codec->m_hdll); |
317 |
|
codec->m_hdll = NULL; |
318 |
|
codec->xvid_global_func = NULL; |
319 |
|
codec->xvid_encore_func = NULL; |
320 |
|
codec->xvid_decore_func = NULL; |
321 |
|
codec->xvid_plugin_single_func = NULL; |
322 |
|
codec->xvid_plugin_2pass1_func = NULL; |
323 |
|
codec->xvid_plugin_2pass2_func = NULL; |
324 |
|
codec->xvid_plugin_lumimasking_func = NULL; |
325 |
|
codec->xvid_plugin_psnr_func = NULL; |
326 |
|
} |
327 |
|
return 0; |
328 |
|
} |