[FFmpeg-devel] [PATCH] build: rely on pkg-config for libx264 probing / Hijacked Changelog discussion

Clément Bœsch u at pkh.me
Wed May 14 18:51:52 CEST 2014


On Tue, Dec 17, 2013 at 02:00:52PM +0000, Carl Eugen Hoyos wrote:
> Clément Bœsch <u <at> pkh.me> writes:
> 
> > before:
> >   ./configure --enable-gpl --enable-libx264 
> > --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib"
> > after:
> >   PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure 
> > --enable-gpl --enable-libx264
> 
> As said, I am mildly against this because I don't see 
> what it fixes (you still need a specific configure line) 

It fixes the need to add -I and -L flags. It also ease the creation of static
build: typically, with the help of --pkg-config-flags="--static" it will allow
these flags to be automatically added:

  ☭ pkg-config --libs --static x264
  -lx264 -lpthread -lm -ldl 

Note that when this kind of option is enabled, it is automatically applied to
any library where we use pkg-config. Since we use pkg-config for quite a bunch
of libraries, this should be expected (maybe the detection mechanism used for
each library could be documented).

Basically, as said in the original mail, I see pkg-config as a more reliable,
simpler and expected way for handling all the dependency needs and ease
multiple installations.

BTW, the following diff is actually simpler:

-enabled libx264           && require libx264 x264.h x264_encoder_encode -lx264 &&
-                             { check_cpp_condition x264.h "X264_BUILD >= 118" ||
-                               die "ERROR: libx264 must be installed and version must be >= 0.118."; }
+enabled libx264           && require_pkg_config "x264 >= 0.118" "stdint.h x264.h" x264_encoder_encode

> but at the same time breaks existing configure lines.
> 
> Or doesn't it break them?
> 

Yes, probably. Can't do much about it, these command lines are really
workarounds for a bad detection.

Now I think this is part of a real communication problem we have with our
downstreams. Typically, to overcome that kind of issue, I would suggest to
change our Changelog layout: we *NEED* a release note. We need to split
features, bugfixes (important ones only probably), and behaviour changes.

Suggestion: we wipe Changelog after every release, and replace it with
something like that:

Example inspired from i3 release notes (because it's pretty ;)):

----8<----------------------------------------------

 ┌──────────────────────────────┐
 │ Release notes for FFmpeg 2.3 │
 └──────────────────────────────┘

   2.3 was released blablabla
   It includes the following library versions:

    • libavutil      xx.yy.1zz
    • libavcodec     xx.yy.1zz
    • libavformat    xx.yy.1zz
    • libavdevice    xx.yy.1zz
    • libavfilter    xx.yy.1zz
    • libswscale     xx.yy.1zz
    • libswresample  xx.yy.1zz
    • libpostproc    xx.yy.1zz

   Please refer to the doc/APIChanges file for more information.

 ┌────────────────────────────┐
 │ Features                   │
 └────────────────────────────┘

  • AC3 fixed-point decoding
  • shuffleplanes filter
  • subfile protocol
  • Phantom Cine demuxer
  • replaygain data export
  • VP7 video decoder
  • Alias PIX image encoder and decoder
  • Improvments to the BRender PIX image decoder
  • Improvments to the XBM decoder
  • QTKit input device
  • improvments to OpenEXR image decoder
  • support decoding 16-bit RLE SGI images
  • GDI screen grabbing for Windows
  • alternative rendition support for HTTP Live Streaming
  • AVFoundation input device
  • Direct Stream Digital (DSD) decoder
  • Magic Lantern Video (MLV) demuxer
  • On2 AVC (Audio for Video) decoder
  • support for decoding through DXVA2 in ffmpeg
  • libbs2b-based stereo-to-binaural audio filter

 ┌────────────────────────────┐
 │ Bugfixes                   │
 └────────────────────────────┘

  • issue3327-libc-2.17.so is not a MP3 anymore

 ┌────────────────────────────┐
 │ ⚠ Behaviour changes ⚠      │
 └────────────────────────────┘

  • libx264 is now detected through pkg-config

----8<----------------------------------------------

I'm not sure for the Bugfixes section since it will probably be a pain to
maintain, and maybe irrelevant since it might be backported.

Anyway, you get the idea. I realize I should have started a new thread to
discuss this but well, deal with it.

Regards,

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140514/76422d0f/attachment.asc>


More information about the ffmpeg-devel mailing list