Hi Tzafrir,

[replying (again) via bugreport rather than (only) mailinglist]

Quoting Tzafrir Cohen (2014-08-07 16:39:32)
> On Tue, Oct 27, 2009 at 03:12:01AM +0200, Faidon Liambotis wrote:
>> Jonas Smedegaard wrote:
>>> Asterisk 1.6 supports video on console channel if linked against 
>>> FFmpeg libraries.  Unfortunately the autoconf code does not detect 
>>> the location of those libraries as packaged by Debian, and the 
>>> console code expects old organisation of header files.

Attached are the patches (effectively identical but) unfuzzed against 
HEAD og git branch.


>> I don't feel very good about linking against another big library, 
>> much more without proper upstream support. I haven't made up my mind 
>> yet, though, I'll give it a try.
>
> I'm slightly less uncomfortable with linking it with a big library, 
> provided it is in a separate subpackage.
>
> Note that the console package conflicts with chan_alsa and chan_oss 
> and maybe it makes sense to move it to a subpackage due to this 
> conflict anyway.

If you mean to provide console-related modules in a separate binary 
package, then I agree that makes good sense.  I suggest to then 
additionally build-depend on libgtk2.0-dev, as I suspect (but haven't 
checked) that to be console-related as well.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
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 <d...@jones.dk>
Last-Update: 2015-05-27

--- 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			\
Description: Modernize autotools FFmpeg linking
 FFmpeg is a _family_ of libraries sharing an optional base subdir. This
 is not properly reflected in the autoconf detection logic, and makes it
 impossible to handle Debian location of these libraries.
 .
 This patch queries pkg-config, used with recent FFmpeg, for files
 "libavcodec" and "libswscale", the family members currently used.
Author: Jonas Smedegaard <d...@jones.dk>
Last-Update: 2015-05-27

--- a/configure.ac
+++ b/configure.ac
@@ -412,7 +412,7 @@
 AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_SRTP], [OpenSSL SRTP Extension Support], [CRYPTO], [crypto])
 AST_EXT_LIB_SETUP_OPTIONAL([OPENSSL_EC], [OpenSSL Elliptic Curve 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])
@@ -2411,7 +2411,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],

Attachment: signature.asc
Description: signature

Reply via email to