当前位置: 首页>>代码示例>>C++>>正文


C++ FileSystem::complete_path方法代码示例

本文整理汇总了C++中FileSystem::complete_path方法的典型用法代码示例。如果您正苦于以下问题:C++ FileSystem::complete_path方法的具体用法?C++ FileSystem::complete_path怎么用?C++ FileSystem::complete_path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileSystem的用法示例。


在下文中一共展示了FileSystem::complete_path方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: save_defaults_xml

void PluginClient::save_defaults_xml() 
{
	char path[BCTEXTLEN];
	server->get_defaults_path(path);
	FileSystem fs;
	fs.complete_path(path);
	using_defaults = 1;

	KeyFrame temp_keyframe;

	save_data(&temp_keyframe);
	FILE *fd = fopen(path, "w");
	if(fd)
	{
		fprintf(fd, "%d\n%d\n", window_x, window_y);
		if(!fwrite(temp_keyframe.get_data(), strlen(temp_keyframe.get_data()), 1, fd))
		{
			fprintf(stderr, "PluginClient::save_defaults_xml %d \"%s\" %d bytes: %s\n",
				__LINE__,
				path,
				(int)strlen(temp_keyframe.get_data()),
				strerror(errno));
		}

		fclose(fd);
	}
	using_defaults = 0;
}
开发者ID:knutj,项目名称:cinelerra,代码行数:28,代码来源:pluginclient.C

示例2: create_path

char* BatchRenderThread::create_path(char *string)
{
	FileSystem fs;
	sprintf(string, "%s", BCASTDIR);
	fs.complete_path(string);
	strcat(string, BATCH_PATH);
	return string;
}
开发者ID:knutj,项目名称:cinelerra,代码行数:8,代码来源:batchrender.C

示例3: prefix_to_path

