30 |
|
|
31 |
#include <windows.h> |
#include <windows.h> |
32 |
#include <vfw.h> |
#include <vfw.h> |
33 |
|
#include "vfwext.h" |
34 |
|
|
35 |
#include "debug.h" |
#include "debug.h" |
36 |
#include "codec.h" |
#include "codec.h" |
88 |
return 0; |
return 0; |
89 |
} |
} |
90 |
|
|
91 |
|
codec->config.ci_valid = 0; |
92 |
codec->ehandle = codec->dhandle = NULL; |
codec->ehandle = codec->dhandle = NULL; |
93 |
codec->fbase = 25; |
codec->fbase = 25; |
94 |
codec->fincr = 1; |
codec->fincr = 1; |
95 |
config_reg_get(&codec->config); |
config_reg_get(&codec->config); |
96 |
|
|
97 |
/* bad things happen if this is uncommented |
#if 0 |
98 |
|
/* bad things happen if this piece of code is activated */ |
99 |
if (lstrcmp(XVID_BUILD, codec->config.build)) |
if (lstrcmp(XVID_BUILD, codec->config.build)) |
100 |
{ |
{ |
101 |
config_reg_default(&codec->config); |
config_reg_default(&codec->config); |
102 |
} |
} |
103 |
*/ |
#endif |
104 |
|
|
105 |
if (icopen != NULL) |
if (icopen != NULL) |
106 |
{ |
{ |
111 |
|
|
112 |
case DRV_CLOSE : |
case DRV_CLOSE : |
113 |
DPRINTF("DRV_CLOSE"); |
DPRINTF("DRV_CLOSE"); |
114 |
// compress_end/decompress_end don't always get called |
/* compress_end/decompress_end don't always get called */ |
115 |
compress_end(codec); |
compress_end(codec); |
116 |
decompress_end(codec); |
decompress_end(codec); |
117 |
free(codec); |
free(codec); |
197 |
return 0; |
return 0; |
198 |
} |
} |
199 |
memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG)); |
memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG)); |
200 |
return 0; // sizeof(CONFIG); |
return 0; /* sizeof(CONFIG); */ |
201 |
|
|
202 |
/* not sure the difference, private/public data? */ |
/* not sure the difference, private/public data? */ |
203 |
|
|
276 |
case ICM_DECOMPRESSEX: |
case ICM_DECOMPRESSEX: |
277 |
return ICERR_UNSUPPORTED; |
return ICERR_UNSUPPORTED; |
278 |
|
|
279 |
|
/* VFWEXT entry point */ |
280 |
|
case ICM_USER+0x0fff : |
281 |
|
if (lParam1 == VFWEXT_CONFIGURE_INFO) { |
282 |
|
VFWEXT_CONFIGURE_INFO_T * info = (VFWEXT_CONFIGURE_INFO_T*)lParam2; |
283 |
|
DPRINTF("%i %i %i %i %i %i", |
284 |
|
info->ciWidth, info->ciHeight, |
285 |
|
info->ciRate, info->ciScale, |
286 |
|
info->ciActiveFrame, info->ciFrameCount); |
287 |
|
|
288 |
|
codec->config.ci_valid = 1; |
289 |
|
memcpy(&codec->config.ci, (void*)lParam2, sizeof(VFWEXT_CONFIGURE_INFO_T)); |
290 |
|
return ICERR_OK; |
291 |
|
} |
292 |
|
return ICERR_UNSUPPORTED; |
293 |
|
|
294 |
default: |
default: |
295 |
return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2); |
return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2); |
296 |
} |
} |