MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / open_files

Function open_files

fftools/ffmpeg_opt.c:1445–1478  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1443};
1444
1445static int open_files(OptionGroupList *l, const char *inout, Scheduler *sch,
1446 int (*open_file)(const OptionsContext*, const char*,
1447 Scheduler*))
1448{
1449 int i, ret;
1450
1451 for (i = 0; i < l->nb_groups; i++) {
1452 OptionGroup *g = &l->groups[i];
1453 OptionsContext o;
1454
1455 init_options(&o);
1456 o.g = g;
1457
1458 ret = parse_optgroup(&o, g, options);
1459 if (ret < 0) {
1460 av_log(NULL, AV_LOG_ERROR, "Error parsing options for %s file "
1461 "%s.\n", inout, g->arg);
1462 uninit_options(&o);
1463 return ret;
1464 }
1465
1466 av_log(NULL, AV_LOG_DEBUG, "Opening an %s file: %s.\n", inout, g->arg);
1467 ret = open_file(&o, g->arg, sch);
1468 uninit_options(&o);
1469 if (ret < 0) {
1470 av_log(NULL, AV_LOG_ERROR, "Error opening %s file %s.\n",
1471 inout, g->arg);
1472 return ret;
1473 }
1474 av_log(NULL, AV_LOG_DEBUG, "Successfully opened the file.\n");
1475 }
1476
1477 return 0;
1478}
1479
1480int ffmpeg_parse_options(int argc, char **argv, Scheduler *sch)
1481{

Callers 1

ffmpeg_parse_optionsFunction · 0.85

Calls 5

init_optionsFunction · 0.85
parse_optgroupFunction · 0.85
av_logFunction · 0.85
uninit_optionsFunction · 0.85
open_fileFunction · 0.85

Tested by

no test coverage detected