Lines Matching defs:arg

241 static int show_hwaccels(void *optctx, const char *opt, const char *arg)
271 static int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_idx, int is_global)
273 if (!av_strcasecmp(arg, "cfr")) *vsync_var = VSYNC_CFR;
274 else if (!av_strcasecmp(arg, "vfr")) *vsync_var = VSYNC_VFR;
275 else if (!av_strcasecmp(arg, "passthrough")) *vsync_var = VSYNC_PASSTHROUGH;
276 else if (!av_strcasecmp(arg, "drop")) *vsync_var = VSYNC_DROP;
277 else if (!is_global && !av_strcasecmp(arg, "auto")) *vsync_var = VSYNC_AUTO;
279 av_log(NULL, AV_LOG_FATAL, "Invalid value %s specified for fps_mode of #%d:%d.\n", arg, file_idx, st_idx);
284 video_sync_method = parse_number_or_die("vsync", arg, OPT_INT, VSYNC_AUTO, VSYNC_VFR);
343 static int opt_filter_threads(void *optctx, const char *opt, const char *arg)
346 filter_nbthreads = av_strdup(arg);
350 static int opt_abort_on(void *optctx, const char *opt, const char *arg)
366 return av_opt_eval_flags(&pclass, &opts[0], arg, &abort_on_flags);
369 static int opt_stats_period(void *optctx, const char *opt, const char *arg)
371 int64_t user_stats_period = parse_time_or_die(opt, arg, 1);
374 av_log(NULL, AV_LOG_ERROR, "stats_period %s must be positive.\n", arg);
379 av_log(NULL, AV_LOG_INFO, "ffmpeg stats and -progress period set to %s.\n", arg);
384 static int opt_audio_codec(void *optctx, const char *opt, const char *arg)
387 return parse_option(o, "codec:a", arg, options);
390 static int opt_video_codec(void *optctx, const char *opt, const char *arg)
393 return parse_option(o, "codec:v", arg, options);
396 static int opt_subtitle_codec(void *optctx, const char *opt, const char *arg)
399 return parse_option(o, "codec:s", arg, options);
402 static int opt_data_codec(void *optctx, const char *opt, const char *arg)
405 return parse_option(o, "codec:d", arg, options);
408 static int opt_map(void *optctx, const char *opt, const char *arg)
418 if (*arg == '-') {
420 arg++;
422 map = av_strdup(arg);
444 "match any streams.\n", arg);
449 "stream.\n", arg);
510 av_log(NULL, AV_LOG_VERBOSE, "Stream map '%s' matches no streams; ignoring.\n", arg);
513 "To ignore this, add a trailing '?' to the map.\n", arg);
517 "To ignore this, add a trailing '?' to the map.\n", arg);
526 static int opt_attach(void *optctx, const char *opt, const char *arg)
530 o->attachments[o->nb_attachments - 1] = arg;
534 static int opt_map_channel(void *optctx, const char *opt, const char *arg)
542 mapchan = av_strdup(arg);
550 n = sscanf(arg, "%d:%d.%d", &m->channel_idx, &m->ofile_idx, &m->ostream_idx);
560 n = sscanf(arg, "%d.%d.%d:%d.%d",
611 static int opt_sdp_file(void *optctx, const char *opt, const char *arg)
614 sdp_filename = av_strdup(arg);
619 static int opt_vaapi_device(void *optctx, const char *opt, const char *arg)
624 tmp = av_asprintf("%s%s", prefix, arg);
634 static int opt_qsv_device(void *optctx, const char *opt, const char *arg)
638 char *tmp = av_asprintf("%s%s", prefix, arg);
650 static int opt_init_hw_device(void *optctx, const char *opt, const char *arg)
652 if (!strcmp(arg, "list")) {
661 return hw_device_init_from_string(arg, NULL);
665 static int opt_filter_hw_device(void *optctx, const char *opt, const char *arg)
671 filter_hw_device = hw_device_get_by_name(arg);
673 av_log(NULL, AV_LOG_ERROR, "Invalid filter device %s.\n", arg);
680 * Parse a metadata specifier passed as 'arg' parameter.
681 * @param arg metadata string to parse
686 static void parse_meta_type(char *arg, char *type, int *index, const char **stream_spec)
688 if (*arg) {
689 *type = *arg;
690 switch (*arg) {
694 if (*(++arg) && *arg != ':') {
695 av_log(NULL, AV_LOG_FATAL, "Invalid metadata specifier %s.\n", arg);
698 *stream_spec = *arg == ':' ? arg + 1 : "";
702 if (*(++arg) == ':')
703 *index = strtol(++arg, NULL, 0);
706 av_log(NULL, AV_LOG_FATAL, "Invalid metadata type %c.\n", *arg);
803 static int opt_recording_timestamp(void *optctx, const char *opt, const char *arg)
807 int64_t recording_timestamp = parse_time_or_die(opt, arg, 0) / 1E6;
1580 char *buf = NULL, *arg = NULL, *preset = NULL;
1595 if (!(arg = strchr(buf, '='))) {
1599 *arg++ = 0;
1600 av_dict_set(&ost->encoder_opts, buf, arg, AV_DICT_DONT_OVERWRITE);
2196 /* arg format is "output-stream-index:streamid-value". */
2197 static int opt_streamid(void *optctx, const char *opt, const char *arg)
2204 av_strlcpy(idx_str, arg, sizeof(idx_str));
2209 arg, opt);
3055 static int opt_target(void *optctx, const char *opt, const char *arg)
3061 if (!strncmp(arg, "pal-", 4)) {
3063 arg += 4;
3064 } else if (!strncmp(arg, "ntsc-", 5)) {
3066 arg += 5;
3067 } else if (!strncmp(arg, "film-", 5)) {
3069 arg += 5;
3104 if (!strcmp(arg, "vcd")) {
3131 } else if (!strcmp(arg, "svcd")) {
3153 } else if (!strcmp(arg, "dvd")) {
3175 } else if (!strncmp(arg, "dv", 2)) {
3180 parse_option(o, "pix_fmt", !strncmp(arg, "dv50", 4) ? "yuv422p" :
3188 av_log(NULL, AV_LOG_ERROR, "Unknown target: %s\n", arg);
3198 static int opt_vstats_file(void *optctx, const char *opt, const char *arg)
3201 vstats_filename = av_strdup (arg);
3205 static int opt_vstats(void *optctx, const char *opt, const char *arg)
3221 static int opt_video_frames(void *optctx, const char *opt, const char *arg)
3224 return parse_option(o, "frames:v", arg, options);
3227 static int opt_audio_frames(void *optctx, const char *opt, const char *arg)
3230 return parse_option(o, "frames:a", arg, options);
3233 static int opt_data_frames(void *optctx, const char *opt, const char *arg)
3236 return parse_option(o, "frames:d", arg, options);
3239 static int opt_default_new(OptionsContext *o, const char *opt, const char *arg)
3247 ret = opt_default(NULL, opt, arg);
3259 static int opt_preset(void *optctx, const char *opt, const char *arg)
3270 if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
3271 if(!strncmp(arg, "libx264-lossless", strlen("libx264-lossless"))){
3274 av_log(NULL, AV_LOG_FATAL, "File for preset '%s' not found\n", arg);
3307 static int opt_old2new(void *optctx, const char *opt, const char *arg)
3314 ret = parse_option(o, s, arg, options);
3319 static int opt_bitrate(void *optctx, const char *opt, const char *arg)
3324 av_dict_set(&o->g->codec_opts, "b:a", arg, 0);
3328 av_dict_set(&o->g->codec_opts, "b:v", arg, 0);
3331 av_dict_set(&o->g->codec_opts, opt, arg, 0);
3335 static int opt_qscale(void *optctx, const char *opt, const char *arg)
3342 return parse_option(o, "q:v", arg, options);
3347 ret = parse_option(o, s, arg, options);
3352 static int opt_profile(void *optctx, const char *opt, const char *arg)
3357 av_dict_set(&o->g->codec_opts, "profile:v", arg, 0);
3360 av_dict_set(&o->g->codec_opts, opt, arg, 0);
3364 static int opt_video_filters(void *optctx, const char *opt, const char *arg)
3367 return parse_option(o, "filter:v", arg, options);
3370 static int opt_audio_filters(void *optctx, const char *opt, const char *arg)
3373 return parse_option(o, "filter:a", arg, options);
3376 static int opt_vsync(void *optctx, const char *opt, const char *arg)
3379 parse_and_set_vsync(arg, &video_sync_method, -1, -1, 1);
3383 static int opt_timecode(void *optctx, const char *opt, const char *arg)
3387 char *tcr = av_asprintf("timecode=%s", arg);
3392 ret = av_dict_set(&o->g->codec_opts, "gop_timecode", arg, 0);
3397 static int opt_audio_qscale(void *optctx, const char *opt, const char *arg)
3400 return parse_option(o, "q:a", arg, options);
3403 static int opt_filter_complex(void *optctx, const char *opt, const char *arg)
3408 fg->graph_desc = av_strdup(arg);
3417 static int opt_filter_complex_script(void *optctx, const char *opt, const char *arg)
3420 char *graph_desc = read_file(arg);
3433 void show_help_default(const char *opt, const char *arg)
3537 "%s.\n", inout, g->arg);
3542 av_log(NULL, AV_LOG_DEBUG, "Opening an %s file: %s.\n", inout, g->arg);
3543 ret = open_file(&o, g->arg);
3547 inout, g->arg);
3616 static int opt_progress(void *optctx, const char *opt, const char *arg)
3621 if (!strcmp(arg, "-"))
3622 arg = "pipe:";
3623 ret = avio_open2(&avio, arg, AVIO_FLAG_WRITE, &int_cb, NULL);
3626 arg, av_err2str(ret));
3633 int opt_timelimit(void *optctx, const char *opt, const char *arg)
3636 int lim = parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);