[FFmpeg-devel] [PATCH] move av_crc04C11DB7_update to libavutil
Baptiste Coudurier
baptiste.coudurier
Sun Oct 28 22:11:05 CET 2007
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 ?
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crc2.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071028/c5fe1d5e/attachment.txt>
More information about the ffmpeg-devel
mailing list