[FFmpeg-soc] [soc]: r1669 - in libavfilter: allfilters.h avfilter.c vf_format.c
koorogi
subversion at mplayerhq.hu
Mon Dec 24 22:53:10 CET 2007
Author: koorogi
Date: Mon Dec 24 22:53:10 2007
New Revision: 1669
Log:
Add an equivalent to the mplayer format filter
Modified:
libavfilter/allfilters.h
libavfilter/avfilter.c
libavfilter/vf_format.c
Modified: libavfilter/allfilters.h
==============================================================================
--- libavfilter/allfilters.h (original)
+++ libavfilter/allfilters.h Mon Dec 24 22:53:10 2007
@@ -23,6 +23,7 @@
extern AVFilter avfilter_vf_crop;
extern AVFilter avfilter_vf_fifo;
+extern AVFilter avfilter_vf_format;
extern AVFilter avfilter_vf_fps;
extern AVFilter avfilter_vf_graph;
extern AVFilter avfilter_vf_graphdesc;
Modified: libavfilter/avfilter.c
==============================================================================
--- libavfilter/avfilter.c (original)
+++ libavfilter/avfilter.c Mon Dec 24 22:53:10 2007
@@ -292,6 +292,7 @@ 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);
Modified: libavfilter/vf_format.c
==============================================================================
--- libavfilter/vf_format.c (original)
+++ libavfilter/vf_format.c Mon Dec 24 22:53:10 2007
@@ -1,5 +1,5 @@
/*
- * Video noformat filter
+ * Video (no)format filter
* copyright (c) 2007 Bobby Bingham
*
* This file is part of FFmpeg.
@@ -85,6 +85,12 @@ static int query_formats_noformat(AVFilt
return 0;
}
+static int query_formats_format(AVFilterContext *ctx)
+{
+ avfilter_set_common_formats(ctx, make_format_list(ctx->priv, 1));
+ return 0;
+}
+
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
avfilter_start_frame(link->dst->outputs[0], picref);
@@ -122,3 +128,25 @@ AVFilter avfilter_vf_noformat =
{ .name = NULL}},
};
+AVFilter avfilter_vf_format =
+{
+ .name = "format",
+ .author = "Bobby Bingham",
+
+ .init = init,
+
+ .query_formats = query_formats_format,
+
+ .priv_size = sizeof(FormatContext),
+
+ .inputs = (AVFilterPad[]) {{ .name = "default",
+ .type = AV_PAD_VIDEO,
+ .start_frame = start_frame,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame, },
+ { .name = NULL}},
+ .outputs = (AVFilterPad[]) {{ .name = "default",
+ .type = AV_PAD_VIDEO },
+ { .name = NULL}},
+};
+
More information about the FFmpeg-soc
mailing list