64#ifndef FFTOOLS_CMDUTILS_H
65#define FFTOOLS_CMDUTILS_H
70#include "libavcodec/avcodec.h"
71#include "libavfilter/avfilter.h"
72#include "libavformat/avformat.h"
73#include "libswscale/swscale.h"
82#define AV_LOG_STDERR -16
94extern __thread AVDictionary *
sws_dict;
95extern __thread AVDictionary *
swr_opts;
142int opt_default(
void *optctx,
const char *opt,
const char *arg);
147int opt_timelimit(
void *optctx,
const char *opt,
const char *arg);
163 double min,
double max);
197#define HAS_ARG 0x0001
198#define OPT_BOOL 0x0002
199#define OPT_EXPERT 0x0004
200#define OPT_STRING 0x0008
201#define OPT_VIDEO 0x0010
202#define OPT_AUDIO 0x0020
203#define OPT_INT 0x0080
204#define OPT_FLOAT 0x0100
205#define OPT_SUBTITLE 0x0200
206#define OPT_INT64 0x0400
207#define OPT_EXIT 0x0800
208#define OPT_DATA 0x1000
209#define OPT_PERFILE 0x2000
211#define OPT_OFFSET 0x4000
212#define OPT_SPEC 0x8000
215#define OPT_TIME 0x10000
216#define OPT_DOUBLE 0x20000
217#define OPT_INPUT 0x40000
218#define OPT_OUTPUT 0x80000
238 int rej_flags,
int alt_flags);
266 void (* parse_arg_function)(
void *optctx,
const char*));
273int parse_option(
void *optctx,
const char *opt,
const char *arg,
380 const char *optname);
408 AVFormatContext *s, AVStream *st,
const AVCodec *codec);
467 const char *preset_name,
int is_path,
const char *codec_name);
479void *
grow_array(
void *array,
int elem_size,
int *size,
int new_size);
495#define GROW_ARRAY(array, nb_elems)\
496 array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
498#define ALLOC_ARRAY_ELEM(array, nb_elems)\
499 allocate_array_elem(&array, sizeof(*array[0]), &nb_elems)
501#define GET_PIX_FMT_NAME(pix_fmt)\
502 const char *name = av_get_pix_fmt_name(pix_fmt);
504#define GET_CODEC_NAME(id)\
505 const char *name = avcodec_descriptor_get(id)->name;
507#define GET_SAMPLE_FMT_NAME(sample_fmt)\
508 const char *name = av_get_sample_fmt_name(sample_fmt)
510#define GET_SAMPLE_RATE_NAME(rate)\
512 snprintf(name, sizeof(name), "%d", rate);
int(* func_arg)(void *, const char *, const char *)
const OptionGroupDef * group_def
AVDictionary * codec_opts
AVDictionary * format_opts
const OptionGroupDef * group_def