[FFmpeg-devel] [RFC] print license and configuration for each lib
Diego Biurrun
diego
Sun Nov 1 16:31:12 CET 2009
On Sun, Nov 01, 2009 at 03:06:12PM +0000, M?ns Rullg?rd wrote:
> Diego Biurrun <diego at biurrun.de> writes:
>
> > 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.
> >
> > --- libavutil/utils.c (Revision 20428)
> > +++ libavutil/utils.c (Arbeitskopie)
> > @@ -27,3 +28,14 @@
> > +
> > +const char * avutil_configuration(void)
> > +{
> > + return FFMPEG_CONFIGURATION;
> > +}
> > --- libavutil/avutil.h (Revision 20428)
> > +++ libavutil/avutil.h (Arbeitskopie)
> > @@ -53,6 +53,16 @@
> > */
> > unsigned avutil_version(void);
> >
> > +/**
> > + * Prints the libavutil build-time configuration.
>
> No, it doesn't.
>
> > + */
> > +const char * avutil_configuration(void);
>
> Same error in all the doxy comments.
Oops, fixed.
Diego
More information about the ffmpeg-devel
mailing list