[Libav-user] FFPlay input_filter and ffsink question

Farkas Szilard Levente farkas.szilard at gmail.com
Fri Jun 10 09:52:44 CEST 2011


Hello,

In FFplay method configure_video_filters there are two filters used:

1. ffplay input

static AVFilter input_filter =
{
    .name      = "ffplay_input",

    .priv_size = sizeof(FilterPriv),

    .init      = input_init,
    .uninit    = input_uninit,

    .query_formats = input_query_formats,

    .inputs    = (AVFilterPad[]) {{ .name = NULL }},
    .outputs   = (AVFilterPad[]) {{ .name = "default",
                                    .type = AVMEDIA_TYPE_VIDEO,
                                    .request_frame = input_request_frame,
                                    .config_props  = input_config_props, },
                                  { .name = NULL }},
};

2. ffsink from cmdutils.c

AVFilter ffsink = {
    .name      = "ffsink",
    .priv_size = sizeof(FFSinkContext),
    .init      = ffsink_init,

    .query_formats = ffsink_query_formats,

    .inputs    = (AVFilterPad[]) {{ .name          = "default",
                                    .type          = AVMEDIA_TYPE_VIDEO,
                                    .end_frame     = null_end_frame,
                                    .min_perms     = AV_PERM_READ, },
                                  { .name = NULL }},
    .outputs   = (AVFilterPad[]) {{ .name = NULL }},
};

Why are they used only in ffplay? What filter combination should I use
to do what ffplay does in configure_video_filters?

Right now I am using BUFFER filter as SRC, insert NULLSINK as the last
filter and use its input pin as my output.

input --> .. --> last_filter --> [in] nullsink [null]     [in] --> output
                                             |                              |
                                             |                              |
                                            +------------------------+

Any other way to do what ffplay does?

Thanks,
Szilard Farkas


More information about the Libav-user mailing list