On 04/13/2011 03:15 AM, Ronald S. Bultje wrote:
> Hi,
> 
> On Sat, Apr 9, 2011 at 11:14 PM, Luca Barbato <[email protected]> wrote:
>> Today I planned to add to av_log() some optional features in order to
>> track file, line and function.
>>
>> I noticed some strange code introduced with this commit[1]
>>
>> if(avc && avc->version >= (50<<16 | 15<<8 | 2) &&
>> avc->log_level_offset_offset && level>=AV_LOG_FATAL)
>>        level += *(int*)(((uint8_t*)avcl) + avc->log_level_offset_offset);
>>    av_vlog(avcl, level, fmt, vl);
>>
>> It doesn't look particularly widespread and probably could be removed or
>> at least documented (only libavcodec seems to use it)
> 
> I would still consider it API/ABI breakage... :-(. It looks kinda
> hacky indeed. Was this reviewed?

I don't recall that and I'd drop it now.

btw since the first time I got asked about having file name and line
number in av_log I noticed it would be quite useful.

So that instead of having

[mpegts @ 0x1280c10] Invalid timestamps stream=0, pts=6499823403,
dts=6499824904, size=542 (that I would demote as level btw)

we'd got

[utils.c:1243 mpegts @ 0x1280c10] Invalid timestamps stream=0,
pts=6499823403, dts=6499824904, size=542

or

[av_read_frame_internal() : mpegts @ 0x1280c10] Invalid timestamps
stream=0, pts=6499823403, dts=6499824904, size=542

possibly depending on a flag.

May I add the macro machinery to make it happen?

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to