1 2 #ifdef USE_SDL 3 extern "C" { 4 #ifdef __HAIKU__ 5 #include "SDL2/SDL.h" 6 #else 7 #include "SDL2/SDL.h" 8 #endif 9 } 10 11 #include "ADM_render/GUI_sdlRender.h" 12 #endif 13 extern uint8_t GUI_close(void); 14 static bool setPrefsDefault(void); 15 extern bool libvaProbe(void); 16 extern bool dxva2Probe(void); 17 extern bool videotoolboxProbe(void); 18 19 extern void registerVideoFilters( void ); 20 extern void filterCleanUp( void ); 21 extern void register_Encoders( void ) ; 22 23 extern uint8_t initGUI(const vector<IScriptEngine*>& engines); 24 extern void destroyGUI(void); 25 extern void initFileSelector(void); 26 extern void getUIDescription(char*); 27 extern uint8_t ADM_ad_loadPlugins(const char *path); 28 extern uint8_t ADM_vf_loadPlugins(const char *path,const char *subFolder); 29 extern uint8_t ADM_vd6_loadPlugins(const char *path); 30 extern uint8_t ADM_av_loadPlugins(const char *path); 31 extern uint8_t ADM_ae_loadPlugins(const char *path); 32 extern uint8_t ADM_ve6_loadPlugins(const char *path,const char *subFolder); 33 34 extern bool ADM_ad_cleanup(void); 35 extern bool ADM_ae_cleanup(void); 36 extern bool ADM_vf_cleanup(void); 37 extern void ADM_ve6_cleanup(void); 38 extern void ADM_vd6_cleanup(void); 39 40 extern bool vdpauProbe(void); 41 extern bool vdpauCleanup(void); 42 43 extern bool xvbaProbe(void); 44 extern bool xvbaCleanup(void); 45 46 extern void loadPlugins(void); 47 extern void InitFactory(void); 48 extern void InitCoreToolkit(void); 49 extern uint8_t quotaInit(void); 50 51 extern int UI_Init(int nargc,char **nargv); 52 extern int UI_RunApp(void); 53 extern bool UI_End(void); 54 extern void cleanUp (void); 55 56 extern ADM_UI_TYPE UI_GetCurrentUI(void); 57 58 typedef bool (*initFunc_t) (void); 59 std::vector<initFunc_t> listOfHwInit; 60 std::vector<initFunc_t> listOfHwCleanup; 61 62 #if !defined(NDEBUG) && defined(FIND_LEAKS) 63 extern const char* new_progname; 64 #endif 65 66 void ADM_ExitCleanup(void); 67 int startAvidemux(int argc, char *argv[]); 68 69 70 #ifdef USE_VDPAU 71 extern bool initVDPAUDecoder(void); 72 #endif 73 #ifdef USE_LIBVA 74 extern bool initLIBVADecoder(void); 75 #endif 76 #ifdef USE_DXVA2 77 extern bool initDXVA2Decoder(void); 78 #endif 79 #ifdef USE_VIDEOTOOLBOX 80 extern bool initVideoToolboxDecoder(void); 81 #endif 82 83 #define PROBE_HW_ACCEL(probe,name,initFunc,cleanupFunc) { \ 84 printf("Probing for "#name"...\n"); \ 85 if(probe()==true)\ 86 {\ 87 printf(#name" available\n"); \ 88 listOfHwInit.push_back(initFunc);\ 89 listOfHwCleanup.push_back(cleanupFunc);\ 90 }\ 91 else \ 92 printf(#name" not available\n");} 93 94 #ifdef __APPLE__ 95 const char *startDir="../lib"; 96 #else 97 const char *startDir=ADM_RELATIVE_LIB_DIR; 98 #endif 99 100 101 #define loadPlugins(subdir, func)\ 102 {\ 103 std::string folder=ADM_getPluginDir(subdir);\ 104 func(folder.c_str());\ 105 } 106 107 #define loadPluginsEx(subdir, func)\ 108 {\ 109 std::string folder=ADM_getPluginDir(subdir);\ 110 func(folder.c_str(),getUISpecifSubfolder());\ 111 } 112 113 #define loadPluginsMyEx(subdir, func)\ 114 {\ 115 char *p = ADM_getHomeRelativePath("plugins6",subdir); \ 116 func(p,getUISpecifSubfolder());\ 117 delete [] p;p=NULL;\ 118 } 119