[FFmpeg-devel] [RFC] print license and configuration for each lib

Diego Biurrun diego
Sun Nov 1 15:42:36 CET 2009


On Fri, Oct 30, 2009 at 08:54:16PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> 
> > On Fri, Oct 30, 2009 at 07:54:40PM +0000, M?ns Rullg?rd wrote:
> >> Diego Biurrun <diego at biurrun.de> writes:
> >> >> > Like I have done in $attached for libavcodec?  Anything else?
> >> >> >
> >> >> > +const char* avcodec_license(void)
> >> >> > +{
> >> >> > +    return "libavcodec license: " FFMPEG_LICENSE "\n";
> >> >> > +}
> >> >> 
> >> >> Drop the "libfoo thing:" prefixes.  Whatever is using the string can
> >> >> add those in a way that makes sense in its context.
> >> >
> >> > I agree that this would likely be more flexible, but note that I have a
> >> > vested interest in seeing this exact string appear in the lib binary :)
> >> 
> >> Then return a pointer part-way into the string.
> >
> > Just in case it is not clear e.g.:
> > #define LICENSEHDR "libavcodec license: "
> > return LICENSEHDR FFMPEG_LICENSE + strlen(LICENSEHDR);
> 
> If you don't trust the compiler to optimise the strlen(), which I
> dont, use sizeof(LICENSEHDR)-1.

OK, here is a version that should be fit for inclusion.

libavdevice/alldevices.c should probably be split into alldevices.c and
avdevice.c or similar.

Diego
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_license.diff
Type: text/x-diff
Size: 8319 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091101/736ee844/attachment.diff>



More information about the ffmpeg-devel mailing list