Commit 23e6b8e6 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix ffmpeg libavformat linkage when we don't use --with-ffmpeg-tree (this fixes Flash playback)

* Add Shorten codec. This refs #632 It doesn't seem to work, but that might be an endianness issue. will someone please check with this sample? http://www.mplayerhq.hu/MPlayer/samples/A-codecs/lossless/luckynight.shn
parent 3bf4e344
......@@ -2554,7 +2554,7 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavcodec])
if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
AC_DEFINE(HAVE_LIBAVFORMAT, 1, [Define if you have ffmpeg's libavformat.])
AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
fi
......@@ -2573,6 +2573,8 @@ dnl Look for a ffmpeg-config (we are on debian )
if test "${FFMPEG_CONFIG}" != "no"
then
AC_CHECK_HEADERS(ffmpeg/avcodec.h)
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h)
VLC_ADD_PLUGINS([ffmpeg])
if test "${enable_sout}" != "no"; then
......@@ -2587,6 +2589,8 @@ dnl Trying with pkg-config
PKG_CHECK_MODULES(FFMPEG,[libavcodec, libavformat],
[
AC_CHECK_HEADERS(ffmpeg/avcodec.h)
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h)
VLC_ADD_BUILTINS([ffmpeg])
if test "${enable_sout}" != "no"; then
......@@ -2606,6 +2610,8 @@ dnl Trying with pkg-config
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
AC_CHECK_LIB(avutil, av_add_i, [
......@@ -2622,9 +2628,9 @@ dnl Trying with pkg-config
VLC_ADD_BUILTINS([stream_out_switcher])
fi],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
AC_CHECK_LIB(avformat, av_open_input_stream, [
AC_DEFINE(HAVE_LIBAVFORMAT, 1,
[Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
......@@ -2666,7 +2672,7 @@ then
VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavcodec -I${real_ffmpeg_tree}/libavformat])
if test -f "${real_ffmpeg_tree}/libavformat/libavformat.a"; then
AC_DEFINE(HAVE_LIBAVFORMAT, 1, [Define if you have ffmpeg's libavformat.])
AC_DEFINE(HAVE_LIBAVFORMAT_TREE, 1, [Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpegaltivec],[-L${real_ffmpeg_tree}/libavformat -lavformataltivec -lz])
VLC_ADD_CPPFLAGS([ffmpegaltivec],[-I${real_ffmpeg_tree}/libavformat])
fi
......
......@@ -32,7 +32,7 @@
#include "vlc_meta.h"
/* ffmpeg header */
#ifdef HAVE_FFMPEG_AVCODEC_H
#ifdef HAVE_FFMPEG_AVFORMAT_H
# include <ffmpeg/avformat.h>
#else
# include <avformat.h>
......@@ -43,7 +43,7 @@
//#define AVFORMAT_DEBUG 1
/* Version checking */
#if (LIBAVFORMAT_BUILD >= 4629) && defined(HAVE_LIBAVFORMAT)
#if (LIBAVFORMAT_BUILD >= 4629) && (defined(HAVE_FFMPEG_AVFORMAT_H) || defined(HAVE_LIBAVFORMAT_TREE))
/*****************************************************************************
* demux_sys_t: demux descriptor
......
......@@ -1044,6 +1044,12 @@ static struct
AUDIO_ES, "Cook Audio" },
#endif
#if LIBAVCODEC_BUILD >= ((51<<16)+(8<<8)+0)
/* Shorten */
{ VLC_FOURCC('s','h','n',' '), CODEC_ID_SHORTEN,
AUDIO_ES, "Shorten Lossless Audio" },
#endif
/* PCM */
{ VLC_FOURCC('s','8',' ',' '), CODEC_ID_PCM_S8,
AUDIO_ES, "PCM S8" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment