FFmpeg
Macros | Functions
filtfmts.c File Reference
#include <stdio.h>
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/samplefmt.h"
#include "libavfilter/framequeue.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/formats.h"
#include "libavfilter/internal.h"

Go to the source code of this file.

Macros

#define FF_INTERNAL_FIELDS   1
 
#define PRINT_FMTS(inout, outin, INOUT)
 

Functions

static void print_formats (AVFilterContext *filter_ctx)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

◆ FF_INTERNAL_FIELDS

#define FF_INTERNAL_FIELDS   1

Definition at line 28 of file filtfmts.c.

◆ PRINT_FMTS

#define PRINT_FMTS (   inout,
  outin,
  INOUT 
)
Value:
for (i = 0; i < filter_ctx->nb_##inout##puts; i++) { \
if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_VIDEO) { \
AVFilterFormats *fmts = \
filter_ctx->inout##puts[i]->outin##_formats; \
for (j = 0; j < fmts->nb_formats; j++) \
if(av_get_pix_fmt_name(fmts->formats[j])) \
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
i, avfilter_pad_get_name(filter_ctx->inout##put_pads, i), \
av_get_pix_fmt_name(fmts->formats[j])); \
} else if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_AUDIO) { \
AVFilterFormats *fmts; \
AVFilterChannelLayouts *layouts; \
\
fmts = filter_ctx->inout##puts[i]->outin##_formats; \
for (j = 0; j < fmts->nb_formats; j++) \
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
i, avfilter_pad_get_name(filter_ctx->inout##put_pads, i), \
av_get_sample_fmt_name(fmts->formats[j])); \
\
layouts = filter_ctx->inout##puts[i]->outin##_channel_layouts; \
for (j = 0; j < layouts->nb_channel_layouts; j++) { \
char buf[256]; \
av_get_channel_layout_string(buf, sizeof(buf), -1, \
layouts->channel_layouts[j]); \
printf(#INOUT "PUT[%d] %s: chlayout:%s\n", \
i, avfilter_pad_get_name(filter_ctx->inout##put_pads, i), buf); \
} \
} \
} \

Function Documentation

◆ print_formats()

static void print_formats ( AVFilterContext filter_ctx)
static

Definition at line 35 of file filtfmts.c.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 74 of file filtfmts.c.

filter_ctx
static FilteringContext * filter_ctx
Definition: transcoding.c:45
avfilter_pad_get_name
const char * avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx)
Get the name of an AVFilterPad.
Definition: avfilter.c:1034
layouts
enum MovChannelLayoutTag * layouts
Definition: mov_chan.c:434
buf
void * buf
Definition: avisynth_c.h:766
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
av_get_sample_fmt_name
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.
Definition: samplefmt.c:49
printf
printf("static const uint8_t my_array[100] = {\n")
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
av_get_pix_fmt_name
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.
Definition: pixdesc.c:2438