[FFmpeg-devel] [PATCH] examples: add README file with simple compilation instructions

Clément Bœsch ubitux at gmail.com
Fri Sep 14 02:19:44 CEST 2012


On Thu, Sep 13, 2012 at 09:50:07PM +0200, Stefano Sabatini wrote:
[...]
> > If my question above is answered positively, I would propose two sections:
> > 
> >  - "Build the installed examples in your copy":
> >         cp to a r/w user directory and just use "make", it will link to
> >         the libraries on your system, assuming the PKG_CONFIG_PATH is
> >         correctly configured
> > 
> >  - "Build the examples in-tree"
> >         you need a ffmpeg built, no need to make install in any prefix,
> >         and use PKG_CONFIG_PATH=pc-uninstalled prefix for make)
> > 
> > Would that make any sense?
> 
> Somehow changed.
> -- 
> FFmpeg = Fundamentalist and Fabulous Mournful Problematic Easy God

> From 95b4077216a8e295d94f8cbb002adcad3a2961b0 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Thu, 13 Sep 2012 21:12:56 +0200
> Subject: [PATCH] examples: add README file with simple compilation
>  instructions
> 
> ---
>  Makefile            |    2 +-
>  doc/examples/README |   31 +++++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+), 1 deletions(-)
>  create mode 100644 doc/examples/README
> 
> diff --git a/Makefile b/Makefile
> index 53db626..9329cc2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -41,7 +41,7 @@ FFLIBS-$(CONFIG_SWSCALE)  += swscale
>  FFLIBS := avutil
>  
>  DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
> -EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile
> +EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README
>  
>  SKIPHEADERS = cmdutils_common_opts.h
>  
> diff --git a/doc/examples/README b/doc/examples/README
> new file mode 100644
> index 0000000..4fdb668
> --- /dev/null
> +++ b/doc/examples/README
> @@ -0,0 +1,31 @@
> +FFmpeg examples README
> +----------------------
> +
> +In order to compile the example programs contained in this directory,
> +you need an updated installation of the FFmpeg libraries, and you need
> +to make the PKG_CONFIG_PATH environment variable point to the
> +installed pkgconfig files.
> +

Two comments:

 - if the user is reading this README, the example programs are likely in
   sync with the installed FFmpeg so they don't have to be aware of any
   need particular need concerning the FFmpeg libraries (or they would
   refer to the next section "Build the examples in the source FFmpeg
   tree).

   It might be better to just introduce the examples by saying something
   like "these examples are working with their associated installation" or
   something like this.

 - about the PKG_CONFIG_PATH, it should be set correctly if it's not a
   manual install in a weird path, so it might be more appropriate to
   mention something like "your PKG_CONFIG_PATH should point to the
   installed pkgconfig blabla, if not then... for example..."

> +For example, supposing you installed FFmpeg in /usr/local/, you'll
> +need to set PKG_CONFIG_PATH to "/usr/local/lib/pkgconfig", for example
> +typing the command:
> +$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
> +
> +Finally you can compile the example programs with the command:
> +$ make
> +
> +To remove the generated files, run the command:
> +$ make clean
> +
> +
> +Build the examples in the source FFmpeg tree
> +--------------------------------------------
> +
> +If you want to build the examples from the source tree and against the
> +locally built libraries, you can make PKG_CONFIG_PATH point to the
> +pkgconfig files in the directory pc-uninstalled/, for example running
> +the command:
> +

I think you need to say that if they are trying to build within
ffmpeg/doc/examples, then ffmpeg must be at least build in ffmpeg/ (and
that it's not necessary to make install)

> +$ env PKG_CONFIG_PATH=pc-uninstalled make
> +

The env doesn't loon necessary to me, even with dash.

> +and compiling with make as usual.

You mentioned ``make'' already in the previous command.

PS: thanks for writing that README, and sorry to be nitpicking so much
(but since it's for users I believe details are important to avoid any
confusion).

-- 
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: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120914/a88070ac/attachment.asc>


More information about the ffmpeg-devel mailing list