#include "ffmpeg.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/avfiltergraph.h"
#include "libavfilter/buffersink.h"
#include "libavutil/audioconvert.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/imgutils.h"
#include "libavutil/samplefmt.h"
Go to the source code of this file.
#define AUTO_INSERT_FILTER | ( | opt_name, | |||
filter_name, | |||||
arg | ) |
Value:
do { \ AVFilterContext *filt_ctx; \ \ av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \ "similarly to -af " filter_name "=%s.\n", arg); \ \ ret = avfilter_graph_create_filter(&filt_ctx, \ avfilter_get_by_name(filter_name), \ filter_name, arg, NULL, fg->graph); \ if (ret < 0) \ return ret; \ \ ret = avfilter_link(last_filter, pad_idx, filt_ctx, 0); \ if (ret < 0) \ return ret; \ \ last_filter = filt_ctx; \ pad_idx = 0; \ } while (0)
Referenced by configure_output_audio_filter().
#define AUTO_INSERT_FILTER_INPUT | ( | opt_name, | |||
filter_name, | |||||
arg | ) |
Value:
do { \ AVFilterContext *filt_ctx; \ \ av_log(NULL, AV_LOG_INFO, opt_name " is forwarded to lavfi " \ "similarly to -af " filter_name "=%s.\n", arg); \ \ snprintf(name, sizeof(name), "graph %d %s for input stream %d:%d", \ fg->index, filter_name, ist->file_index, ist->st->index); \ ret = avfilter_graph_create_filter(&filt_ctx, \ avfilter_get_by_name(filter_name), \ name, arg, NULL, fg->graph); \ if (ret < 0) \ return ret; \ \ ret = avfilter_link(filt_ctx, 0, first_filter, pad_idx); \ if (ret < 0) \ return ret; \ \ first_filter = filt_ctx; \ } while (0)
Referenced by configure_input_audio_filter().
#define DEF_CHOOSE_FORMAT | ( | type, | |||
var, | |||||
supported_list, | |||||
none, | |||||
get_name, | |||||
separator | ) |
Value:
static char *choose_ ## var ## s(OutputStream *ost) \ { \ if (ost->st->codec->var != none) { \ get_name(ost->st->codec->var); \ return av_strdup(name); \ } else if (ost->enc->supported_list) { \ const type *p; \ AVIOContext *s = NULL; \ uint8_t *ret; \ int len; \ \ if (avio_open_dyn_buf(&s) < 0) \ exit_program(1); \ \ for (p = ost->enc->supported_list; *p != none; p++) { \ get_name(*p); \ avio_printf(s, "%s" separator, name); \ } \ len = avio_close_dyn_buf(s, &ret); \ ret[len - 1] = 0; \ return ret; \ } else \ return NULL; \ }
Definition at line 136 of file ffmpeg_filter.c.
#define DESCRIBE_FILTER_LINK | ( | f, | |||
inout, | |||||
in | ) |
Value:
{ \ AVFilterContext *ctx = inout->filter_ctx; \ AVFilterPad *pads = in ? ctx->input_pads : ctx->output_pads; \ int nb_pads = in ? ctx->input_count : ctx->output_count; \ AVIOContext *pb; \ \ if (avio_open_dyn_buf(&pb) < 0) \ exit_program(1); \ \ avio_printf(pb, "%s", ctx->filter->name); \ if (nb_pads > 1) \ avio_printf(pb, ":%s", avfilter_pad_get_name(pads, inout->pad_idx));\ avio_w8(pb, 0); \ avio_close_dyn_buf(pb, &f->name); \ }
Definition at line 472 of file ffmpeg_filter.c.
Referenced by configure_input_filter(), and configure_output_filter().
static char* choose_pix_fmts | ( | OutputStream * | ost | ) | [static] |
enum PixelFormat choose_pixel_fmt | ( | AVStream * | st, | |
AVCodec * | codec, | |||
enum PixelFormat | target | |||
) |
Definition at line 36 of file ffmpeg_filter.c.
Referenced by choose_pix_fmts(), and read_ffserver_streams().
int configure_filtergraph | ( | FilterGraph * | fg | ) |
Definition at line 705 of file ffmpeg_filter.c.
Referenced by configure_complex_filters(), decode_audio(), decode_video(), and transcode_init().
static int configure_input_audio_filter | ( | FilterGraph * | fg, | |
InputFilter * | ifilter, | |||
AVFilterInOut * | in | |||
) | [static] |
static int configure_input_filter | ( | FilterGraph * | fg, | |
InputFilter * | ifilter, | |||
AVFilterInOut * | in | |||
) | [static] |
static int configure_input_video_filter | ( | FilterGraph * | fg, | |
InputFilter * | ifilter, | |||
AVFilterInOut * | in | |||
) | [static] |
static int configure_output_audio_filter | ( | FilterGraph * | fg, | |
OutputFilter * | ofilter, | |||
AVFilterInOut * | out | |||
) | [static] |
int configure_output_filter | ( | FilterGraph * | fg, | |
OutputFilter * | ofilter, | |||
AVFilterInOut * | out | |||
) |
Definition at line 489 of file ffmpeg_filter.c.
Referenced by configure_filtergraph(), and init_output_filter().
static int configure_output_video_filter | ( | FilterGraph * | fg, | |
OutputFilter * | ofilter, | |||
AVFilterInOut * | out | |||
) | [static] |
DEF_CHOOSE_FORMAT | ( | uint64_t | , | |
channel_layout | , | |||
channel_layouts | , | |||
0 | , | |||
GET_CH_LAYOUT_NAME | , | |||
" | , | |||
" | ||||
) |
DEF_CHOOSE_FORMAT | ( | enum | AVSampleFormat, | |
sample_fmt | , | |||
sample_fmts | , | |||
AV_SAMPLE_FMT_NONE | , | |||
GET_SAMPLE_FMT_NAME | , | |||
" | , | |||
" | ||||
) |
static void init_input_filter | ( | FilterGraph * | fg, | |
AVFilterInOut * | in | |||
) | [static] |
int ist_in_filtergraph | ( | FilterGraph * | fg, | |
InputStream * | ist | |||
) |
static int sub2video_prepare | ( | InputStream * | ist | ) | [static] |
Definition at line 168 of file ffmpeg_filter.c.
Definition at line 168 of file ffmpeg_filter.c.
Referenced by aiff_write_header(), audio_write_header(), avpriv_mpegaudio_decode_header(), build_feed_streams(), cdata_read_header(), celt_header(), config_output(), config_props(), dca_parse(), decode_init(), ff_voc_get_packet(), find_expected_header(), flv_read_packet(), get_aiff_header(), idcin_read_header(), main(), mkv_write_tracks(), mp3_header_decompress(), mp3_read_probe(), rv10_write_header(), smush_read_header(), sox_read_header(), spdif_header_dts(), swap_samplerates_on_filter(), and wsaud_read_header().