|
FFmpegKit Linux API
4.5.1
|
Go to the documentation of this file.
44 #ifndef FFTOOLS_CMDUTILS_H
45 #define FFTOOLS_CMDUTILS_H
49 #include "libavcodec/avcodec.h"
50 #include "libavfilter/avfilter.h"
51 #include "libavformat/avformat.h"
52 #include "libswscale/swscale.h"
61 #define AV_LOG_STDERR -16
73 extern __thread AVCodecContext *
avcodec_opts[AVMEDIA_TYPE_NB];
75 extern __thread AVDictionary *
sws_dict;
76 extern __thread AVDictionary *
swr_opts;
116 int opt_cpuflags(
void *optctx,
const char *opt,
const char *arg);
121 int opt_cpucount(
void *optctx,
const char *opt,
const char *arg);
127 int opt_default(
void *optctx,
const char *opt,
const char *arg);
132 int opt_loglevel(
void *optctx,
const char *opt,
const char *arg);
134 int opt_report(
void *optctx,
const char *opt,
const char *arg);
136 int opt_max_alloc(
void *optctx,
const char *opt,
const char *arg);
143 int opt_timelimit(
void *optctx,
const char *opt,
const char *arg);
159 double min,
double max);
193 #define HAS_ARG 0x0001
194 #define OPT_BOOL 0x0002
195 #define OPT_EXPERT 0x0004
196 #define OPT_STRING 0x0008
197 #define OPT_VIDEO 0x0010
198 #define OPT_AUDIO 0x0020
199 #define OPT_INT 0x0080
200 #define OPT_FLOAT 0x0100
201 #define OPT_SUBTITLE 0x0200
202 #define OPT_INT64 0x0400
203 #define OPT_EXIT 0x0800
204 #define OPT_DATA 0x1000
205 #define OPT_PERFILE 0x2000
207 #define OPT_OFFSET 0x4000
208 #define OPT_SPEC 0x8000
211 #define OPT_TIME 0x10000
212 #define OPT_DOUBLE 0x20000
213 #define OPT_INPUT 0x40000
214 #define OPT_OUTPUT 0x80000
234 int rej_flags,
int alt_flags);
252 int show_help(
void *optctx,
const char *opt,
const char *arg);
267 void (* parse_arg_function)(
void *optctx,
const char*));
274 int parse_option(
void *optctx,
const char *opt,
const char *arg,
382 const char *optname);
410 AVFormatContext *s, AVStream *st,
const AVCodec *codec);
450 int show_version(
void *optctx,
const char *opt,
const char *arg);
457 int show_buildconf(
void *optctx,
const char *opt,
const char *arg);
464 int show_license(
void *optctx,
const char *opt,
const char *arg);
471 int show_formats(
void *optctx,
const char *opt,
const char *arg);
478 int show_muxers(
void *optctx,
const char *opt,
const char *arg);
485 int show_demuxers(
void *optctx,
const char *opt,
const char *arg);
492 int show_devices(
void *optctx,
const char *opt,
const char *arg);
499 int show_sinks(
void *optctx,
const char *opt,
const char *arg);
505 int show_sources(
void *optctx,
const char *opt,
const char *arg);
513 int show_codecs(
void *optctx,
const char *opt,
const char *arg);
519 int show_decoders(
void *optctx,
const char *opt,
const char *arg);
525 int show_encoders(
void *optctx,
const char *opt,
const char *arg);
532 int show_filters(
void *optctx,
const char *opt,
const char *arg);
539 int show_bsfs(
void *optctx,
const char *opt,
const char *arg);
546 int show_protocols(
void *optctx,
const char *opt,
const char *arg);
553 int show_pix_fmts(
void *optctx,
const char *opt,
const char *arg);
560 int show_layouts(
void *optctx,
const char *opt,
const char *arg);
572 int show_colors(
void *optctx,
const char *opt,
const char *arg);
599 const char *preset_name,
int is_path,
const char *codec_name);
611 void *
grow_array(
void *array,
int elem_size,
int *size,
int new_size);
613 #define media_type_string av_get_media_type_string
615 #define GROW_ARRAY(array, nb_elems)\
616 array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
618 #define GET_PIX_FMT_NAME(pix_fmt)\
619 const char *name = av_get_pix_fmt_name(pix_fmt);
621 #define GET_CODEC_NAME(id)\
622 const char *name = avcodec_descriptor_get(id)->name;
624 #define GET_SAMPLE_FMT_NAME(sample_fmt)\
625 const char *name = av_get_sample_fmt_name(sample_fmt)
627 #define GET_SAMPLE_RATE_NAME(rate)\
629 snprintf(name, sizeof(name), "%d", rate);
631 #define GET_CH_LAYOUT_NAME(ch_layout)\
633 snprintf(name, sizeof(name), "0x%" PRIx64, ch_layout);
635 #define GET_CH_LAYOUT_DESC(ch_layout)\
637 av_get_channel_layout_string(name, sizeof(name), 0, ch_layout);
AVDictionary * codec_opts
const OptionGroupDef * group_def
int(* func_arg)(void *, const char *, const char *)
const OptionGroupDef * group_def
AVDictionary * resample_opts
AVDictionary * format_opts