[FFmpeg-devel] [PATCH] add alloc_put_byte function

Baptiste Coudurier baptiste.coudurier
Mon Jan 14 14:34:54 CET 2008


Hi,

Aurelien Jacobs wrote:
> Baptiste Coudurier wrote:
> 
>> Baptiste Coudurier wrote:
>>> Hi Reimar,
>>>
>>> Reimar D?ffinger a ?crit :
>>>> Hello,
>>>> On Fri, Dec 21, 2007 at 09:49:05AM +0100, Reimar D?ffinger wrote:
>>>>> On Thu, Dec 20, 2007 at 11:58:32PM +0100, Baptiste Coudurier
>>>>> wrote: [...]
>>>>>> For consistency, can we choose a naming convention ?
>>>>>>
>>>>>> We got:
>>>>>> avcodec_alloc_context
>>>>>> av_alloc_format_context
>>>>>>
>>>>>> Furthermore, ByteIOContext can be used to read data, so naming it
>>>>>> alloc_put_byte seems somehow odd to me.
>>>>> I just went on analogy to init_put_byte, I don't like it
>>>>> particularly either. I'll go with anything you agree on ;-)
>>>> Applied with only av_ prefix added, I do not want to wait forever
>>>> with a depending patch.
>>>> Feel free to come up with a better name and then bump the lavf
>>>> version (I originally just forgot to do it, but now think it might
>>>> be good as it give as chance to change the name without breaking
>>>> API in the strict sense ;-) ).
>>>>
>>> Ok, I already suggested av_alloc_byteio_context, anyone against it ?
>>>
>> I'll apply the following patch in a few hours.
>>
>> [...]
>>
>> Index: libavformat/avio.h
>> ===================================================================
>> --- libavformat/avio.h	(revision 11525)
>> +++ libavformat/avio.h	(working copy)
>> @@ -181,7 +181,7 @@
>>                    int (*read_packet)(void *opaque, uint8_t *buf, int buf_size),
>>                    int (*write_packet)(void *opaque, uint8_t *buf, int buf_size),
>>                    offset_t (*seek)(void *opaque, offset_t offset, int whence));
>> -ByteIOContext *av_alloc_put_byte(
>> +ByteIOContext *av_alloc_byteio_context(
>>                    unsigned char *buffer,
>>                    int buffer_size,
>>                    int write_flag,
> 
> I don't know if anyone care, but this breaks API (so this should require a major
> version bump).
> 

Like Reimar pointed, since last change did not increase minor version
(API extension), function cannot be considered as part of the API yet.

This time it will be considered as API extension (because of the minor
version bump).

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312





More information about the ffmpeg-devel mailing list