[Ffmpeg-devel] av_log() bloatedness

Michel Bardiaux mbardiaux
Thu Jul 27 14:37:29 CEST 2006


Michael Niedermayer wrote:
> Hi
> 
> On Mon, Jul 24, 2006 at 10:43:47AM -0400, Rich Felker wrote:
>> On Mon, Jul 24, 2006 at 03:23:55PM +0200, Michel Bardiaux wrote:
>>> Michael Niedermayer wrote:
>>>> Hi
>>>>
>>>> instead of directly using av_log_callback() we have av_log() and av_vlog()
>>>> instead of directly setting av_log_level we have av_log_get/set_level()
>>>>
>>>> why?
>>>> is there some deeper reason behind this? or just the CS/OOP/java 
>>>> braindamage
>>>> if later i will remove it under #if LIBAVUTIL_VERSION_INT < ... so that
>>>> it will disaprear the next time we break compatibility
>>>>
>>>>
>>>>
>>> Now this *had* to happen while I (as primary author for av_log) was on 
>>> vacation and unable to defend my design! Oh well... as we say in French 
>>> "Les absents ont toujours tort"...
>>>
>>> I guess using shared ffmpeg libs under windows will become even more 
>>> difficult, but its hard to say before the change is stabilized.
>> Yes, see the other thread. I kinda expect this change will be
>> reversed, 
> 
> yes, my idea was not good, but iam not sure yet what would be best
> 
> 
>> though perhaps via the macro method I suggested.
>>
>> BTW could you comment in the other thread on why so many calls to
>> av_log lack a context?
> 
> i think 20%-30% or so are just av_logs which are commented out ...
> 
> and whichever way we will change (or not change) the av_log() api
> its certainly a good idea to try to reduce the number of context-less
> av_logs (= patch welcome)
> 
> [...]

Initially my idea was that the callback and level etc would be 
per-context, then I saw many places where the context was not available, 
and had to use globals. So I agree, for a better API one must reduce the 
number of calls with null context, preferrably to zero. I will start on 
that, but its unlikely to be *one* patch, I will probably deal with one 
at a time.

But its going to be a slow start, I am in the throes of 
post-holiday-mail-sorting, and also have to get used to svn, which is 
made harder by the fact we're using cvs for our dev here, so acute 
schizophrenia, also I'm used to pcl-cvs in emacs and dont have a 
replacement yet (suggestions? In the other thread please!)

I will also post my reply to Rich in the other thread, this one should 
be closed.

Greetings,
-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list