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")
{