char* ChannelDB::prefix_to_path(char *path, const char *prefix)
{
    FileSystem fs;
    char directory[BCTEXTLEN];
    sprintf(directory, BCASTDIR);
    fs.complete_path(directory);
    fs.join_names(path, directory, prefix);
    return path;
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-cv,代码行数:9,代码来源:channeldb.C

示例4: load_defaults_xml

void PluginClient::load_defaults_xml() 
{
	char path[BCTEXTLEN];
	server->get_defaults_path(path);
	FileSystem fs;
	fs.complete_path(path);
	using_defaults = 1;
//printf("PluginClient::load_defaults_xml %d %s\n", __LINE__, path);
	
	KeyFrame temp_keyframe;
	FILE *fd = fopen(path, "r");
	if(fd)
	{
		fseek(fd, 0, SEEK_END);
		int data_size = ftell(fd);
		fseek(fd, 0, SEEK_SET);
		if(data_size < MESSAGESIZE)
		{
			int temp = fread(temp_keyframe.get_data(), data_size, 1, fd);
// Get window extents
			char *data = temp_keyframe.get_data();
			int state = 0;
			for(int i = 0; i < data_size - 8; i++)
			{
				if(data[i] == '<') break;
				if(isdigit(data[i]))
				{
					if(state == 0)
					{
						window_x = atoi(data + i);
						state++;
					}
					else
					{
						window_y = atoi(data + i);
						break;
					}
					while(i < data_size && isdigit(data[i])) i++;
				}
			}
		}

		fclose(fd);


		read_data(&temp_keyframe);
	}
	using_defaults = 0;
//printf("PluginClient::load_defaults_xml %d %s\n", __LINE__, path);
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:50,代码来源:pluginclient.C

示例5: run

void DeleteAllIndexes::run()
{
	char string[BCTEXTLEN], string1[BCTEXTLEN], string2[BCTEXTLEN];
// prepare directory
	strcpy(string1, pwindow->thread->preferences->index_directory);
	FileSystem dir;
	dir.update(pwindow->thread->preferences->index_directory);
	dir.complete_path(string1);
// prepare filter
	const char *filter1 = ".idx";
	const char *filter2 = ".toc";

//	pwindow->disable_window();
	sprintf(string, _("Delete all indexes in %s?"), string1);
//	QuestionWindow confirm(mwindow);
//	confirm.create_objects(string, 0);

//	int result = confirm.run_window();

	int result = 0;
	if(!result)
	{
		static int i, j, k;

		for(i = 0; i < dir.dir_list.total; i++)
		{
  			result = 1;
			sprintf(string2, "%s%s", string1, dir.dir_list.values[i]->name);
// test filter
			if(test_filter(string2, filter1) ||
				test_filter(string2, filter2))
			{
				remove(string2);
printf("DeleteAllIndexes::run %s\n", string2);
			}
		}
	}

	pwindow->thread->redraw_indexes = 1;
//	pwindow->enable_window();
}
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:41,代码来源:deleteallindexes.C

示例6: render_single

void RenderThread::render_single(int test_overwrite, 
	Asset *asset,
	EDL *edl,
	int strategy)
{
	char string[BCTEXTLEN];
// Total length in seconds
	double total_length;
	int last_audio_buffer;
	RenderFarmServer *farm_server = 0;
	FileSystem fs;
	int total_digits;      // Total number of digits including padding the user specified.
	int number_start;      // Character in the filename path at which the number begins
	int current_number;    // The number the being injected into the filename.
	int done = 0;
	const int debug = 0;

	render->in_progress = 1;


	render->default_asset = asset;
	render->progress = 0;
	render->result = 0;

	if(mwindow)
	{
		if(!render->preferences)
			render->preferences = new Preferences;

		render->preferences->copy_from(mwindow->preferences);
	}


// Create rendering command
	TransportCommand *command = new TransportCommand;
	command->command = NORMAL_FWD;
	command->get_edl()->copy_all(edl);
	command->change_type = CHANGE_ALL;
// Get highlighted playback range
	command->set_playback_range();
// Adjust playback range with in/out points
	command->adjust_playback_range();
	render->packages = new PackageDispatcher;


// Configure preview monitor
	VideoOutConfig vconfig;
	PlaybackConfig *playback_config = new PlaybackConfig;

// Create caches
	CICache *audio_cache = new CICache(render->preferences);
	CICache *video_cache = new CICache(render->preferences);

	render->default_asset->frame_rate = command->get_edl()->session->frame_rate;
	render->default_asset->sample_rate = command->get_edl()->session->sample_rate;

// Conform asset to EDL.  Find out if any tracks are playable.
	render->result = render->check_asset(command->get_edl(), 
		*render->default_asset);

	if(!render->result)
	{
// Get total range to render
		render->total_start = command->start_position;
		render->total_end = command->end_position;
		total_length = render->total_end - render->total_start;

// Nothing to render
		if(EQUIV(total_length, 0))
		{
			render->result = 1;
		}
	}







// Generate packages
	if(!render->result)
	{
// Stop background rendering
		if(mwindow) mwindow->stop_brender();

		fs.complete_path(render->default_asset->path);
		strategy = Render::fix_strategy(strategy, render->preferences->use_renderfarm);

		render->result = render->packages->create_packages(mwindow,
			command->get_edl(),
			render->preferences,
			strategy, 
			render->default_asset, 
			render->total_start, 
			render->total_end,
			test_overwrite);
	}


//.........这里部分代码省略.........
开发者ID:petterreinholdtsen,项目名称:cinelerra-hv,代码行数:101,代码来源:render.C

示例7: render


//.........这里部分代码省略.........

	default_asset->frame_rate = command->get_edl()->session->frame_rate;
	default_asset->sample_rate = command->get_edl()->session->sample_rate;

// Conform asset to EDL.  Find out if any tracks are playable.
	result = check_asset(command->get_edl(), *default_asset);

	if(!result)
	{
// Get total range to render
		total_start = command->start_position;
		total_end = command->end_position;
		total_length = total_end - total_start;

// Nothing to render
		if(EQUIV(total_length, 0))
		{
			result = 1;
		}
	}







// Generate packages
	if(!result)
	{
// Stop background rendering
		if(mwindow) mwindow->stop_brender();

		fs.complete_path(default_asset->path);
		strategy = Render::fix_strategy(strategy, preferences->use_renderfarm);

		result = packages->create_packages(mwindow,
			command->get_edl(),
			preferences,
			strategy, 
			default_asset, 
			total_start, 
			total_end,
			test_overwrite);
	}










	done = 0;
	total_rendered = 0;
	frames_per_second = 0;

	if(!result)
	{
// Start dispatching external jobs
		if(mwindow)
		{
			mwindow->gui->lock_window("Render::render 1");
			mwindow->gui->show_message(_("Starting render farm"));
开发者ID:beequ7et,项目名称:cinelerra-cv,代码行数:67,代码来源:render.C


注:本文中的FileSystem::complete_path方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。