35 |
#include "debug.h" |
#include "debug.h" |
36 |
#include "codec.h" |
#include "codec.h" |
37 |
#include "config.h" |
#include "config.h" |
38 |
|
#include "status.h" |
39 |
#include "resource.h" |
#include "resource.h" |
40 |
|
|
41 |
|
|
89 |
return 0; |
return 0; |
90 |
} |
} |
91 |
|
|
92 |
|
|
93 |
|
codec->status.hDlg = NULL; |
94 |
codec->config.ci_valid = 0; |
codec->config.ci_valid = 0; |
95 |
codec->ehandle = codec->dhandle = NULL; |
codec->ehandle = codec->dhandle = NULL; |
96 |
codec->fbase = 25; |
codec->fbase = 25; |
97 |
codec->fincr = 1; |
codec->fincr = 1; |
98 |
config_reg_get(&codec->config); |
config_reg_get(&codec->config); |
99 |
|
|
100 |
/* bad things happen if this is uncommented |
#if 0 |
101 |
|
/* bad things happen if this piece of code is activated */ |
102 |
if (lstrcmp(XVID_BUILD, codec->config.build)) |
if (lstrcmp(XVID_BUILD, codec->config.build)) |
103 |
{ |
{ |
104 |
config_reg_default(&codec->config); |
config_reg_default(&codec->config); |
105 |
} |
} |
106 |
*/ |
#endif |
107 |
|
|
108 |
if (icopen != NULL) |
if (icopen != NULL) |
109 |
{ |
{ |
114 |
|
|
115 |
case DRV_CLOSE : |
case DRV_CLOSE : |
116 |
DPRINTF("DRV_CLOSE"); |
DPRINTF("DRV_CLOSE"); |
117 |
// compress_end/decompress_end don't always get called |
/* compress_end/decompress_end don't always get called */ |
118 |
compress_end(codec); |
compress_end(codec); |
119 |
decompress_end(codec); |
decompress_end(codec); |
120 |
|
status_destroy_always(&codec->status); |
121 |
free(codec); |
free(codec); |
122 |
return DRV_OK; |
return DRV_OK; |
123 |
|
|
201 |
return 0; |
return 0; |
202 |
} |
} |
203 |
memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG)); |
memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG)); |
204 |
return 0; // sizeof(CONFIG); |
return 0; /* sizeof(CONFIG); */ |
205 |
|
|
206 |
/* not sure the difference, private/public data? */ |
/* not sure the difference, private/public data? */ |
207 |
|
|
308 |
dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); |
dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); |
309 |
if (dwDriverId != (DWORD)NULL) |
if (dwDriverId != (DWORD)NULL) |
310 |
{ |
{ |
311 |
DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0); |
DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); |
312 |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
313 |
} |
} |
314 |
} |
} |