[FFmpeg-devel] [PATCH 1/2] avutil: Add av_get_time_base{_q, }() and deprecate AV_TIME_BASE{_Q, }

Clément Bœsch u at pkh.me
Mon Dec 30 17:39:06 CET 2013


On Sun, Dec 29, 2013 at 11:35:37PM +0000, Derek Buitenhuis wrote:
> It was never a good idea to have tehse values as defines in the first place,
> since they are internal values, and may change.
> 

I don't think they are supposed to be changed, and if you change them, it
will likely break a lot of things. I don't think those macro hurts until
we need to change the value. No need to break the ABI for the sole purpose
of avoiding unsure ABI break in the future.

> This also fixes the impossibility of using AV_TIME_BASE_Q in pre-C99/C++
> applications, which cannot use compound literals directly in their code.

I'm al'right with that. But in that case, just add the two helpers for C++
apps and don't drop anything. It won't break anything, and it makes the
huge second patch unnecessary.

Also, we are already using c99 specific helpers such as av_err2str() and
av_ts2str(), both being unusable in C++, and with no alternative
implementation possible. Of course, just like with AV_TIME_BASE*, C++ app
can write their own helpers without a very small overhead.

BTW, no need to call them "evil", they aren't.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131230/6a3e201f/attachment.asc>


More information about the ffmpeg-devel mailing list