コード例 #1
0
ファイル: batchrender.C プロジェクト: knutj/cinelerra
void BatchRenderThread::start_rendering(char *config_path,
	char *batch_path)
{
	BC_Hash *boot_defaults;
	Preferences *preferences;
	Render *render;
	BC_Signals *signals = new BC_Signals;
	// XXX the above stuff is leaked,
//PRINT_TRACE
// Initialize stuff which MWindow does.
	signals->initialize();
	MWindow::init_defaults(boot_defaults, config_path);
	load_defaults(boot_defaults);
	preferences = new Preferences;
	preferences->load_defaults(boot_defaults);
	MWindow::init_plugins(0, preferences);
	char font_path[BCTEXTLEN];
	strcpy(font_path, preferences->plugin_dir);
	strcat(font_path, "/fonts");
	BC_Resources::init_fontconfig(font_path);
	BC_WindowBase::get_resources()->vframe_shm = 1;
	MWindow::init_fileserver(preferences);

//PRINT_TRACE
	load_jobs(batch_path, preferences);
	save_jobs(batch_path);
	save_defaults(boot_defaults);

//PRINT_TRACE
// Test EDL files for existence
	if(test_edl_files()) return;

//PRINT_TRACE

// Predict all destination paths
	ArrayList<char*> paths;
	paths.set_array_delete();
	calculate_dest_paths(&paths, preferences);

//PRINT_TRACE
	int result = ConfirmSave::test_files(0, &paths);
	paths.remove_all_objects();
// Abort on any existing file because it's so hard to set this up.
	if(result) return;

//PRINT_TRACE
	render = new Render(0);
//PRINT_TRACE
	render->start_batches(&jobs, 
		boot_defaults,
		preferences);
//PRINT_TRACE
}
コード例 #2
0
ファイル: batchrender.C プロジェクト: beequ7et/cinelerra-cv
void BatchRenderThread::start_rendering(char *config_path,
	char *batch_path)
{
	BC_Hash *boot_defaults;
	Preferences *preferences;
	Render *render;
	ArrayList<PluginServer*> *plugindb;

// Initialize stuff which MWindow does.
	MWindow::init_defaults(boot_defaults, config_path);
	load_defaults(boot_defaults);
	preferences = new Preferences;
	preferences->load_defaults(boot_defaults);
	MWindow::init_plugins(preferences, plugindb, 0);

	load_jobs(batch_path, preferences);
	save_jobs(batch_path);
	save_defaults(boot_defaults);

// Test EDL files for existence
	if(test_edl_files()) return;


// Predict all destination paths
	ArrayList<char*> paths;
	calculate_dest_paths(&paths,
		preferences,
		plugindb);

	int result = ConfirmSave::test_files(0, &paths);
	paths.remove_all_objects();

// Abort on any existing file because it's so hard to set this up.
	if(result) return;

	render = new Render(0);
	render->start_batches(&jobs, 
		boot_defaults,
		preferences,
		plugindb);
}