51 #if HAVE_SYS_RESOURCE_H
52 #include <sys/resource.h>
80 vfprintf(stdout, fmt, vl);
84 double min,
double max)
90 error =
"Expected number for %s but found: %s\n";
91 else if (d < min || d > max)
92 error =
"The value for %s was %s which is not within %f - %f\n";
93 else if (type ==
OPT_INT64 && (int64_t)d != d)
94 error =
"Expected int64 for %s but found %s\n";
95 else if (type ==
OPT_INT && (
int)d != d)
96 error =
"Expected int for %s but found %s\n";
110 is_duration ?
"duration" :
"date", context, timestr);
123 for (po = options; po->
name !=
NULL; po++) {
125 if ((po->
flags & mask) == value) {
152 const char *p = strchr(name,
':');
153 int len = p ? p - name : strlen(name);
156 if (!strncmp(name, po->
name, len) && strlen(po->
name) == len)
163 #if defined(_WIN32) && !defined(__MINGW32CE__)
166 static char** win32_argv_utf8 =
NULL;
167 static int win32_argc = 0;
180 int i, buffsize = 0, offset = 0;
182 if (win32_argv_utf8) {
183 *argc_ptr = win32_argc;
184 *argv_ptr = win32_argv_utf8;
189 argv_w = CommandLineToArgvW(GetCommandLineW(), &win32_argc);
190 if (win32_argc <= 0 || !argv_w)
194 for (i = 0; i < win32_argc; i++)
195 buffsize += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1,
198 win32_argv_utf8 =
av_mallocz(
sizeof(
char *) * (win32_argc + 1) + buffsize);
199 argstr_flat = (
char *)win32_argv_utf8 +
sizeof(
char *) * (win32_argc + 1);
200 if (win32_argv_utf8 ==
NULL) {
205 for (i = 0; i < win32_argc; i++) {
206 win32_argv_utf8[i] = &argstr_flat[offset];
207 offset += WideCharToMultiByte(CP_UTF8, 0, argv_w[i], -1,
208 &argstr_flat[offset],
211 win32_argv_utf8[i] =
NULL;
214 *argc_ptr = win32_argc;
215 *argv_ptr = win32_argv_utf8;
233 if (!po->
name && opt[0] ==
'n' && opt[1] ==
'o') {
259 char *p = strchr(opt,
':');
261 dstcount = (
int *)(so + 1);
262 *so =
grow_array(*so,
sizeof(**so), dstcount, *dstcount + 1);
263 (*so)[*dstcount - 1].specifier =
av_strdup(p ? p + 1 :
"");
264 dst = &(*so)[*dstcount - 1].u;
272 *(
int *)dst = bool_val;
288 "Failed to set value '%s' for option '%s'\n", arg, opt);
298 void (*parse_arg_function)(
void *,
const char*))
301 int optindex, handleoptions = 1, ret;
308 while (optindex < argc) {
309 opt = argv[optindex++];
311 if (handleoptions && opt[0] ==
'-' && opt[1] !=
'\0') {
312 if (opt[1] ==
'-' && opt[2] ==
'\0') {
318 if ((ret =
parse_option(optctx, opt, argv[optindex], options)) < 0)
322 if (parse_arg_function)
323 parse_arg_function(optctx, opt);
337 for (i = 1; i < argc; i++) {
338 const char *cur_opt = argv[i];
340 if (*cur_opt++ !=
'-')
344 if (!po->
name && cur_opt[0] ==
'n' && cur_opt[1] ==
'o')
347 if ((!po->
name && !strcmp(cur_opt, optname)) ||
348 (po->
name && !strcmp(optname, po->
name)))
362 if (idx && argv[idx + 1])
366 #define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
370 char opt_stripped[128];
377 if (!(p = strchr(opt,
':')))
378 p = opt + strlen(opt);
379 av_strlcpy(opt_stripped, opt,
FFMIN(
sizeof(opt_stripped), p - opt + 1));
383 ((opt[0] ==
'v' || opt[0] ==
'a' || opt[0] ==
's') &&
409 const struct {
const char *
name;
int level; } log_levels[] = {
424 if (!strcmp(log_levels[i].
name, arg)) {
430 level = strtol(arg, &tail, 10);
433 "Possible levels are numbers or:\n", arg);
446 struct rlimit rl = { lim, lim + 1 };
447 if (setrlimit(RLIMIT_CPU, &rl))
458 const char *errbuf_ptr = errbuf;
470 #define SHOW_VERSION 2
471 #define SHOW_CONFIG 4
473 #define PRINT_LIB_INFO(libname, LIBNAME, flags, level) \
474 if (CONFIG_##LIBNAME) { \
475 const char *indent = flags & INDENT? " " : ""; \
476 if (flags & SHOW_VERSION) { \
477 unsigned int version = libname##_version(); \
478 av_log(NULL, level, "%slib%-9s %2d.%3d.%2d / %2d.%3d.%2d\n",\
480 LIB##LIBNAME##_VERSION_MAJOR, \
481 LIB##LIBNAME##_VERSION_MINOR, \
482 LIB##LIBNAME##_VERSION_MICRO, \
483 version >> 16, version >> 8 & 0xff, version & 0xff); \
485 if (flags & SHOW_CONFIG) { \
486 const char *cfg = libname##_configuration(); \
487 if (strcmp(LIBAV_CONFIGURATION, cfg)) { \
489 av_log(NULL, level, \
490 "%sWARNING: library configuration mismatch\n", \
494 av_log(NULL, level, "%s%-11s configuration: %s\n", \
495 indent, #libname, cfg); \
516 "%s version " LIBAV_VERSION ", Copyright (c) %d-%d the Libav developers\n",
535 "This version of %s has nonfree parts compiled in.\n"
536 "Therefore it is not legally redistributable.\n",
539 "%s is free software; you can redistribute it and/or modify\n"
540 "it under the terms of the GNU General Public License as published by\n"
541 "the Free Software Foundation; either version 3 of the License, or\n"
542 "(at your option) any later version.\n"
544 "%s is distributed in the hope that it will be useful,\n"
545 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
546 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
547 "GNU General Public License for more details.\n"
549 "You should have received a copy of the GNU General Public License\n"
550 "along with %s. If not, see <http://www.gnu.org/licenses/>.\n",
553 "%s is free software; you can redistribute it and/or modify\n"
554 "it under the terms of the GNU General Public License as published by\n"
555 "the Free Software Foundation; either version 2 of the License, or\n"
556 "(at your option) any later version.\n"
558 "%s is distributed in the hope that it will be useful,\n"
559 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
560 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
561 "GNU General Public License for more details.\n"
563 "You should have received a copy of the GNU General Public License\n"
564 "along with %s; if not, write to the Free Software\n"
565 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n",
568 "%s is free software; you can redistribute it and/or modify\n"
569 "it under the terms of the GNU Lesser General Public License as published by\n"
570 "the Free Software Foundation; either version 3 of the License, or\n"
571 "(at your option) any later version.\n"
573 "%s is distributed in the hope that it will be useful,\n"
574 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
575 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
576 "GNU Lesser General Public License for more details.\n"
578 "You should have received a copy of the GNU Lesser General Public License\n"
579 "along with %s. If not, see <http://www.gnu.org/licenses/>.\n",
582 "%s is free software; you can redistribute it and/or\n"
583 "modify it under the terms of the GNU Lesser General Public\n"
584 "License as published by the Free Software Foundation; either\n"
585 "version 2.1 of the License, or (at your option) any later version.\n"
587 "%s is distributed in the hope that it will be useful,\n"
588 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
589 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
590 "Lesser General Public License for more details.\n"
592 "You should have received a copy of the GNU Lesser General Public\n"
593 "License along with %s; if not, write to the Free Software\n"
594 "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n",
604 const char *last_name;
607 " D. = Demuxing supported\n"
608 " .E = Muxing supported\n"
615 const char *long_name =
NULL;
618 if ((name ==
NULL || strcmp(ofmt->
name, name) < 0) &&
619 strcmp(ofmt->
name, last_name) > 0) {
626 if ((name ==
NULL || strcmp(ifmt->
name, name) < 0) &&
627 strcmp(ifmt->
name, last_name) > 0) {
632 if (name && strcmp(ifmt->
name, name) == 0)
639 printf(
" %s%s %-15s %s\n",
643 long_name ? long_name:
" ");
650 const char *last_name;
652 " D..... = Decoding supported\n"
653 " .E.... = Encoding supported\n"
654 " ..V... = Video codec\n"
655 " ..A... = Audio codec\n"
656 " ..S... = Subtitle codec\n"
657 " ...S.. = Supports draw_horiz_band\n"
658 " ....D. = Supports direct rendering method 1\n"
659 " .....T = Supports weird frame truncation\n"
666 const char *type_str;
670 if ((p2 ==
NULL || strcmp(p->
name, p2->name) < 0) &&
671 strcmp(p->
name, last_name) > 0) {
673 decode = encode = cap = 0;
675 if (p2 && strcmp(p->
name, p2->name) == 0) {
685 last_name = p2->name;
701 printf(
" %s%s%s%s%s%s %-15s %s",
702 decode ?
"D" : (
" "),
709 p2->long_name ? p2->long_name :
"");
711 if (p2->decoder && decode == 0)
712 printf(
" use %s for decoding", p2->decoder->name);
717 printf(
"Note, the names of encoders and decoders do not always match, so there are\n"
718 "several cases where the above table shows encoder only or decoder only entries\n"
719 "even though both encoding and decoding are supported. For example, the h263\n"
720 "decoder corresponds to the h263 and h263p encoders, for file formats it is even\n"
728 printf(
"Bitstream filters:\n");
739 printf(
"Supported file protocols:\n"
755 printf(
"%-16s %s\n", (*filter)->name, (*filter)->description);
764 "I.... = Supported Input format for conversion\n"
765 ".O... = Supported Output format for conversion\n"
766 "..H.. = Hardware accelerated format\n"
767 "...P. = Paletted format\n"
768 "....B = Bitstream format\n"
769 "FLAGS NAME NB_COMPONENTS BITS_PER_PIXEL\n"
773 # define sws_isSupportedInput(x) 0
774 # define sws_isSupportedOutput(x) 0
777 for (pix_fmt = 0; pix_fmt <
PIX_FMT_NB; pix_fmt++) {
779 printf(
"%c%c%c%c%c %-16s %d %2d\n",
803 int yesno = (toupper(c) ==
'Y');
805 while (c !=
'\n' && c != EOF)
814 FILE *
f = fopen(filename,
"rb");
821 fseek(f, 0, SEEK_END);
823 fseek(f, 0, SEEK_SET);
830 ret = fread(*bufptr, 1, *size, f);
835 filename, strerror(errno));
841 (*bufptr)[*size++] =
'\0';
877 const char *preset_name,
int is_path,
878 const char *codec_name)
882 const char *base[3] = { getenv(
"AVCONV_DATADIR"),
887 av_strlcpy(filename, preset_name, filename_size);
888 f = fopen(filename,
"r");
890 for (i = 0; i < 3 && !
f; i++) {
893 snprintf(filename, filename_size,
"%s%s/%s.avpreset", base[i],
894 i != 1 ?
"" :
"/.avconv", preset_name);
895 f = fopen(filename,
"r");
896 if (!f && codec_name) {
897 snprintf(filename, filename_size,
898 "%s%s/%s-%s.avpreset",
899 base[i], i != 1 ?
"" :
"/.avconv", codec_name,
901 f = fopen(filename,
"r");
911 if (*spec <= '9' && *spec >=
'0')
912 return strtol(spec,
NULL, 0) == st->
index;
913 else if (*spec ==
'v' || *spec ==
'a' || *spec ==
's' || *spec ==
'd' ||
926 if (*spec++ ==
':') {
930 return i == st->
index;
934 }
else if (*spec ==
'p' && *(spec + 1) ==
':') {
938 prog_id = strtol(spec, &endptr, 0);
943 if (*endptr++ ==
':') {
944 int stream_idx = strtol(endptr,
NULL, 0);
945 return stream_idx >= 0 &&
977 switch (codec->
type) {
993 char *p = strchr(t->
key,
':');
998 case 1: *p = 0;
break;
1000 default:
return NULL;
1008 else if (t->
key[0] == prefix &&
1030 "Could not alloc memory for stream options.\n");
1041 static int avsink_init(
AVFilterContext *ctx,
const char *args,
void *opaque)
1066 .
init = avsink_init,
1088 *picref_ptr = picref;
1092 memcpy(frame->
data, picref->
data,
sizeof(frame->
data));
1107 if (new_size >= INT_MAX / elem_size) {
1111 if (*size < new_size) {
1112 uint8_t *tmp =
av_realloc(array, new_size*elem_size);
1117 memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
Number of sample formats. DO NOT USE if linking dynamically.
int64_t num_faulty_dts
Number of incorrect PTS values so far.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AV_OPT_FLAG_VIDEO_PARAM
#define AV_LOG_PANIC
Something went really wrong and we will crash now.
int opt_loglevel(const char *opt, const char *arg)
Set the libav* libraries log level.
AVFilterBufferRefVideoProps * video
video buffer specific properties
#define AV_OPT_FLAG_AUDIO_PARAM
void sws_freeContext(struct SwsContext *swsContext)
Free the swscaler context swsContext.
AVCodec * avcodec_find_encoder(enum CodecID id)
Find a registered encoder with a matching codec ID.
int linesize[8]
number of bytes per line
int av_parse_time(int64_t *timeval, const char *timestr, int duration)
Parse timestr and return in *time a corresponding number of microseconds.
void show_banner(void)
Print the program banner to stderr.
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
const AVClass * av_opt_child_class_next(const AVClass *parent, const AVClass *prev)
Iterate over potential AVOptions-enabled children of parent.
#define AV_LOG_WARNING
Something somehow does not look correct.
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the given stream matches a stream specifier.
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
int index
stream index in AVFormatContext
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
AVCodec * avcodec_find_decoder(enum CodecID id)
Find a registered decoder with a matching codec ID.
int64_t last_pts
Number of incorrect DTS values so far.
void * av_realloc(void *ptr, size_t size)
Allocate or reallocate a block of memory.
#define FF_ARRAY_ELEMS(a)
int(* decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt)
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
AVDictionaryEntry * av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
const AVClass * sws_get_class(void)
Get the AVClass for swsContext.
void init_pts_correction(PtsCorrectionContext *ctx)
Reset the state of the PtsCorrectionContext.
static void null_end_frame(AVFilterLink *inlink)
#define AV_PERM_READ
can read from the buffer
unsigned int nb_stream_indexes
AVFilterLink ** inputs
array of pointers to input links
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
Trivial log callback.
AVBitStreamFilter * av_bitstream_filter_next(AVBitStreamFilter *f)
Opaque data information usually continuous.
int top_field_first
field order
void show_formats(void)
Print a listing containing all the formats supported by the program.
void show_help_options(const OptionDef *options, const char *msg, int mask, int value)
void init_opts(void)
Initialize the cmdutils option system, in particular allocate the *_opts contexts.
int(* func2_arg)(void *, const char *, const char *)
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, void(*parse_arg_function)(void *, const char *))
int key_frame
1 -> keyframe, 0-> not
static void print_all_libs_info(int flags, int level)
#define AVERROR_EOF
End of file.
int interlaced_frame
The content of the picture is interlaced.
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
void parse_loglevel(int argc, char **argv, const OptionDef *options)
Find the '-loglevel' option in the command line args and apply it.
external api for the swscale stuff
unsigned int * stream_index
AVRational pixel_aspect
pixel aspect ratio
static int init(AVCodecParserContext *s)
struct AVOutputFormat * oformat
AVDictionary ** setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *codec_opts)
Setup AVCodecContext options for avformat_find_stream_info().
AVDictionary * format_opts
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
A filter pad used for either input or output.
Main libavdevice API header.
A link between two filters.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
A helper for query_formats() which sets all links to the same list of formats.
static const uint16_t mask[17]
#define sws_isSupportedOutput(x)
#define CODEC_CAP_TRUNCATED
struct SwsContext * sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param)
Allocate and return an SwsContext.
void * priv
private data for use by the filter
int capabilities
Codec capabilities.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values. ...
int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options)
Parse one given option.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
#define PIX_FMT_PAL
Pixel format has a palette in data[1], values are indexes in this palette.
void av_log(void *avcl, int level, const char *fmt,...)
AVFilterFormats * avfilter_make_format_list(const int *fmts)
Create a list of supported formats.
const char * name
Name of the codec implementation.
int(* encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data)
void av_log_set_level(int level)
const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB]
The array of all the pixel format descriptors.
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
static const OptionDef * find_option(const OptionDef *po, const char *name)
int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t reordered_pts, int64_t dts)
Attempt to guess proper monotonic timestamps for decoded video frames which might have incorrect time...
AVCodecContext * codec
codec context
const AVOption * av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags)
Look for an option in an object.
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
unsigned int nb_streams
A list of all streams in the file.
uint8_t nb_components
The number of components each pixel has, (1-4)
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
int(* func_arg)(const char *, const char *)
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
const char * avio_enum_protocols(void **opaque, int output)
Iterate through names of available protocols.
#define PIX_FMT_BITSTREAM
All values of a component are bit-wise packed end to end.
void exit_program(int ret)
Do all the necessary cleanup and abort.
#define sws_isSupportedInput(x)
AVFilter ** av_filter_next(AVFilter **filter)
If filter is NULL, returns a pointer to the first registered filter pointer, if filter is non-NULL...
void show_version(void)
Print the version of the program to stdout.
Opaque data information usually sparse.
void show_pix_fmts(void)
Print a listing containing all the pixel formats supported by the program.
AVOutputFormat * av_oformat_next(AVOutputFormat *f)
If f is NULL, returns the first registered output format, if f is non-NULL, returns the next register...
void show_filters(void)
Print a listing containing all the filters supported by the program.
double av_strtod(const char *numstr, char **tail)
Parse the string in numstr and return its value as a double.
A reference to an AVFilterBuffer.
external postprocessing API
void show_license(void)
Print the license of the program to stdout.
#define PIX_FMT_HWACCEL
Pixel format is an HW accelerated format.
int opt_timelimit(const char *opt, const char *arg)
Limit the execution time.
enum AVMediaType codec_type
char * av_strdup(const char *s)
Duplicate the string s.
AVDictionary * filter_codec_opts(AVDictionary *opts, enum CodecID codec_id, AVFormatContext *s, AVStream *st)
Filter out options for given codec.
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags)
Show the obj options.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
static const OptionDef options[]
#define AV_OPT_FLAG_SUBTITLE_PARAM
char * av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt)
Generate a string corresponding to the sample format with sample_fmt, or a header if sample_fmt is ne...
AVRational sample_aspect_ratio
sample aspect ratio for the video frame, 0/1 if unknown
const int program_birth_year
program birth year, defined by the program for show_banner()
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int locate_option(int argc, char **argv, const OptionDef *options, const char *optname)
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
FILE * get_preset_file(char *filename, size_t filename_size, const char *preset_name, int is_path, const char *codec_name)
Get a file corresponding to a preset file.
int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame, AVFilterBufferRef **picref, AVRational *pts_tb)
Extract a frame from sink.
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
enum AVPictureType pict_type
picture type of the frame
#define PRINT_LIB_INFO(libname, LIBNAME, flags, level)
Describe the class of an AVClass context structure.
#define CODEC_CAP_DRAW_HORIZ_BAND
rational number numerator/denominator
const char program_name[]
program name, defined by the program for show_version().
int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
Parse a string specifying a time and return its corresponding value as a number of microseconds...
void * grow_array(void *array, int elem_size, int *size, int new_size)
Realloc array to hold new_size elements of elem_size.
struct SwsContext * sws_opts
int avfilter_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
const char * name
filter name
int64_t last_dts
PTS of the last frame.
void show_protocols(void)
Print a listing containing all the protocols supported by the program.
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes...
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max)
Parse a string and return its corresponding value as a double.
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size)
Read the file with name filename, and put its content in a newly allocated 0-terminated buffer...
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
const AVClass * priv_class
AVClass for the private context.
static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
Put a description of the AVERROR code errnum in errbuf.
void print_error(const char *filename, int err)
Print an error message to stderr, indicating filename and a human readable description of the error c...
static const int this_year
AVDictionary * codec_opts
int interlaced
is frame interlaced
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_OPT_SEARCH_FAKE_OBJ
The obj passed to av_opt_find() is fake – only a double pointer to AVClass instead of a required poi...
AVCodec * av_codec_next(AVCodec *c)
If c is NULL, returns the first registered codec, if c is non-NULL, returns the next registered codec...
void uninit_opts(void)
Uninitialize the cmdutils option system, in particular free the *_opts contexts and their contents...
AVInputFormat * av_iformat_next(AVInputFormat *f)
If f is NULL, returns the first registered input format, if f is non-NULL, returns the next registere...
CodecID
Identify the syntax and semantics of the bitstream.
void show_bsfs(void)
Print a listing containing all the bit stream filters supported by the program.
#define AVERROR_OPTION_NOT_FOUND
Option not found.
int show_sample_fmts(const char *opt, const char *arg)
Print a listing containing all the sample formats supported by the program.
int top_field_first
If the content is interlaced, is top field displayed first.
static void prepare_app_arguments(int *argc_ptr, char ***argv_ptr)
uint8_t * data[8]
picture/audio data for each plane
int key_frame
1 -> keyframe, 0-> not
int opt_default(const char *opt, const char *arg)
Fallback for options that are not explicitly handled, these will be parsed through AVOptions...
void show_help_children(const AVClass *class, int flags)
Show help for all options with given flags in class and all its children.
void show_codecs(void)
Print a listing containing all the codecs supported by the program.
AVFilterBufferRef * cur_buf
int read_yesno(void)
Return a positive value if a line read from standard input starts with [yY], otherwise return 0...
#define AV_DICT_IGNORE_SUFFIX
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
#define AV_NOPTS_VALUE
Undefined timestamp value.
simple arithmetic expression evaluator