home *** CD-ROM | disk | FTP | other *** search
- /*
- * Plugins.h
- *
- * Copyright (C) Alberto Vigata - January 2000 - ultraflask@yahoo.com
- *
- * This file is part of FlasKMPEG, a free MPEG to MPEG/AVI converter
- *
- * FlasKMPEG is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * FlasKMPEG is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Make; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-
- #ifndef PLUGINS_H
- #define PLUGINS_H
-
- #define MAX_OUT_PLUGINS 40
-
- #include <windows.h>
-
- #include "..\include\floutapi.h"
-
- class FlPluginWrapper
- {
- public:
- FlPluginWrapper() {
- m_id = 0;
- m_pEntry = NULL;
- m_pSettings = NULL;
- }
- ~FlPluginWrapper()
- {
- if(m_pSettings)
- delete []m_pSettings;
- }
- void Set( flohandle_t id, floutentry_ptr entry ) {
- m_id = id;
- m_pEntry = entry;
- }
- startup_s *GetStartup() { return &m_ss; }
- void SetStartup( startup_s *ss ) { m_ss = *ss; }
- int SetSettings( ui8 *settings, ui32 settings_size );
- int GetSettings( ui8 **settings, ui32 *settings_size );
-
- flreturn_t floutentry( flselector_t sel, floparam_t par1, floparam_t par2 ) {
- return m_pEntry( m_id, sel, par1, par2 ); }
- private:
- flohandle_t m_id;
- floutentry_ptr m_pEntry;
- PBYTE m_pSettings;
- startup_s m_ss;
- };
-
- struct TOutPlugin
- {
- HINSTANCE hinstLib;
- FlPluginWrapper plug;
- int fileType;
- char ID[256];
- long nSupportedFormats;
- };
-
- struct TOutModules
- {
- HINSTANCE hInstLib;
- };
-
- struct TPlugins
- {
- int OutPluginCount;
- TOutPlugin outPlugs[MAX_OUT_PLUGINS];
- int OutModCount;
- TOutModules outmod[MAX_OUT_PLUGINS];
- };
-
- int LoadPlugins( TPlugins *plugs, char *program_directory );
- int FlushPluginSettings( TPlugins *plugs );
- int ClosePlugins(TPlugins *plugs);
-
- #endif