[FFmpeg-devel] [FFmpeg-commits] avio: deprecate url_fget_max_packet_size

Ronald S. Bultje rsbultje
Mon Mar 7 19:17:19 CET 2011


Hi,

On Mon, Mar 7, 2011 at 1:09 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Monday 2011-03-07 18:28:45 +0100, Anton Khirnov ?encoded:
>> Module: ffmpeg
>> Branch: master
>> Commit: e8bb2e24398ec838d9e49cf115b7e132609a9fb7
>>
>> Author: ? ?Anton Khirnov <anton at khirnov.net>
>> Committer: Ronald S. Bultje <rsbultje at gmail.com>
>> Date: ? ? ?Sun Mar ?6 18:04:49 2011 +0100
>>
>> avio: deprecate url_fget_max_packet_size
>>
>> AVIOContext.max_packet_size should be used directly instead.
>>
>> Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
>>
>> ---
>>
>> ?libavformat/avio.h ? ?| ? 11 ++++-------
>> ?libavformat/aviobuf.c | ? ?2 +-
>> ?libavformat/rtpenc.c ?| ? ?2 +-
>> ?3 files changed, 6 insertions(+), 9 deletions(-)
>>
>> diff --git a/libavformat/avio.h b/libavformat/avio.h
>> index 6da0cfa..09777a3 100644
>> --- a/libavformat/avio.h
>> +++ b/libavformat/avio.h
>> @@ -633,15 +633,12 @@ int avio_open(AVIOContext **s, const char *url, int flags);
>> ?int avio_close(AVIOContext *s);
>> ?URLContext *url_fileno(AVIOContext *s);
>>
>> +#if FF_API_OLD_AVIO
>> ?/**
>> - * Return the maximum packet size associated to packetized buffered file
>> - * handle. If the file is not packetized (stream like http or file on
>> - * disk), then 0 is returned.
>> - *
>> - * @param s buffered file handle
>> - * @return maximum packet size in bytes
>> + * @deprecated use AVIOContext.max_packet_size directly.
>> ? */
>> -int url_fget_max_packet_size(AVIOContext *s);
>> +attribute_deprecated int url_fget_max_packet_size(AVIOContext *s);
>> +#endif
>
> Removing docs for deprecated functions is not a good idea (especially
> for people updating their code to the new API).

I'd say it's OK, as long as the newly recommended API is documented in
the same or a better way. Is the max_packet_size variable in
AVIOContext documented adequately?

Ronald



More information about the ffmpeg-devel mailing list