[FFmpeg-devel] [PATCH] make av_get_bit_rate part of public API
Michael Niedermayer
michaelni
Fri Nov 27 19:39:18 CET 2009
On Fri, Nov 27, 2009 at 01:32:19PM +0100, Robert Kr?ger wrote:
>
> On 25.11.2009, at 01:28, Michael Niedermayer wrote:
>
>> On Sat, Nov 21, 2009 at 03:10:38PM +0100, Robert Kr?ger wrote:
>>> Hi,
>>>
>>> this patch adds a prototype for av_get_bit_rate (implemented in
>>> libavcodec/utils.c) to avcodec.h.
>>
>> why is AVCodecContext.bit_rate not set?
>>
>
> you mean instead of returning it or do both, return the value and set it in
> AVCodecContext (in the audio case because in all others it is taken as the
> source of this information)?
>
> The primary reason I didn't set it was that I attempted a refactoring, i.e.
> didn't want to change behaviour. if you say it makes sense to set it there,
> the next question would be, where it is called because it seems a bit
> strange to have the field set as a side effect of calling something like
> avcodec_string. I don't know enough about ffmpeg or libav yet to decide
> where that would make sense.
> However, if it would happen in some
> initialization code which is typically called before someone obtains an
> AVCodecContext pointer, there would be no reason to have this function in
> the API (which I personally would also be OK with as my main motivation for
> the changes is to have libav expose the same bit rate information via API
> that ffmpeg shows as output on the command line).
yes, id like to have bit_rate set correctly instead of not and then have
a function that provides the correct value.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20091127/4140f7bf/attachment.pgp>
More information about the ffmpeg-devel
mailing list