Lines Matching defs:filename

1076 static void assert_file_overwrite(const char *filename)
1078 const char *proto_name = avio_find_protocol_name(filename);
1086 if (proto_name && !strcmp(proto_name, "file") && avio_check(filename, 0) == 0) {
1088 fprintf(stderr,"File '%s' already exists. Overwrite? [y/N] ", filename);
1099 av_log(NULL, AV_LOG_FATAL, "File '%s' already exists. Exiting.\n", filename);
1110 if (!strcmp(filename, file->ctx->url)) {
1111 av_log(NULL, AV_LOG_FATAL, "Output %s same as Input #%d - exiting\n", filename, i);
1119 static void dump_attachment(AVStream *st, const char *filename)
1130 if (!*filename && (e = av_dict_get(st->metadata, "filename", NULL, 0)))
1131 filename = e->value;
1132 if (!*filename) {
1133 av_log(NULL, AV_LOG_FATAL, "No filename specified and no 'filename' tag"
1138 assert_file_overwrite(filename);
1140 if ((ret = avio_open2(&out, filename, AVIO_FLAG_WRITE, &int_cb, NULL)) < 0) {
1142 filename);
1151 static int open_input_file(OptionsContext *o, const char *filename)
1188 if (!strcmp(filename, "-"))
1189 filename = "pipe:";
1191 stdin_interaction &= strncmp(filename, "pipe:", 5) &&
1192 strcmp(filename, "/dev/stdin");
1197 print_error(filename, AVERROR(ENOMEM));
1267 err = avformat_open_input(&ic, filename, file_iformat, &o->g->format_opts);
1269 print_error(filename, err);
1271 av_log(NULL, AV_LOG_ERROR, "Did you mean file:%s?\n", filename);
1296 av_log(NULL, AV_LOG_FATAL, "%s: could not find codec parameters\n", filename);
1305 av_log(NULL, AV_LOG_WARNING, "Cannot use -ss and -sseof both, using -ss for %s\n", filename);
1317 av_log(NULL, AV_LOG_WARNING, "-sseof value seeks to before start of file %s; ignored\n", filename);
1321 av_log(NULL, AV_LOG_WARNING, "Cannot use -sseof, duration of %s not known\n", filename);
1348 filename, (double)timestamp / AV_TIME_BASE);
1356 av_dump_format(ic, nb_input_files, filename, 0);
1416 filename);
1425 option->help ? option->help : "", nb_input_files - 1, filename);
1462 char filename[1000];
1474 snprintf(filename, sizeof(filename), "%s%s/%s-%s.avpreset", base[i],
1476 ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL);
1479 snprintf(filename, sizeof(filename), "%s%s/%s.avpreset", base[i],
1481 ret = avio_open2(s, filename, AVIO_FLAG_READ, &int_cb, NULL);
1740 static char *read_file(const char *filename)
1743 int ret = avio_open(&pb, filename, AVIO_FLAG_READ);
1748 av_log(NULL, AV_LOG_ERROR, "Error opening file %s.\n", filename);
2418 static int open_output_file(OptionsContext *o, const char *filename)
2453 if (!strcmp(filename, "-"))
2454 filename = "pipe:";
2456 err = avformat_alloc_output_context2(&oc, NULL, o->format, filename);
2458 print_error(filename, err);
2496 if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) {
2534 if (!o->audio_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_AUDIO) != AV_CODEC_ID_NONE) {
2597 enum AVCodecID codec_id = av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_DATA);
2717 av_dict_set(&ost->st->metadata, "filename", (p && *p) ? p + 1 : o->attachments[i], AV_DICT_DONT_OVERWRITE);
2752 filename);
2765 option->help ? option->help : "", nb_output_files - 1, filename);
2829 /* check filename in case of an image number is expected */
2845 assert_file_overwrite(filename);
2848 if ((err = avio_open2(&oc->pb, filename, AVIO_FLAG_WRITE,
2851 print_error(filename, err);
2854 } else if (strcmp(oc->oformat->name, "image2")==0 && !av_filename_number_test(filename))
2855 assert_file_overwrite(filename);
3207 char filename[40];
3216 snprintf(filename, sizeof(filename), "vstats_%02d%02d%02d.log", today->tm_hour, today->tm_min,
3218 return opt_vstats_file(NULL, opt, filename);
3263 char filename[1000], line[1000], tmp_line[1000];
3270 if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
3286 av_log(NULL, AV_LOG_FATAL, "%s: Invalid syntax: '%s'\n", filename, line);
3289 av_log(NULL, AV_LOG_DEBUG, "ffpreset[%s]: set '%s' = '%s'\n", filename, key, value);
3297 filename, line, key, value);
3800 "read stream filtergraph description from a file", "filename" },
3810 "read complex filtergraph description from a file", "filename" },
3819 "add an attachment to the output file", "filename" },
3822 "extract an attachment into a file", "filename" },
4015 "set options from indicated preset file", "filename" },