Go to the documentation of this file.
59 return default_formats;
69 int has_alpha =
desc ?
desc->nb_components % 2 == 0 : 0;
83 "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
97 for (; *p != -1; p++) {
106 "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
123 if (
ost->keep_pix_fmt) {
132 }
else if (
ost->enc &&
ost->enc->pix_fmts) {
141 p =
ost->enc->pix_fmts;
159 #define DEF_CHOOSE_FORMAT(suffix, type, var, supported_list, none, get_name) \
160 static char *choose_ ## suffix (OutputFilter *ofilter) \
162 if (ofilter->var != none) { \
163 get_name(ofilter->var); \
164 return av_strdup(name); \
165 } else if (ofilter->supported_list) { \
167 AVIOContext *s = NULL; \
171 if (avio_open_dyn_buf(&s) < 0) \
174 for (p = ofilter->supported_list; *p != none; p++) { \
176 avio_printf(s, "%s|", name); \
178 len = avio_close_dyn_buf(s, &ret); \
226 ist->filters[ist->nb_filters - 1] = fg->
inputs[0];
238 int nb_pads =
in ?
ctx->nb_inputs :
ctx->nb_outputs;
270 int file_idx = strtol(
in->name, &p, 0);
279 for (
i = 0;
i <
s->nb_streams;
i++) {
280 enum AVMediaType stream_type =
s->streams[
i]->codecpar->codec_type;
281 if (stream_type !=
type &&
298 "matches a disabled input stream.\n", p, fg->
graph_desc);
312 "unlabeled input pad %d on filter %s\n",
in->pad_idx,
313 in->filter_ctx->name);
383 const char *filter_name)
398 "recording time.\n",
name);
433 const char *filter_name,
const char *
args)
460 int pad_idx =
out->pad_idx;
514 if (
ost->frame_rate.num && 0) {
519 ost->frame_rate.den);
537 &last_filter, &pad_idx,
name);
554 int pad_idx =
out->pad_idx;
568 #define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
569 AVFilterContext *filt_ctx; \
571 av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
572 "similarly to -af " filter_name "=%s.\n", arg); \
574 ret = avfilter_graph_create_filter(&filt_ctx, \
575 avfilter_get_by_name(filter_name), \
576 filter_name, arg, NULL, fg->graph); \
580 ret = avfilter_link(last_filter, pad_idx, filt_ctx, 0); \
584 last_filter = filt_ctx; \
587 if (
ost->audio_channels_mapped) {
593 for (
i = 0;
i <
ost->audio_channels_mapped;
i++)
594 if (
ost->audio_channels_map[
i] != -1)
666 &last_filter, &pad_idx,
name);
759 int ret, pad_idx = 0;
760 int64_t tsoffset = 0;
765 memset(par, 0,
sizeof(*par));
788 "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
789 "pixel_aspect=%d/%d:sws_param=flags=%d",
807 last_filter = ifilter->
filter;
812 if (fabs(theta - 90) < 1.0) {
814 }
else if (fabs(theta - 180) < 1.0) {
819 }
else if (fabs(theta - 270) < 1.0) {
821 }
else if (fabs(theta) > 1.0) {
823 snprintf(rotate_buf,
sizeof(rotate_buf),
"%f*PI/180", theta);
852 tsoffset +=
f->ctx->start_time;
856 &last_filter, &pad_idx,
name);
878 int ret, pad_idx = 0;
879 int64_t tsoffset = 0;
903 last_filter = ifilter->
filter;
905 #define AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg) do { \
906 AVFilterContext *filt_ctx; \
908 av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
909 "similarly to -af " filter_name "=%s.\n", arg); \
911 snprintf(name, sizeof(name), "graph_%d_%s_in_%d_%d", \
912 fg->index, filter_name, ist->file_index, ist->st->index); \
913 ret = avfilter_graph_create_filter(&filt_ctx, \
914 avfilter_get_by_name(filter_name), \
915 name, arg, NULL, fg->graph); \
919 ret = avfilter_link(last_filter, 0, filt_ctx, 0); \
923 last_filter = filt_ctx; \
927 char args[256] = {0};
954 "audio filter instead.\n");
965 tsoffset +=
f->ctx->start_time;
969 &last_filter, &pad_idx,
name);
984 "No decoder for stream #%d:%d, filtering impossible\n",
1072 const char *num_inputs;
1073 const char *num_outputs;
1083 }
else if (
inputs->next) {
1089 "to have exactly 1 input and 1 output."
1090 " However, it had %s input(s) and %s output(s)."
1091 " Please adjust, or use a complex filtergraph (-filter_complex) instead.\n",
1092 graph_desc, num_inputs, num_outputs);
1142 ost->enc_ctx->frame_size);
1199 if (
frame->hw_frames_ctx) {
int init_complex_filtergraph(FilterGraph *fg)
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
struct FilterGraph * graph
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define GET_SAMPLE_RATE_NAME(rate)
enum AVMediaType codec_type
General type of the encoded data.
int nb_threads
Maximum number of threads used by filters in this graph.
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
uint64_t channel_layout
Audio channel layout.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
static enum AVSampleFormat sample_fmts[]
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
enum AVPixelFormat * pix_fmts
array of supported pixel formats, or NULL if unknown, array is terminated by -1
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int64_t start_time
start time in microseconds == AV_TIME_BASE units
This structure describes decoded (raw) audio or video data.
struct AVFilterInOut * next
next input/input in the list, NULL if this is the last
AVStream ** streams
A list of all streams in the file.
int capabilities
Codec capabilities.
int attribute_align_arg av_buffersrc_add_frame(AVFilterContext *ctx, AVFrame *frame)
Add a frame to the buffer source.
void check_filter_outputs(void)
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key,...
AVBufferRef * hw_device_ctx
For filters which will create hardware frames, sets the device the filter should create them in.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
AVFilterPad * output_pads
array of output pads
static enum AVPixelFormat * get_compliance_unofficial_pix_fmts(enum AVCodecID codec_id, const enum AVPixelFormat default_formats[])
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define FF_COMPLIANCE_UNOFFICIAL
Allow unofficial extensions.
void avfilter_graph_free(AVFilterGraph **graph)
Free a graph, destroy its links, and set *graph to NULL.
int init_simple_filtergraph(InputStream *ist, OutputStream *ost)
int configure_filtergraph(FilterGraph *fg)
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg)
void exit_program(int ret)
Wraps exit with a program-specific cleanup routine.
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx)
Create and add a filter instance into an existing graph.
void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size)
Set the frame size for an audio buffer sink.
AVFilterContext * avfilter_graph_alloc_filter(AVFilterGraph *graph, const AVFilter *filter, const char *name)
Create a new filter instance in a filter graph.
enum AVSampleFormat * sample_fmts
array of supported sample formats, or NULL if unknown, array is terminated by -1
AVFilterGraph * avfilter_graph_alloc(void)
Allocate a filter graph.
@ AVDISCARD_NONE
discard nothing
#define AV_BPRINT_SIZE_AUTOMATIC
int flags
AV_CODEC_FLAG_*.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
A filter pad used for either input or output.
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the given stream matches a stream specifier.
void avfilter_inout_free(AVFilterInOut **inout)
Free the supplied list of AVFilterInOut and set *inout to NULL.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
@ AV_PIX_FMT_YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
InputStream ** input_streams
static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
void sub2video_update(InputStream *ist, AVSubtitle *sub)
#define GET_CH_LAYOUT_NAME(ch_layout)
int av_buffersink_get_format(const AVFilterContext *ctx)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static const AVFilterPad outputs[]
static enum AVPixelFormat pix_fmts[]
struct OutputStream * ost
@ AVFILTER_AUTO_CONVERT_NONE
all automatic conversions disabled
float audio_drift_threshold
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
@ AV_PIX_FMT_YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
@ AVDISCARD_ALL
discard all
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)
Check validity and configure all the links and formats in the graph.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
void avfilter_graph_set_auto_convert(AVFilterGraph *graph, unsigned flags)
Enable or disable automatic format conversion inside the graph.
Rational number (pair of numerator and denominator).
@ AV_PIX_FMT_YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
AVFilterContext ** filters
void choose_sample_fmt(AVStream *st, AVCodec *codec)
AVDictionary * resample_opts
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE
Audio encoder supports receiving a different number of samples in each call.
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
void avio_w8(AVIOContext *s, int b)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs)
Add a graph described by a string to a graph.
uint64_t av_buffersink_get_channel_layout(const AVFilterContext *ctx)
int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
AVCodecID
Identify the syntax and semantics of the bitstream.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
int pad_idx
index of the filt_ctx pad to use for linking
char * scale_sws_opts
sws options to use for the auto-inserted scale filters
AVBufferSrcParameters * av_buffersrc_parameters_alloc(void)
Allocate a new AVBufferSrcParameters instance.
AVFilterContext * filter_ctx
filter context associated to this input/output
OutputFile ** output_files
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
Link two filters together.
AVBufferRef * hw_frames_ctx
Video with a hwaccel pixel format only.
static int64_t start_time
static int insert_trim(int64_t start_time, int64_t duration, AVFilterContext **last_filter, int *pad_idx, const char *filter_name)
#define AV_NOPTS_VALUE
Undefined timestamp value.
AVRational av_guess_frame_rate(AVFormatContext *ctx, AVStream *stream, AVFrame *frame)
Guess the frame rate, based on both the container and codec information.
#define GET_SAMPLE_FMT_NAME(sample_fmt)
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
#define AV_LOG_INFO
Standard information.
int channels
number of audio channels
int avfilter_init_str(AVFilterContext *filter, const char *args)
Initialize a filter with the supplied parameters.
int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
int av_buffersink_get_w(const AVFilterContext *ctx)
int av_buffersrc_parameters_set(AVFilterContext *ctx, AVBufferSrcParameters *param)
Initialize the buffersrc or abuffersrc filter with the provided parameters.
#define DECODING_FOR_FILTER
static int configure_input_filter(FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
#define i(width, name, range_min, range_max)
static AVBufferRef * hw_device_ctx
AVSampleFormat
Audio sample formats.
const char AVS_Value args
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * name
Name of the codec implementation.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
FilterGraph ** filtergraphs
int ist_in_filtergraph(FilterGraph *fg, InputStream *ist)
int av_buffersink_get_h(const AVFilterContext *ctx)
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
int strict_std_compliance
strictly follow the standard (MPEG-4, ...).
static int insert_filter(AVFilterContext **last_filter, int *pad_idx, const char *filter_name, const char *args)
void av_bprintf(AVBPrint *buf, const char *fmt,...)
enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCodec *codec, enum AVPixelFormat target)
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx)
Get the type of an AVFilterPad.
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
HWDevice * filter_hw_device
main external API structure.
int index
stream index in AVFormatContext
static char * choose_pix_fmts(OutputFilter *ofilter)
double get_rotation(AVStream *st)
This structure contains the parameters describing the frames that will be passed to this filter.
int av_buffersink_get_sample_rate(const AVFilterContext *ctx)
int format
video: the pixel format, value corresponds to enum AVPixelFormat audio: the sample format,...
static char * describe_filter_link(FilterGraph *fg, AVFilterInOut *inout, int in)
#define GROW_ARRAY(array, nb_elems)
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
#define AVERROR_FILTER_NOT_FOUND
Filter not found.
#define AV_CODEC_CAP_LOSSLESS
Codec is lossless.
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
static void cleanup_filtergraph(FilterGraph *fg)
#define AVERROR_DECODER_NOT_FOUND
Decoder not found.
enum AVMediaType codec_type
char * av_strdup(const char *s)
Duplicate a string.
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
A reference to a data buffer.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
int64_t av_get_default_channel_layout(int nb_channels)
Return default channel layout for a given number of channels.
int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
#define DEF_CHOOSE_FORMAT(suffix, type, var, supported_list, none, get_name)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
static const uint16_t channel_layouts[7]
int filtergraph_is_simple(FilterGraph *fg)
int width
picture width / height.
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
int64_t recording_time
desired length of the resulting file in microseconds == AV_TIME_BASE units
A linked-list of the inputs/outputs of the filter chain.
#define AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg)
static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
int filter_complex_nbthreads
static int sub2video_prepare(InputStream *ist, InputFilter *ifilter)