[FFmpeg-devel] [PATCH 2/3] lavf: replace all uses of url_fskip with avio_seek
Wed Mar 2 14:38:08 CET 2011
Le duodi 12 vent?se, an CCXIX, Michael Niedermayer a ?crit?:
> same reason as printf() vs. fprintf(stdout)
> and a+= b vs. a= a+b
> the shorter form exists because it is very common and more readable.
That is true, but it comes with an additional function (or macro). The
relative costs of an additional argument or an additional function depends
on your knowledge of the API.
You are very much familiar with ffmpeg API, so you know the various
functions, and the few more keystrokes are what bother you.
But think of a proficient C programmer who is only vaguely familiar with
ffmpeg's API: the exact meaning of foo_seek(..., SEEK_CUR) will be obvious
to him, since he already knows (f)seek(..., SEEK_CUR). On the other hand,
he will guess mostly what foo_skip(...) does based on the name, but not the
specifics (return value, particular cases, etc.).
Whether the API should favor generic C hackers or ffmpeg hackers is open to
discussion, and I have no advice on the subject.
> unless you can read peoples minds, i dont think you can know what the API
> users consider cleaner.
> also, if its antons patch he decides
> if its my patch (you remember last i send or even every i send since you
> hijaked the repository) its suddenly your decission and not mine
> as said, you are a dictator and a very dishonest one.
Nothing to add here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel