Ejemplo n.º 1
0
void Flow_InitPlugins()
{
	for (auto it = g_vFlowFtns.begin(); it != g_vFlowFtns.end(); ++it)
	{
		it->Flow_Init();
	}
}
Ejemplo n.º 2
0
bool_t Context_Init(const tchar_t* Name,const tchar_t* Version,int Id,const tchar_t* CmdLine,void* Application)
{
	context* p = malloc(sizeof(context));
	if (!p) return 0;

#ifdef PREALLOC
	{ int i; for (i=0;i<PREALLOC;++i) q[i] = malloc(65536); }
#endif

	memset(p,0,sizeof(context));
	p->Version = CONTEXT_VERSION;
	p->ProgramId = Id;
	p->ProgramName = Name;
	p->ProgramVersion = Version;
	p->CmdLine = CmdLine;
	p->Lang = DefaultLang();
	p->StartUpMemory = AvailMemory();
	p->LowMemory = p->StartUpMemory < LOWMEMORY_LIMIT;
	p->Application = Application;

	SetContext(p);

	Mem_Init();
	DynCode_Init();
	String_Init();
	PCM_Init();
	Blit_Init();
	Node_Init();
	Platform_Init();
	Stream_Init();
	Advanced_Init();
	Flow_Init();
	Codec_Init();
	Audio_Init();
	Video_Init();
	Format_Init();
	Playlist_Init();
	FormatBase_Init();
	NullOutput_Init();
	RawAudio_Init();
	RawImage_Init();
	Timer_Init();
	IDCT_Init();
	Overlay_Init();
	M3U_Init();
	PLS_Init();
	ASX_Init();
	WaveOut_Init();
	SoftIDCT_Init();
#if defined(CONFIG_SUBS)
	SubTitle_Init();
#endif
#if defined(TARGET_PALMOS)
	OverlayHIRES_Init();
	//Win_Init();
	//About_Init();
	//BenchResult_Init();
	//MediaInfo_Init();
	//Settings_Init();
	ASF_Init();
	AVI_Init();
	WAV_Init();
	MP4_Init();
	MPG_Init();
	NSV_Init();
	Law_Init();
	ADPCM_Init();
#elif defined(TARGET_WIN32) || defined(TARGET_WINCE)
#if defined(TARGET_WINCE)
	if (QueryPlatform(PLATFORM_TYPENO) != TYPE_SMARTPHONE)
	{
		OverlayRAW_Init();
		OverlayGAPI_Init();
	}
	else
	{
		OverlayGAPI_Init(); // prefer GAPI with smartphones (Sagem MyS-7 crashes with Raw FrameBuffer?)
		OverlayRAW_Init();
	}
	OverlayDirect_Init();
	OverlayS1D13806_Init();
#else
	OverlayConsole_Init();
#endif
	OverlayXScale_Init();
	OverlayDDraw_Init(); // after GAPI and RAW and XScale
	OverlayFlyTV_Init();
	OverlayGDI_Init();
#elif defined(TARGET_SYMBIAN)
	OverlaySymbian_Init();
#endif
#ifdef NO_PLUGINS
	Static_Init();
#else
	Plugins_Init();
#endif
	Association_Init(); // after all formats are registered
	Color_Init(); 
	Equalizer_Init();
	Player_Init(); // after all output drivers are registered
	return 1;
}