[FFmpeg-soc] [soc]: r4713 - in afilters: af_null.c dummy.c
Benoit Fouet
benoit.fouet at free.fr
Wed Jul 15 20:40:48 CEST 2009
kdub wrote :
> Author: kdub
> Date: Mon Jul 13 20:36:13 2009
> New Revision: 4713
>
> Log:
> get two sequential filters working
>
> Modified:
> afilters/af_null.c
> afilters/dummy.c
>
> Modified: afilters/af_null.c
> ==============================================================================
> --- afilters/af_null.c Mon Jul 13 19:59:09 2009 (r4712)
> +++ afilters/af_null.c Mon Jul 13 20:36:13 2009 (r4713)
> @@ -48,6 +48,22 @@ AVFilter avfilter_af_null =
> { .name = NULL}},
> };
>
> +AVFilter avfilter_af_null2 =
> +{
> + .name = "audio_null",
> +
> + .priv_size = sizeof(af_null_priv_t),
> +
> + .inputs = (AVFilterPad[]) {{ .name = "default",
> + .type = CODEC_TYPE_AUDIO,
> + .filter_buffer = filter },
> + { .name = NULL}},
> +
> + .outputs = (AVFilterPad[]) {{ .name = "default",
> + .type = CODEC_TYPE_AUDIO, },
> + { .name = NULL}},
> +};
> +
>
> static int filter(AVFilterLink *link, AVFilterBufferRef *sample_ref)
> {
> @@ -59,10 +75,9 @@ static int filter(AVFilterLink *link, AV
> data = (int16_t*) sample_ref->buffer->data;
> for (i=0; i < num_samples; i++)
> {
> + printf("%i\n", data[i]);
>
unrelated change
> data[i] = data[i] +1;
> }
>
> return 0;
> }
> -
> -
>
ditto
> Modified: afilters/dummy.c
> ==============================================================================
> --- afilters/dummy.c Mon Jul 13 19:59:09 2009 (r4712)
> +++ afilters/dummy.c Mon Jul 13 20:36:13 2009 (r4713)
> @@ -8,7 +8,7 @@
> #include "af_src.c"
> #include "af_null.c"
>
> -#if 0
> +#if 1
> int dump_avfiltlink(AVFilterLink *link)
> {
> if (!link)
> @@ -99,28 +99,46 @@ int main()
> src_context = avfilter_open(src_filter, "filter_src");
> avfilter_register(src_filter);
>
> - /* set up actual filter */
> + /* set up the first filter */
>
ditto
> AVFilterContext * avfiltcont=NULL;
> AVFilter *avfilt;
> avfilt = &avfilter_af_null;
> avfiltcont = avfilter_open(avfilt, "filterID1234");
> avfilter_register(avfilt);
>
> + /* set up the first filter */
>
are there two first filters ?
> + AVFilterContext * avfiltcont2=NULL;
> + AVFilter *avfilt2;
>
you're mixing code and declarations, that should have raised a warning,
which you should read
thanks,
Ben
More information about the FFmpeg-soc
mailing list