home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2004 March / PCWELT_3_2004.ISO / pcwsoft / flaskmpeg_078_39_src.z.exe / flaskmpeg / plugins.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-10-28  |  2.3 KB  |  91 lines

  1. /* 
  2.  *  Plugins.h
  3.  *
  4.  *    Copyright (C) Alberto Vigata - January 2000 - ultraflask@yahoo.com
  5.  *
  6.  *  This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
  7.  *    
  8.  *  FlasKMPEG is free software; you can redistribute it and/or modify
  9.  *  it under the terms of the GNU General Public License as published by
  10.  *  the Free Software Foundation; either version 2, or (at your option)
  11.  *  any later version.
  12.  *   
  13.  *  FlasKMPEG is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  *  GNU General Public License for more details.
  17.  *   
  18.  *  You should have received a copy of the GNU General Public License
  19.  *  along with GNU Make; see the file COPYING.  If not, write to
  20.  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  21.  *
  22.  */
  23.  
  24.  
  25. #ifndef PLUGINS_H
  26. #define PLUGINS_H
  27.  
  28. #define MAX_OUT_PLUGINS  40
  29.  
  30. #include <windows.h>
  31.  
  32. #include "..\include\floutapi.h"
  33.  
  34. class FlPluginWrapper 
  35. {
  36.   public:
  37.     FlPluginWrapper() {
  38.       m_id = 0;
  39.       m_pEntry = NULL;
  40.       m_pSettings = NULL;
  41.     }
  42.     ~FlPluginWrapper()
  43.     {
  44.       if(m_pSettings)
  45.         delete []m_pSettings;
  46.     }
  47.     void Set( flohandle_t id, floutentry_ptr entry ) {
  48.       m_id = id;
  49.       m_pEntry = entry;
  50.     }
  51.     startup_s *GetStartup() { return &m_ss; }
  52.     void SetStartup( startup_s *ss ) { m_ss = *ss; }
  53.     int SetSettings( ui8 *settings, ui32 settings_size );
  54.     int GetSettings( ui8 **settings, ui32 *settings_size );
  55.  
  56.     flreturn_t floutentry( flselector_t sel, floparam_t par1, floparam_t par2 ) {
  57.         return m_pEntry( m_id, sel, par1, par2 ); }
  58.   private:
  59.     flohandle_t m_id;
  60.     floutentry_ptr m_pEntry;
  61.     PBYTE m_pSettings;
  62.     startup_s m_ss;
  63. };
  64.  
  65. struct TOutPlugin
  66. {
  67.     HINSTANCE            hinstLib;
  68.     FlPluginWrapper        plug;
  69.     int                 fileType;
  70.     char                ID[256];
  71.   long                nSupportedFormats;
  72. };
  73.  
  74. struct TOutModules
  75. {
  76.   HINSTANCE hInstLib;
  77. };
  78.  
  79. struct TPlugins
  80. {
  81.     int         OutPluginCount;
  82.     TOutPlugin  outPlugs[MAX_OUT_PLUGINS];
  83.   int         OutModCount;
  84.   TOutModules outmod[MAX_OUT_PLUGINS];
  85. };
  86.  
  87. int LoadPlugins( TPlugins *plugs, char *program_directory );
  88. int FlushPluginSettings( TPlugins *plugs );
  89. int ClosePlugins(TPlugins *plugs);
  90.  
  91. #endif