[FFmpeg-soc] [soc]: r1904 - in libavfilter: allfilters.c avfilter.c avfilter.h
vitor
subversion at mplayerhq.hu
Tue Feb 12 21:40:32 CET 2008
Author: vitor
Date: Tue Feb 12 21:40:32 2008
New Revision: 1904
Log:
Missed this file in my conditional compilation patch
Added:
libavfilter/allfilters.c
Modified:
libavfilter/avfilter.c
libavfilter/avfilter.h
Added: libavfilter/allfilters.c
==============================================================================
--- (empty file)
+++ libavfilter/allfilters.c Tue Feb 12 21:40:32 2008
@@ -0,0 +1,61 @@
+/*
+ * Provides registration of all filters for libavfilter.
+ * copyright (c) 2008 Vitor Sessak
+ *
+ * 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"
+
+#define REGISTER_VF(X,x) { \
+ extern AVFilter avfilter_vf_##x ; \
+ if(ENABLE_VF_##X ) avfilter_register(&avfilter_vf_##x ); }
+
+
+#define REGISTER_VSRC(X,x) { \
+ extern AVFilter avfilter_vsrc_##x ; \
+ if(ENABLE_VSRC_##X ) avfilter_register(&avfilter_vsrc_##x ); }
+
+void avfilter_register_all(void)
+{
+ static int inited;
+
+ if (inited)
+ return;
+ inited = 1;
+
+ REGISTER_VF(CROP,crop);
+ REGISTER_VF(FIFO,fifo);
+ REGISTER_VF(FORMAT,format);
+ REGISTER_VF(FPS,fps);
+ REGISTER_VF(GRAPH,graph);
+ REGISTER_VF(GRAPHDESC,graphdesc);
+ REGISTER_VF(GRAPHFILE,graphfile);
+ REGISTER_VF(HFLIP,hflip);
+ REGISTER_VF(NEGATE,negate);
+ REGISTER_VF(NOFORMAT,noformat);
+ REGISTER_VF(OVERLAY,overlay);
+ REGISTER_VF(ROTATE,rotate);
+ REGISTER_VF(SCALE,scale);
+ REGISTER_VF(SETPTS,setpts);
+ REGISTER_VF(SLICIFY,slicify);
+ REGISTER_VF(SPLIT,split);
+ REGISTER_VF(TRANSPOSE,transpose);
+ REGISTER_VF(VFLIP,vflip);
+
+ REGISTER_VSRC(MOVIE,movie);
+}
Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c (original)
+++ libavfilter/avfilter.c Tue Feb 12 21:40:32 2008
@@ -298,27 +298,7 @@ void avfilter_register(AVFilter *filter)
void avfilter_init(void)
{
- avfilter_register(&avfilter_vf_crop);
- avfilter_register(&avfilter_vf_fifo);
- avfilter_register(&avfilter_vf_format);
- avfilter_register(&avfilter_vf_fps);
- avfilter_register(&avfilter_vf_graph);
- avfilter_register(&avfilter_vf_graphdesc);
- avfilter_register(&avfilter_vf_graphfile);
- avfilter_register(&avfilter_vf_hflip);
- avfilter_register(&avfilter_vf_negate);
- avfilter_register(&avfilter_vf_noformat);
- avfilter_register(&avfilter_vf_overlay);
- avfilter_register(&avfilter_vf_rotate);
- avfilter_register(&avfilter_vf_scale);
- avfilter_register(&avfilter_vf_setpts);
- avfilter_register(&avfilter_vf_slicify);
- avfilter_register(&avfilter_vf_split);
- avfilter_register(&avfilter_vf_transpose);
- avfilter_register(&avfilter_vf_vflip);
-#ifdef CONFIG_AVFILTER_LAVF
- avfilter_register(&avfilter_vsrc_movie);
-#endif //CONFIG_AVFILTER_LAVF
+ avfilter_register_all();
}
void avfilter_uninit(void)
Modified: libavfilter/avfilter.h
==============================================================================
--- libavfilter/avfilter.h (original)
+++ libavfilter/avfilter.h Tue Feb 12 21:40:32 2008
@@ -491,6 +491,9 @@ void avfilter_draw_slice(AVFilterLink *l
/** Initialize the filter system. Registers all builtin filters */
void avfilter_init(void);
+/** Initialize the filter system. Registers all builtin filters */
+void avfilter_register_all(void)
+
/** Uninitialize the filter system. Unregisters all filters */
void avfilter_uninit(void);
More information about the FFmpeg-soc
mailing list