[svn] / branches / dev-api-4 / xvidcore / vfw / src / driverproc.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/vfw/src/driverproc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983, Sat Apr 12 06:58:50 2003 UTC revision 1171, Sat Oct 4 00:38:49 2003 UTC
# Line 1  Line 1 
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
# Line 15  Line 17 
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.6 2003-10-04 00:38:49 edgomez 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>
28    #include "vfwext.h"
29    
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    
# Line 87  Line 84 
84                                  return 0;                                  return 0;
85                          }                          }
86    
87    
88                codec->status.hDlg = NULL;
89                codec->config.ci_valid = 0;
90                          codec->ehandle = codec->dhandle = NULL;                          codec->ehandle = codec->dhandle = NULL;
91                          codec->fbase = 25;                          codec->fbase = 25;
92                          codec->fincr = 1;                          codec->fincr = 1;
93                          config_reg_get(&codec->config);                          config_reg_get(&codec->config);
94    
95                          /* bad things happen if this is uncommented  #if 0
96                            /* bad things happen if this piece of code is activated */
97                          if (lstrcmp(XVID_BUILD, codec->config.build))                          if (lstrcmp(XVID_BUILD, codec->config.build))
98                          {                          {
99                                  config_reg_default(&codec->config);                                  config_reg_default(&codec->config);
100                          }                          }
101                          */  #endif
102    
103                          if (icopen != NULL)                          if (icopen != NULL)
104                          {                          {
# Line 108  Line 109 
109    
110          case DRV_CLOSE :          case DRV_CLOSE :
111                  DPRINTF("DRV_CLOSE");                  DPRINTF("DRV_CLOSE");
112                  // compress_end/decompress_end don't always get called                  /* compress_end/decompress_end don't always get called */
113                  compress_end(codec);                  compress_end(codec);
114                  decompress_end(codec);                  decompress_end(codec);
115            status_destroy_always(&codec->status);
116                  free(codec);                  free(codec);
117                  return DRV_OK;                  return DRV_OK;
118    
# Line 194  Line 196 
196                          return 0;                          return 0;
197                  }                  }
198                  memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG));                  memcpy(&codec->config,(void*)lParam1, sizeof(CONFIG));
199                  return 0; // sizeof(CONFIG);                  return 0; /* sizeof(CONFIG); */
200    
201          /* not sure the difference, private/public data? */          /* not sure the difference, private/public data? */
202    
# Line 273  Line 275 
275          case ICM_DECOMPRESSEX:          case ICM_DECOMPRESSEX:
276                  return ICERR_UNSUPPORTED;                  return ICERR_UNSUPPORTED;
277    
278        /* VFWEXT entry point */
279        case ICM_USER+0x0fff :
280            if (lParam1 == VFWEXT_CONFIGURE_INFO) {
281                VFWEXT_CONFIGURE_INFO_T * info = (VFWEXT_CONFIGURE_INFO_T*)lParam2;
282                DPRINTF("%i %i %i %i %i %i",
283                    info->ciWidth, info->ciHeight,
284                    info->ciRate, info->ciScale,
285                    info->ciActiveFrame, info->ciFrameCount);
286    
287                codec->config.ci_valid = 1;
288                memcpy(&codec->config.ci, (void*)lParam2, sizeof(VFWEXT_CONFIGURE_INFO_T));
289                return ICERR_OK;
290            }
291            return ICERR_UNSUPPORTED;
292    
293          default:          default:
294                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);                  return DefDriverProc(dwDriverId, hDriver, uMsg, lParam1, lParam2);
295          }          }
# Line 286  Line 303 
303          dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0);          dwDriverId = DriverProc(0, 0, DRV_OPEN, 0, 0);
304          if (dwDriverId != (DWORD)NULL)          if (dwDriverId != (DWORD)NULL)
305          {          {
306                  DriverProc(dwDriverId, 0, ICM_CONFIGURE, 0, 0);                  DriverProc(dwDriverId, 0, ICM_CONFIGURE, (LPARAM)GetDesktopWindow(), 0);
307                  DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0);                  DriverProc(dwDriverId, 0, DRV_CLOSE, 0, 0);
308          }          }
309  }  }

Legend:
Removed from v.983  
changed lines
  Added in v.1171

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4