2008-02-15 23:02:51 +01:00
|
|
|
/*
|
|
|
|
* filter registration
|
2010-11-28 11:22:58 +01:00
|
|
|
* Copyright (c) 2008 Vitor Sessak
|
2008-02-15 23:02:51 +01:00
|
|
|
*
|
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
|
|
* 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
|
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "avfilter.h"
|
2012-08-06 15:49:32 +02:00
|
|
|
#include "config.h"
|
2008-02-15 23:02:51 +01:00
|
|
|
|
|
|
|
|
2012-12-25 15:29:39 +01:00
|
|
|
#define REGISTER_FILTER(X, x, y) \
|
|
|
|
{ \
|
|
|
|
extern AVFilter avfilter_##y##_##x; \
|
|
|
|
if (CONFIG_##X##_FILTER) \
|
|
|
|
avfilter_register(&avfilter_##y##_##x); \
|
|
|
|
}
|
2008-02-15 23:02:51 +01:00
|
|
|
|
2012-12-23 19:06:35 +01:00
|
|
|
#define REGISTER_FILTER_UNCONDITIONAL(x) \
|
|
|
|
{ \
|
|
|
|
extern AVFilter avfilter_##x; \
|
|
|
|
avfilter_register(&avfilter_##x); \
|
|
|
|
}
|
|
|
|
|
2008-02-15 23:02:51 +01:00
|
|
|
void avfilter_register_all(void)
|
|
|
|
{
|
|
|
|
static int initialized;
|
|
|
|
|
|
|
|
if (initialized)
|
|
|
|
return;
|
|
|
|
initialized = 1;
|
|
|
|
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(ACONVERT, aconvert, af);
|
2013-01-17 22:53:27 +01:00
|
|
|
REGISTER_FILTER(AFADE, afade, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(AFORMAT, aformat, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(AMERGE, amerge, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(AMIX, amix, af);
|
|
|
|
REGISTER_FILTER(ANULL, anull, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(APAD, apad, af);
|
|
|
|
REGISTER_FILTER(ARESAMPLE, aresample, af);
|
|
|
|
REGISTER_FILTER(ASELECT, aselect, af);
|
|
|
|
REGISTER_FILTER(ASENDCMD, asendcmd, af);
|
|
|
|
REGISTER_FILTER(ASETNSAMPLES, asetnsamples, af);
|
|
|
|
REGISTER_FILTER(ASETPTS, asetpts, af);
|
|
|
|
REGISTER_FILTER(ASETTB, asettb, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(ASHOWINFO, ashowinfo, af);
|
|
|
|
REGISTER_FILTER(ASPLIT, asplit, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(ASTREAMSYNC, astreamsync, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(ASYNCTS, asyncts, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(ATEMPO, atempo, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(CHANNELMAP, channelmap, af);
|
|
|
|
REGISTER_FILTER(CHANNELSPLIT, channelsplit, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(EARWAX, earwax, af);
|
|
|
|
REGISTER_FILTER(EBUR128, ebur128, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(JOIN, join, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(PAN, pan, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(RESAMPLE, resample, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SILENCEDETECT, silencedetect, af);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(VOLUME, volume, af);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(VOLUMEDETECT, volumedetect, af);
|
2010-08-21 01:16:51 +02:00
|
|
|
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(AEVALSRC, aevalsrc, asrc);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(ANULLSRC, anullsrc, asrc);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(FLITE, flite, asrc);
|
2010-09-25 03:56:58 +02:00
|
|
|
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(ANULLSINK, anullsink, asink);
|
2010-09-25 03:57:01 +02:00
|
|
|
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(ALPHAEXTRACT, alphaextract, vf);
|
|
|
|
REGISTER_FILTER(ALPHAMERGE, alphamerge, vf);
|
|
|
|
REGISTER_FILTER(ASS, ass, vf);
|
|
|
|
REGISTER_FILTER(BBOX, bbox, vf);
|
|
|
|
REGISTER_FILTER(BLACKDETECT, blackdetect, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(BLACKFRAME, blackframe, vf);
|
|
|
|
REGISTER_FILTER(BOXBLUR, boxblur, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(COLORMATRIX, colormatrix, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(COPY, copy, vf);
|
|
|
|
REGISTER_FILTER(CROP, crop, vf);
|
|
|
|
REGISTER_FILTER(CROPDETECT, cropdetect, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(DECIMATE, decimate, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(DELOGO, delogo, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(DESHAKE, deshake, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(DRAWBOX, drawbox, vf);
|
|
|
|
REGISTER_FILTER(DRAWTEXT, drawtext, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(EDGEDETECT, edgedetect, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(FADE, fade, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(FIELD, field, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(FIELDORDER, fieldorder, vf);
|
|
|
|
REGISTER_FILTER(FORMAT, format, vf);
|
|
|
|
REGISTER_FILTER(FPS, fps, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(FRAMESTEP, framestep, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(FREI0R, frei0r, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(GEQ, geq, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(GRADFUN, gradfun, vf);
|
|
|
|
REGISTER_FILTER(HFLIP, hflip, vf);
|
2012-10-20 07:45:51 +02:00
|
|
|
REGISTER_FILTER(HISTEQ, histeq, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(HQDN3D, hqdn3d, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(HUE, hue, vf);
|
|
|
|
REGISTER_FILTER(IDET, idet, vf);
|
2012-10-18 09:50:53 +02:00
|
|
|
REGISTER_FILTER(KERNDEINT, kerndeint, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(LUT, lut, vf);
|
|
|
|
REGISTER_FILTER(LUTRGB, lutrgb, vf);
|
|
|
|
REGISTER_FILTER(LUTYUV, lutyuv, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(MP, mp, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(NEGATE, negate, vf);
|
|
|
|
REGISTER_FILTER(NOFORMAT, noformat, vf);
|
|
|
|
REGISTER_FILTER(NULL, null, vf);
|
|
|
|
REGISTER_FILTER(OCV, ocv, vf);
|
|
|
|
REGISTER_FILTER(OVERLAY, overlay, vf);
|
|
|
|
REGISTER_FILTER(PAD, pad, vf);
|
|
|
|
REGISTER_FILTER(PIXDESCTEST, pixdesctest, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(PP, pp, vf);
|
|
|
|
REGISTER_FILTER(REMOVELOGO, removelogo, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(SCALE, scale, vf);
|
|
|
|
REGISTER_FILTER(SELECT, select, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SENDCMD, sendcmd, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(SETDAR, setdar, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SETFIELD, setfield, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(SETPTS, setpts, vf);
|
|
|
|
REGISTER_FILTER(SETSAR, setsar, vf);
|
|
|
|
REGISTER_FILTER(SETTB, settb, vf);
|
|
|
|
REGISTER_FILTER(SHOWINFO, showinfo, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SMARTBLUR, smartblur, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(SPLIT, split, vf);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SUBTITLES, subtitles, vf);
|
|
|
|
REGISTER_FILTER(SUPER2XSAI, super2xsai, vf);
|
|
|
|
REGISTER_FILTER(SWAPUV, swapuv, vf);
|
|
|
|
REGISTER_FILTER(THUMBNAIL, thumbnail, vf);
|
|
|
|
REGISTER_FILTER(TILE, tile, vf);
|
|
|
|
REGISTER_FILTER(TINTERLACE, tinterlace, vf);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(TRANSPOSE, transpose, vf);
|
|
|
|
REGISTER_FILTER(UNSHARP, unsharp, vf);
|
|
|
|
REGISTER_FILTER(VFLIP, vflip, vf);
|
|
|
|
REGISTER_FILTER(YADIF, yadif, vf);
|
2010-01-16 11:43:53 +01:00
|
|
|
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(CELLAUTO, cellauto, vsrc);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(COLOR, color, vsrc);
|
|
|
|
REGISTER_FILTER(FREI0R, frei0r_src, vsrc);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(LIFE, life, vsrc);
|
|
|
|
REGISTER_FILTER(MANDELBROT, mandelbrot, vsrc);
|
|
|
|
REGISTER_FILTER(MPTESTSRC, mptestsrc, vsrc);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(NULLSRC, nullsrc, vsrc);
|
|
|
|
REGISTER_FILTER(RGBTESTSRC, rgbtestsrc, vsrc);
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(SMPTEBARS, smptebars, vsrc);
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(TESTSRC, testsrc, vsrc);
|
2010-01-16 12:05:36 +01:00
|
|
|
|
2012-12-25 15:29:39 +01:00
|
|
|
REGISTER_FILTER(NULLSINK, nullsink, vsink);
|
2011-12-21 20:47:52 +01:00
|
|
|
|
2012-07-23 11:44:48 +02:00
|
|
|
/* multimedia filters */
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(CONCAT, concat, avf);
|
|
|
|
REGISTER_FILTER(SHOWSPECTRUM, showspectrum, avf);
|
|
|
|
REGISTER_FILTER(SHOWWAVES, showwaves, avf);
|
2011-12-25 17:37:53 +01:00
|
|
|
|
2012-07-23 23:21:33 +02:00
|
|
|
/* multimedia sources */
|
2012-12-29 14:27:38 +01:00
|
|
|
REGISTER_FILTER(AMOVIE, amovie, avsrc);
|
|
|
|
REGISTER_FILTER(MOVIE, movie, avsrc);
|
2012-07-23 23:21:33 +02:00
|
|
|
|
2012-12-29 15:37:05 +01:00
|
|
|
REGISTER_FILTER_UNCONDITIONAL(vsink_ffbuffersink);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(asink_ffabuffersink);
|
2012-09-26 11:59:56 +02:00
|
|
|
#if !AV_HAVE_INCOMPATIBLE_FORK_ABI
|
2012-12-29 15:37:05 +01:00
|
|
|
REGISTER_FILTER_UNCONDITIONAL(vsink_buffersink);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(asink_abuffersink);
|
2012-09-26 11:59:56 +02:00
|
|
|
#endif
|
|
|
|
|
2012-05-05 10:22:55 +02:00
|
|
|
/* those filters are part of public or internal API => registered
|
|
|
|
* unconditionally */
|
2012-12-23 19:06:35 +01:00
|
|
|
REGISTER_FILTER_UNCONDITIONAL(asrc_abuffer);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(vsrc_buffer);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(asink_abuffer);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(vsink_buffer);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(af_afifo);
|
|
|
|
REGISTER_FILTER_UNCONDITIONAL(vf_fifo);
|
2008-02-15 23:02:51 +01:00
|
|
|
}
|