[FFmpeg-soc] [soc]: r4715 - in afilters: af_null.c dummy.c

kdub subversion at mplayerhq.hu
Tue Jul 14 10:22:53 CEST 2009


Author: kdub
Date: Tue Jul 14 10:22:53 2009
New Revision: 4715

Log:
simple x2 volume filter

Modified:
   afilters/af_null.c
   afilters/dummy.c

Modified: afilters/af_null.c
==============================================================================
--- afilters/af_null.c	Tue Jul 14 10:09:58 2009	(r4714)
+++ afilters/af_null.c	Tue Jul 14 10:22:53 2009	(r4715)
@@ -24,7 +24,7 @@
 
 #include <stdio.h>
 #include "avfilter.h"
-static int filter(AVFilterLink *link, AVFilterBufferRef *sample_ref);
+static int null_filter(AVFilterLink *link, AVFilterBufferRef *sample_ref);
 
 typedef struct
 {
@@ -40,7 +40,7 @@ AVFilter avfilter_af_null =
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
                                     .type            = CODEC_TYPE_AUDIO,
-                                    .filter_buffer    = filter },
+                                    .filter_buffer    = null_filter },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
@@ -48,8 +48,7 @@ AVFilter avfilter_af_null =
                                   { .name = NULL}},
 };
 
-
-static int filter(AVFilterLink *link, AVFilterBufferRef *sample_ref)
+static int null_filter(AVFilterLink *link, AVFilterBufferRef *sample_ref)
 {
     av_log(0,0, "Filter buffer\n");
     int num_samples = sample_ref->buffer->n_samples;

Modified: afilters/dummy.c
==============================================================================
--- afilters/dummy.c	Tue Jul 14 10:09:58 2009	(r4714)
+++ afilters/dummy.c	Tue Jul 14 10:22:53 2009	(r4715)
@@ -7,6 +7,7 @@
 #include "avfilter.h"
 #include "af_src.c"
 #include "af_null.c"
+#include "af_vol.c"
 
 #if 1
 int dump_avfiltlink(AVFilterLink *link)
@@ -111,7 +112,7 @@ int main()
     AVFilterContext * avfiltcont2=NULL;
     AVFilter *avfilt2;
     avfilt2 = (AVFilter*)malloc(sizeof(AVFilter));
-    memcpy(avfilt2, &avfilter_af_null, sizeof(AVFilter));
+    memcpy(avfilt2, &avfilter_af_volume, sizeof(AVFilter));
     avfiltcont2 = avfilter_open(avfilt2, "filtery");
     avfilter_register(avfilt2);
 


More information about the FFmpeg-soc mailing list