[Ffmpeg-devel] Prefix for img_* functions
Michael Niedermayer
michaelni
Sun Mar 4 03:25:16 CET 2007
Hi
On Sat, Mar 03, 2007 at 10:39:23PM +0100, Panagiotis Issaris wrote:
> Hi,
>
> Michael Niedermayer schreef:
> >Hi
> >
> >On Thu, Mar 01, 2007 at 11:20:51PM +0100, Aurelien Jacobs wrote:
> >
> >>On Thu, 1 Mar 2007 17:20:21 +0100
> >>Michael Niedermayer <michaelni at gmx.at> wrote:
> >>
> >>
> >>>Hi
> >>>
> >>>On Thu, Mar 01, 2007 at 05:16:43PM +0100, Panagiotis Issaris wrote:
> >>>
> >>>>-----BEGIN PGP SIGNED MESSAGE-----
> >>>>Hash: SHA1
> >>>>
> >>>>Hi,
> >>>>
> >>>>Michael Niedermayer schreef:
> >>>>
> >>>>>Hi
> >>>>>
> >>>>>On Mon, Feb 26, 2007 at 03:27:10AM +0100, Panagiotis Issaris wrote:
> >>>>>
> >>>>>>Hi,
> >>>>>>
> >>>>>>Shouldn't the img_crop, img_copy and img_pad functions get av_
> >>>>>>prefixes?
> >>>>>>
> >>>>>yes but the old should stay available under #if version something and
> >>>>>with deprecated attribute
> >>>>>
> >>>>How would you prefer having the old versions available? Using #define's,
> >>>>duplicate code or the old functions calling the new ones? Or some other
> >>>>way?
> >>>>
> >>>#defines seem best after 5sec of thoughts
> >>>
> >>Unless I'm totaly mistaken, #define would cause an ABI break.
> >>I think the only reasonable way without breaking ABI is old functions
> >>calling the new ones.
> >>
> >
> >argh yes of course, ill try to find 10l
> >
>
> Here's an updated patch which renames img_copy, img_crop and img_pad to
> av_picture_* variants. This time without ABI breakage.
>
> ffmpeg.c | 8 ++++----
> libavcodec/avcodec.h | 17 ++++++++++++++---
> libavcodec/imgconvert.c | 29 +++++++++++++++++++++++++----
> libavcodec/imgresample.c | 2 +-
> libavcodec/nuv.c | 2 +-
> libavcodec/utils.c | 2 +-
> 6 files changed, 46 insertions(+), 14 deletions(-)
>
> There is also a function img_get_alpha_info(), is it okay to rename that
> one too? In the same patch or in a separate one?
whichever way you prefer ...
>
> I'm a bit confused regarding the FFmpeg project's naming conventions:
> Some functions are prefixed ith avcodec_, some with av_, some with
> avpicture_ some are not prefixed (such as register_avcodec, dump_format,
> parse_image_size, parse_frame_rate, parse_date, find_info_tag,
> video_grab_init, audio_init, dv1394_init, dc1394_init), some with ffm_
> and now because of this patch :) three with av_picture.
things are a "little" inconsistent, i know ...
every new public fuction should have av_ infront of it and
every function whith a simple name like parse_date() should be renamed
that way, functions which contain some av somewhere else in their name
can be left IMHO as its probably not worth the work to rename them ...
[...]
> Is there a document describing naming conventions for the project?
not that i know, but ive the feeing you will write one :)
and patch looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070304/28f9b57e/attachment.pgp>
More information about the ffmpeg-devel
mailing list