[Pkg-voip-commits] [asterisk] 03/06: Enable video support in console: Add patch to use pkg-config for libavcodec and libswscale flags. Add patch to adjust paths to libavcodec and libswscale. Build-depend on libavcodec-dev libswscale-dev libsdl-image1.2-dev. Closes: bug#531728.

Jonas Smedegaard dr at jones.dk
Mon Mar 21 09:36:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository asterisk.

commit dc272a993cf2229afa3333b4a49bc684ceec706d
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Mon Mar 21 00:37:15 2016 +0100

    Enable video support in console: Add patch to use pkg-config for libavcodec and libswscale flags. Add patch to adjust paths to libavcodec and libswscale. Build-depend on libavcodec-dev libswscale-dev libsdl-image1.2-dev. Closes: bug#531728.
---
 debian/control                        |  3 +++
 debian/patches/ffmpeg-detection.patch | 42 +++++++++++++++++++++++++++++++++++
 debian/patches/ffmpeg-includes.patch  | 21 ++++++++++++++++++
 debian/patches/series                 |  3 +++
 4 files changed, 69 insertions(+)

diff --git a/debian/control b/debian/control
index 4355656..30899de 100644
--- a/debian/control
+++ b/debian/control
@@ -19,6 +19,7 @@ Build-Depends:
  dh-systemd,
  freetds-dev,
  libasound2-dev,
+ libavcodec-dev,
  libbluetooth-dev [linux-any],
  libc-client2007e-dev,
  libcap-dev [linux-any],
@@ -48,6 +49,7 @@ Build-Depends:
  libpri-dev,
  libreadline-dev,
  libresample1-dev,
+ libsdl-image1.2-dev,
  libsnmp-dev,
  libspandsp-dev,
  libspeex-dev,
@@ -57,6 +59,7 @@ Build-Depends:
  libsrtp-dev,
  libss7-dev,
  libssl-dev,
+ libswscale-dev,
  libtonezone-dev [linux-any],
  liburiparser-dev,
  libvorbis-dev,
diff --git a/debian/patches/ffmpeg-detection.patch b/debian/patches/ffmpeg-detection.patch
new file mode 100644
index 0000000..169e311
--- /dev/null
+++ b/debian/patches/ffmpeg-detection.patch
@@ -0,0 +1,42 @@
+Description: Modernize autotools FFmpeg linking
+ FFmpeg is a _family_ of libraries sharing an optional base subdir. That
+ is not properly reflected in the autoconf detection logic, and makes it
+ impossible to handle alternate location - e.g. when using Libav.
+ .
+ This patch queries pkg-config, used with recent FFmpeg, for files
+ "libavcodec" and "libswscale", the family members currently used.
+Author: Jonas Smedegaard <dr at jones.dk>
+Bug-Debian: http://bugs.debian.org/531728
+Last-Update: 2016-03-21
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -419,7 +419,7 @@
+ AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_EC], [OpenSSL Elliptic Curve Support], [CRYPTO], [crypto])
+ AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_ECDH_AUTO], [OpenSSL Auto ECDH Support], [CRYPTO], [crypto])
+ AST_EXT_LIB_SETUP([DAHDI], [DAHDI], [dahdi])
+-AST_EXT_LIB_SETUP([FFMPEG], [Ffmpeg and avcodec], [avcodec])
++AST_EXT_LIB_SETUP([FFMPEG], [FFmpeg (avcodec and swscale)], [ffmpeg])
+ AST_EXT_LIB_SETUP([GSM], [External GSM], [gsm], [, use 'internal' GSM otherwise])
+ AST_EXT_LIB_SETUP([ILBC], [System iLBC], [ilbc], [, use 'internal' iLBC otherwise])
+ AST_EXT_LIB_SETUP([GTK2], [gtk2], [gtk2])
+@@ -2448,7 +2448,18 @@
+ 
+ AST_EXT_TOOL_CHECK([SDL], [sdl-config])
+ AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
+-AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [${PTHREAD_LIBS} -lz -lm], [${PTHREAD_CFLAGS}])
++
++PBX_FFMPEG=0
++AC_CHECK_TOOL(PKGCONFIG, pkg-config, No)
++if test ! "x${PKGCONFIG}" = xNo; then
++   FFMPEG_INCLUDE=$(${PKGCONFIG} libavcodec libswscale --cflags 2>/dev/null)
++   FFMPEG_LIB=$(${PKGCONFIG} libavcodec libswscale --libs)
++   PBX_FFMPEG=1
++   AC_DEFINE([HAVE_FFMPEG], 1, [Define if your system has the FFmpeg libraries.])
++fi
++AC_SUBST(PBX_FFMPEG)
++AC_SUBST(FFMPEG_INCLUDE)
++AC_SUBST(FFMPEG_LIB)
+ 
+ # possible places for video4linux version 1
+ AC_CHECK_HEADER([linux/videodev.h],
diff --git a/debian/patches/ffmpeg-includes.patch b/debian/patches/ffmpeg-includes.patch
new file mode 100644
index 0000000..020ed82
--- /dev/null
+++ b/debian/patches/ffmpeg-includes.patch
@@ -0,0 +1,21 @@
+Description: Include subdirs (not main dir) for FFmpeg paths
+ Fix include FFmpeg headers from below /usr/include/ffmpeg/<libname>
+ (this change requires -I/usr/include/ffmpeg).
+Author: Jonas Smedegaard <dr at jones.dk>
+Bug-Debian: http://bugs.debian.org/531728
+Last-Update: 2016-03-21
+
+--- a/channels/console_video.h
++++ b/channels/console_video.h
+@@ -28,9 +28,9 @@
+ 		"console {device}"
+ #else
+ 
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
+ #ifndef OLD_FFMPEG
+-#include <ffmpeg/swscale.h>     /* requires a recent ffmpeg */
++#include <libswscale/swscale.h>     /* requires a recent ffmpeg */
+ #endif
+ 
+ #define CONSOLE_VIDEO_CMDS			\
diff --git a/debian/patches/series b/debian/patches/series
index 605258d..9f588bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,6 @@ configure-osarch
 opus.patch
 vp8.patch
 amr.patch
+
+ffmpeg-detection.patch
+ffmpeg-includes.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list