allfilters.c 4.72 KB
Newer Older
1 2
/*
 * filter registration
3
 * Copyright (c) 2008 Vitor Sessak
4
 *
5
 * This file is part of Libav.
6
 *
7
 * Libav is free software; you can redistribute it and/or
8 9 10 11
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
12
 * Libav is distributed in the hope that it will be useful,
13 14 15 16 17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with Libav; if not, write to the Free Software
19 20 21 22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#include "avfilter.h"
23
#include "config.h"
24 25


26 27
#define REGISTER_FILTER(X,x,y) { \
          extern AVFilter avfilter_##y##_##x ; \
28
          if(CONFIG_##X##_FILTER )  avfilter_register(&avfilter_##y##_##x ); }
29 30 31 32 33 34 35 36 37

void avfilter_register_all(void)
{
    static int initialized;

    if (initialized)
        return;
    initialized = 1;

38
    REGISTER_FILTER (AFIFO,       afifo,       af);
39
    REGISTER_FILTER (AFORMAT,     aformat,     af);
40
    REGISTER_FILTER (AMIX,        amix,        af);
41
    REGISTER_FILTER (ANULL,       anull,       af);
42
    REGISTER_FILTER (ASHOWINFO,   ashowinfo,   af);
43
    REGISTER_FILTER (ASPLIT,      asplit,      af);
44
    REGISTER_FILTER (ASYNCTS,     asyncts,     af);
45
    REGISTER_FILTER (CHANNELMAP,  channelmap,  af);
46
    REGISTER_FILTER (CHANNELSPLIT,channelsplit,af);
47
    REGISTER_FILTER (JOIN,        join,        af);
48
    REGISTER_FILTER (RESAMPLE,    resample,    af);
49
    REGISTER_FILTER (VOLUME,      volume,      af);
50

51 52
    REGISTER_FILTER (ANULLSRC,    anullsrc,    asrc);

53 54
    REGISTER_FILTER (ANULLSINK,   anullsink,   asink);

55
    REGISTER_FILTER (BLACKFRAME,  blackframe,  vf);
56
    REGISTER_FILTER (BOXBLUR,     boxblur,     vf);
57
    REGISTER_FILTER (COPY,        copy,        vf);
58
    REGISTER_FILTER (CROP,        crop,        vf);
59
    REGISTER_FILTER (CROPDETECT,  cropdetect,  vf);
60
    REGISTER_FILTER (DELOGO,      delogo,      vf);
61
    REGISTER_FILTER (DRAWBOX,     drawbox,     vf);
62
    REGISTER_FILTER (DRAWTEXT,    drawtext,    vf);
Brandon Mintern's avatar
Brandon Mintern committed
63
    REGISTER_FILTER (FADE,        fade,        vf);
64
    REGISTER_FILTER (FIELDORDER,  fieldorder,  vf);
Stefano Sabatini's avatar
Stefano Sabatini committed
65
    REGISTER_FILTER (FIFO,        fifo,        vf);
66
    REGISTER_FILTER (FORMAT,      format,      vf);
Anton Khirnov's avatar
Anton Khirnov committed
67
    REGISTER_FILTER (FPS,         fps,         vf);
Stefano Sabatini's avatar
Stefano Sabatini committed
68
    REGISTER_FILTER (FREI0R,      frei0r,      vf);
69
    REGISTER_FILTER (GRADFUN,     gradfun,     vf);
Stefano Sabatini's avatar
Stefano Sabatini committed
70
    REGISTER_FILTER (HFLIP,       hflip,       vf);
71
    REGISTER_FILTER (HQDN3D,      hqdn3d,      vf);
72 73 74
    REGISTER_FILTER (LUT,         lut,         vf);
    REGISTER_FILTER (LUTRGB,      lutrgb,      vf);
    REGISTER_FILTER (LUTYUV,      lutyuv,      vf);
75
    REGISTER_FILTER (NEGATE,      negate,      vf);
76 77
    REGISTER_FILTER (NOFORMAT,    noformat,    vf);
    REGISTER_FILTER (NULL,        null,        vf);
78
    REGISTER_FILTER (OCV,         ocv,         vf);
79
    REGISTER_FILTER (OVERLAY,     overlay,     vf);
Michael Niedermayer's avatar
Michael Niedermayer committed
80
    REGISTER_FILTER (PAD,         pad,         vf);
81
    REGISTER_FILTER (PIXDESCTEST, pixdesctest, vf);
82
    REGISTER_FILTER (SCALE,       scale,       vf);
83
    REGISTER_FILTER (SELECT,      select,      vf);
84
    REGISTER_FILTER (SETDAR,      setdar,      vf);
85
    REGISTER_FILTER (SETPTS,      setpts,      vf);
86
    REGISTER_FILTER (SETSAR,      setsar,      vf);
87
    REGISTER_FILTER (SETTB,       settb,       vf);
88
    REGISTER_FILTER (SHOWINFO,    showinfo,    vf);
89
    REGISTER_FILTER (SPLIT,       split,       vf);
Stefano Sabatini's avatar
Stefano Sabatini committed
90
    REGISTER_FILTER (TRANSPOSE,   transpose,   vf);
91
    REGISTER_FILTER (UNSHARP,     unsharp,     vf);
92
    REGISTER_FILTER (VFLIP,       vflip,       vf);
93
    REGISTER_FILTER (YADIF,       yadif,       vf);
94

Stefano Sabatini's avatar
Stefano Sabatini committed
95
    REGISTER_FILTER (COLOR,       color,       vsrc);
96
    REGISTER_FILTER (FREI0R,      frei0r_src,  vsrc);
97
    REGISTER_FILTER (MOVIE,       movie,       vsrc);
98
    REGISTER_FILTER (NULLSRC,     nullsrc,     vsrc);
99
    REGISTER_FILTER (RGBTESTSRC,  rgbtestsrc,  vsrc);
100
    REGISTER_FILTER (TESTSRC,     testsrc,     vsrc);
101

102
    REGISTER_FILTER (NULLSINK,    nullsink,    vsink);
103

104 105
    /* those filters are part of public or internal API => registered
     * unconditionally */
106
    {
107
        extern AVFilter avfilter_vsrc_buffer;
108 109
        avfilter_register(&avfilter_vsrc_buffer);
    }
110 111 112 113
    {
        extern AVFilter avfilter_asrc_abuffer;
        avfilter_register(&avfilter_asrc_abuffer);
    }
114 115 116 117
    {
        extern AVFilter avfilter_vsink_buffer;
        avfilter_register(&avfilter_vsink_buffer);
    }
118 119 120 121
    {
        extern AVFilter avfilter_asink_abuffer;
        avfilter_register(&avfilter_asink_abuffer);
    }
122
}