[FFmpeg-cvslog] r23928 - trunk/libavformat/librtmp.c

Stefano Sabatini stefano.sabatini-lala
Thu Jul 1 23:36:06 CEST 2010


On date Thursday 2010-07-01 21:50:20 +0100, M?ns Rullg?rd wrote:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> 
> > On date Thursday 2010-07-01 20:54:57 +0100, M?ns Rullg?rd wrote:
> >> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> >> 
> >> > On date Thursday 2010-07-01 14:48:36 +0200, Stefano Sabatini wrote:
> >> >> On date Thursday 2010-07-01 12:59:44 +0200, hyc wrote:
> >> >> > Author: hyc
> >> >> > Date: Thu Jul  1 12:59:44 2010
> >> >> > New Revision: 23928
> >> >> > 
> >> >> > Log:
> >> >> > Use new librtmp APIs instead of grubbing around in RTMP struct
> >> >> 
> >> >> Please add a version check in configure if --enable-librtmp, otherwise
> >> >> compilation will fail if an old version of librtmp is used.
> >> >
> >> > See attached.
> >> >
> >> > Subject: [(no PATCH 5/5] Add version check for librtmp, require
> >> >   version 2.2.f where RTMP_Socket() and RTMP_Pause() were added.
> >> >
> >> > Avoid a compile-time failure.
> >> > ---
> >> >  configure |    4 +++-
> >> >  1 files changed, 3 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/configure b/configure
> >> > index 92fdd01..cf1c758 100755
> >> > --- a/configure
> >> > +++ b/configure
> >> > @@ -2529,7 +2529,9 @@ enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
> >> >  enabled libopencore_amrnb  && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
> >> >  enabled libopencore_amrwb  && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
> >> >  enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
> >> > -enabled librtmp    && require  librtmp librtmp/rtmp.h RTMP_Init $(pkg-config --libs librtmp)
> >> > +enabled librtmp    && require  librtmp librtmp/rtmp.h RTMP_Init $(pkg-config --libs librtmp) &&
> >> > +                      { check_cpp_condition librtmp/rtmp.h "RTMP_LIB_VERSION >= 0x020206" ||
> >> > +                        die "ERROR: librtmp version must be >= 2.2.f"; }
> >> 
> >> Why not check for one of the required functions instead?  That's what
> >> we normally do.
> >
> > I want to provide useful information to the user, for example saying:
> > librtmp version must be >= 2.2.f
> >
> > is more useful than saying:
> > librtmp invalid or cannot be found
> 
> You can still print a suggested version number in the error message.
> Using check_lib instead of require lets you handle the error whichever
> way you please.
> 
> > Also the function check doesn't always work, for example if we require
> > the presence of a macro.
> 
> But this time it is a function.

Updated.



More information about the ffmpeg-cvslog mailing list