1 |
/************************************************************************** |
/***************************************************************************** |
2 |
* |
* |
3 |
* XVID VFW FRONTEND |
* XVID MPEG-4 VFW FRONTEND |
4 |
* driverproc main |
* - driverproc main - |
5 |
|
* |
6 |
|
* Copyright(C) 2001-2003 Peter Ross <pross@xvid.org> |
7 |
* |
* |
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
17 |
* |
* |
18 |
* You should have received a copy of the GNU General Public License |
* You should have received a copy of the GNU General Public License |
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., 675 Mass Ave, Cambridge, MA 02139, USA. |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
* |
|
|
*************************************************************************/ |
|
|
|
|
|
/************************************************************************** |
|
21 |
* |
* |
22 |
* History: |
* $Id: driverproc.c,v 1.1.2.7 2004-01-03 12:06:11 syskin Exp $ |
23 |
* |
* |
24 |
* 31.08.2002 Configure() export |
****************************************************************************/ |
|
* 01.12.2001 inital version; (c)2001 peter ross <pross@xvid.org> |
|
|
* |
|
|
*************************************************************************/ |
|
25 |
|
|
26 |
#include <windows.h> |
#include <windows.h> |
27 |
#include <vfw.h> |
#include <vfw.h> |
30 |
#include "debug.h" |
#include "debug.h" |
31 |
#include "codec.h" |
#include "codec.h" |
32 |
#include "config.h" |
#include "config.h" |
33 |
|
#include "status.h" |
34 |
#include "resource.h" |
#include "resource.h" |
35 |
|
|
36 |
|
|
43 |
return TRUE; |
return TRUE; |
44 |
} |
} |
45 |
|
|
46 |
|
extern HINSTANCE m_hdll; |
47 |
|
|
48 |
/* __declspec(dllexport) */ LRESULT WINAPI DriverProc( |
/* __declspec(dllexport) */ LRESULT WINAPI DriverProc( |
49 |
DWORD dwDriverId, |
DWORD dwDriverId, |
65 |
|
|
66 |
case DRV_OPEN : |
case DRV_OPEN : |
67 |
DPRINTF("DRV_OPEN"); |
DPRINTF("DRV_OPEN"); |
68 |
|
m_hdll = NULL; |
69 |
{ |
{ |
70 |
ICOPEN * icopen = (ICOPEN *)lParam2; |
ICOPEN * icopen = (ICOPEN *)lParam2; |
71 |
|
|
85 |
return 0; |
return 0; |
86 |
} |
} |
87 |
|
|
88 |
|
|
89 |
|
codec->status.hDlg = NULL; |
90 |
codec->config.ci_valid = 0; |
codec->config.ci_valid = 0; |
91 |
codec->ehandle = codec->dhandle = NULL; |
codec->ehandle = codec->dhandle = NULL; |
92 |
codec->fbase = 25; |
codec->fbase = 25; |
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 |
|
status_destroy_always(&codec->status); |
117 |
free(codec); |
free(codec); |
118 |
return DRV_OK; |
return DRV_OK; |
119 |
|
|
304 |
dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); |
dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0); |
305 |
if (dwDriverId != (DWORD)NULL) |
if (dwDriverId != (DWORD)NULL) |
306 |
{ |
{ |
307 |
DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0); |
DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0); |
308 |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0); |
309 |
} |
} |
310 |
} |
} |