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

Måns Rullgård mans
Thu Jul 1 23:47:56 CEST 2010


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> 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:
>> >> 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.
>
> ---
>  configure |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 92fdd01..637c436 100755
> --- a/configure
> +++ b/configure
> @@ -2529,7 +2529,8 @@ 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    && check_lib librtmp/rtmp.h  RTMP_Socket $(pkg-config --libs librtmp) ||
> +                        die "ERROR: RTMP_Socket() missing, librtmp version must be >= 2.2.f"
>  enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
>                             require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
>  enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex

Much nicer.  Patch OK.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list