]> git.sesse.net Git - vlc/commitdiff
* Fix ffmpeg libavformat linkage when we don't use --with-ffmpeg-tree (this fixes...
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 10 Apr 2006 21:32:26 +0000 (21:32 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 10 Apr 2006 21:32:26 +0000 (21:32 +0000)
* 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

configure.ac
modules/codec/ffmpeg/demux.c
modules/codec/ffmpeg/ffmpeg.c

index 7a87644bd33c5a69f7e19e1a9d086f3e20c1434f..694021573168678346b917f8c92b49b52f290dc3 100644 (file)
@@ -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
index 746f4231fdeeb442c66044169f8eb550d0239937..a0f169e346f2c8de7e4900447fa3a1c1cb75dc9a 100644 (file)
@@ -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
index 3fa08749b5808eb2c724ec515ced98f59f340ca5..a04c31b07e1e4b2fe36fd39512fc41f11c847adc 100644 (file)
@@ -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" },