[FFmpeg-devel] [RFC] libavfilter audio framework - split patches

Michael Niedermayer michaelni
Wed Jul 14 16:43:35 CEST 2010


On Tue, Jul 13, 2010 at 02:32:36AM -0700, S.N. Hemanth Meenakshisundaram wrote:
> S.N. Hemanth Meenakshisundaram wrote:
>>> On date Sunday 2010-07-11 16:47:21 +0200, Michael Niedermayer encoded:
>>>     
>>>> On Sun, Jul 11, 2010 at 06:58:15AM -0700, S.N. Hemanth Meenakshisundaram
>>>> wrote:
>>>>       
>>>>> S.N. Hemanth Meenakshisundaram wrote:
>>>>>         
>>>>>> I am sending out the working lavfi audio patches in the order Stefano
>>>>>> requested for easy committing. [...]
>>>>>>           
>>>> duplicate of avfilter_ref_pic()
>>>>
>>>> duplicate of avfilter_unref_pic()
>>>>
>>>> duplicate of avfilter_get_video_buffer()
>>>>       
>>
>>   
>
> avfilter.c - differences from yesterday's patch.
>
> Using a macro to generalize ref_pic/ref_samples and 
> unref_pic/unref_samples. Note that this is required even with both 
> referencing the common and generalized AVFilterBuffer since the SamplesRef 
> and PicRef structures themselves need to be separate.
>
> Another for get_video_buffer/get_samples_ref and taking care of formats 
> being a common enum now.
>
>>>> duplicate avfilter_request_frame()
>>>>       
>>
>> For this one, I will eliminate request_samples completely.
>>
>>   
>

>  avfilter.c |   73 ++++++++++++++++++++++---------------------------------------
>  1 file changed, 27 insertions(+), 46 deletions(-)
> 53528a6120bf09c6bdc91f0f78e52c3895294bb7  avfic_changes.diff
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 6d265aa..a96c1df 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -44,37 +44,27 @@ const char *avfilter_license(void)
>  #define link_dpad(link)     link->dst-> input_pads[link->dstpad]
>  #define link_spad(link)     link->src->output_pads[link->srcpad]
>  
> -AVFilterPicRef *avfilter_ref_pic(AVFilterPicRef *ref, int pmask)
> -{
> -    AVFilterPicRef *ret = av_malloc(sizeof(AVFilterPicRef));
> -    *ret = *ref;
> -    ret->perms &= pmask;
> -    ret->pic->refcount ++;
> -    return ret;
> +#define DEFINE_AVFILTER_REF(refname, refstruct) refstruct *avfilter_ref_##refname(refstruct *ref, int pmask) \
> +{ \
> +    refstruct *ret = av_malloc(sizeof(refstruct)); \
> +    *ret = *ref; \
> +    ret->perms &= pmask; \
> +    ret->refname->refcount++; \
> +    return ret; \
>  }

either we can merge the functions cleanly or they should stay seperate.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100714/2205fb96/attachment.pgp>



More information about the ffmpeg-devel mailing list