[FFmpeg-devel] [PATCH] move av_crc04C11DB7_update to libavutil
Michael Niedermayer
michaelni
Mon Oct 29 03:38:05 CET 2007
Hi
On Sun, Oct 28, 2007 at 10:11:05PM +0100, Baptiste Coudurier wrote:
> Aurelien Jacobs wrote:
> > Michael Niedermayer wrote:
> >
> >
> >>Hi
> >>
> >>On Sun, Oct 28, 2007 at 06:51:19PM +0100, Baptiste Coudurier wrote:
> >>
> >>>Hi
> >>>
> >>>$subject. Needed to avoid code duplication for new ogg muxer.
> >>>
> >>>--
> >>>Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
> >>>SMARTJOG S.A. http://www.smartjog.com
> >>>Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> >>>Phone: +33 1 49966312
> >>
> >>>Index: libavutil/crc.c
> >>>===================================================================
> >>>--- libavutil/crc.c (revision 10867)
> >>>+++ libavutil/crc.c (working copy)
> >>>@@ -105,6 +105,10 @@
> >>> return crc;
> >>> }
> >>>
> >>>+unsigned long av_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len){
> >>>+ return av_crc(av_crc04C11DB7, checksum, buf, len);
> >>>+}
> >>>+
> >>> #ifdef TEST
> >>> #undef printf
> >>> main(){
> >>
> >>libavutil is not supposed to be a place for code common between libavcodec
> >>and libavformat, even less so between 2 libavformat (de)muxers! but rather
> >>a small lib of generally usefull things av_crc04C11DB7_update() is not
> >>usefull outside of libavformat
> >>
> >>so this function should stay in libavformat
> >
> >
> > Indeed.
> > And I naively thought it should be moved to libavformat/crc.[ch].
> > But that's not possible right now. We currently can't have to .h
> > files with the same name in different libav* lib.
> > I wonder if this is intentional or if this should be fixed ?
> >
> > The problems are:
> > - usage of the FFMPEG_ prefix for multiple inclusion guards
> > solution: use the following prefix: AVUTIL_, AVFORMAT_...
> > - usage of -Ilibav* to set compiler include path
> > solution: only add ffmpeg root directory to compiler include
> > path, and explicitly specify directory when including files
> > which are not in the same directory
> >
> > I personally think it should be fixed, but if it's not, we should
> > probably at least add a note somewhere explaining that multiple
> > headers with the same name are forbidden.
> >
>
> Humm, so it ok to add it to aviobuf.c and avio.h for now ?
yes
though maybe they should have a ff_ prefix to indicate that they are
not part of the public API instead of av_
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I wish the Xiph folks would stop pretending they've got something they
do not. Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071029/fc79e81b/attachment.pgp>
More information about the ffmpeg-devel
mailing list