From: Diego Barrios Romero Date: Sat, 20 Feb 2010 15:34:40 +0000 (+0100) Subject: Merge branch 'eldruin_tool2' into eldruin_ffmpeg2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5eccd51f77694fb18d4618ee78c822de006fa5e6;p=synfig.git Merge branch 'eldruin_tool2' into eldruin_ffmpeg2 --- 5eccd51f77694fb18d4618ee78c822de006fa5e6 diff --cc synfig-core/src/tool/main.cpp index 06d1488,37f535b..2ae8908 --- a/synfig-core/src/tool/main.cpp +++ b/synfig-core/src/tool/main.cpp @@@ -545,37 -546,12 +547,37 @@@ int extract_target(arg_list_t &arg_list return SYNFIGTOOL_OK; } +int extract_target_params(arg_list_t& arg_list, + TargetParam& params) +{ + arg_list_t::iterator iter; + + for(iter=arg_list.begin(); iter!=arg_list.end(); iter++) + { + if(*iter=="-vc") + { + // Target video codec + params.video_codec = extract_parameter(arg_list, iter); + } + else if(*iter=="-vb") + { + // Target bitrate + params.bitrate = + atoi(extract_parameter(arg_list, iter).c_str()); + } + else if (flag_requires_value(*iter)) + iter++; + } + + return SYNFIGTOOL_OK; +} + int extract_append(arg_list_t &arg_list,string &filename) { - arg_list_t::iterator iter; + arg_list_t::iterator iter, next; filename.clear(); - for(iter=arg_list.begin(); iter!=arg_list.end(); iter++) + for(next=arg_list.begin(),iter=next++;iter!=arg_list.end();iter=next++) { if(*iter=="--append") {