tools/lavfi-showfiltfmts.c File Reference

#include "libavformat/avformat.h"
#include "libavutil/pixdesc.h"
#include "libavutil/samplefmt.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/formats.h"

Go to the source code of this file.

Defines

#define PRINT_FMTS(inout, outin, INOUT)

Functions

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


Define Documentation

#define PRINT_FMTS ( inout,
outin,
INOUT   ) 

Value:

for (i = 0; i < filter_ctx->inout##put_count; 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->format_count; j++)                    \
                if(av_get_pix_fmt_name(fmts->formats[j]))               \
                printf(#INOUT "PUT[%d] %s: fmt:%s\n",                   \
                       i, filter_ctx->filter->inout##puts[i].name,      \
                       av_get_pix_fmt_name(fmts->formats[j]));          \
        } else if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_AUDIO) { \
            AVFilterFormats *fmts;                                      \
                                                                        \
            fmts = filter_ctx->inout##puts[i]->outin##_formats;         \
            for (j = 0; j < fmts->format_count; j++)                    \
                printf(#INOUT "PUT[%d] %s: fmt:%s\n",                   \
                       i, filter_ctx->filter->inout##puts[i].name,      \
                       av_get_sample_fmt_name(fmts->formats[j]));       \
                                                                        \
            fmts = filter_ctx->inout##puts[i]->outin##_channel_layouts; \
            for (j = 0; j < fmts->format_count; j++) {                  \
                char buf[256];                                          \
                av_get_channel_layout_string(buf, sizeof(buf), -1,      \
                                             fmts->formats[j]);         \
                printf(#INOUT "PUT[%d] %s: chlayout:%s\n",              \
                       i, filter_ctx->filter->inout##puts[i].name, buf); \
            }                                                           \
        }                                                               \
    }                                                                   \

Referenced by print_formats().


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 65 of file lavfi-showfiltfmts.c.

static void print_formats ( AVFilterContext filter_ctx  )  [static]

Definition at line 27 of file lavfi-showfiltfmts.c.

Referenced by main().


Generated on Fri Oct 26 02:48:03 2012 for FFmpeg by  doxygen 1.5.8