diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-27 13:39:12 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-27 13:39:12 +0000 |
commit | f5b56f98b6bf2a512ca21836273caca732ef2e68 (patch) | |
tree | fb25ceb936e7b74e5cbb2cb77ba10943af4769ba | |
parent | c207d215f63c01cca4341a145f1a4dc1ecae7fed (diff) | |
download | mpv-f5b56f98b6bf2a512ca21836273caca732ef2e68.tar.bz2 mpv-f5b56f98b6bf2a512ca21836273caca732ef2e68.tar.xz |
libffmpeg.so support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2497 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-x | configure | 26 | ||||
-rw-r--r-- | dec_audio.c | 4 | ||||
-rw-r--r-- | dec_video.c | 4 | ||||
-rw-r--r-- | libvo/vo_mpegpes.c | 5 |
4 files changed, 33 insertions, 6 deletions
@@ -571,6 +571,7 @@ test "$host_arch" != i386 && _dshow=no _win32=no _fastmemcpy=yes _streaming=no _libavcodec=no +_libavcodec_so=no _kernelextcheck=yes _x=1 @@ -638,14 +639,18 @@ if test -d libavcodec && test -f libavcodec/Makefile ; then _libavcodec=yes fi +#Checking for libffmpeg.so +cat > $TMPC << EOF +#include <libffmpeg/avcodec.h> +int main( void ) { return 0; } +EOF +cc_check $_extraincdir $_extralibdir -lffmpeg && _libavcodec_so=yes if test -c /dev/mga_vid ; then _mga=yes _syncfb=yes fi - - case "$host_arch" in i386) _arch="#define ARCH_X86 1" @@ -1767,6 +1772,7 @@ fi fi echo "Checking for libavcodec ... $_libavcodec" +echo "Checking for libffmpeg.so ... $_libavcodec_so" echo "Checking for divx4linux ... $_divx4linux" echo "Checking for fastmemcpy ... $_fastmemcpy" echo "Extra libs : $_extralibdir" @@ -1907,10 +1913,19 @@ if test "$_libavcodec" = yes ; then _lavclib='-Llibavcodec -lavcodec' _lavcdep='libavcodec/libavcodec.a' _libavcodec='#define USE_LIBAVCODEC' + _libavcodecso='#undef USE_LIBAVCODEC' else - _lavclib='' - _lavcdep='' - _libavcodec='#undef USE_LIBAVCODEC' + if test "$_libavcodec_so" = yes ; then + _lavclib='-lffmpeg' + _lavcdep='' + _libavcodec='#define USE_LIBAVCODEC' + _libavcodecso='#define USE_LIBAVCODEC_SO' + else + _lavclib='' + _lavcdep='' + _libavcodec='#undef USE_LIBAVCODEC' + _libavcodecso='#undef USE_LIBAVCODEC' + fi fi if test "$_fastmemcpy" = yes ; then @@ -2548,6 +2563,7 @@ $_use_directshow /* ffmpeg's libavcodec support (requires libavcodec source) */ $_libavcodec +$_libavcodecso /* use only decoders from libavcodec: */ #define CONFIG_DECODERS diff --git a/dec_audio.c b/dec_audio.c index 5748cd512d..328784558d 100644 --- a/dec_audio.c +++ b/dec_audio.c @@ -59,7 +59,11 @@ typedef struct ov_struct_st { #endif #ifdef USE_LIBAVCODEC +#ifdef USE_LIBAVCODEC_SO +#include <libffmpeg/avcodec.h> +#else #include "libavcodec/avcodec.h" +#endif static AVCodec *lavc_codec=NULL; static AVCodecContext lavc_context; extern int avcodec_inited; diff --git a/dec_video.c b/dec_video.c index e7c340e7a4..f408fe1698 100644 --- a/dec_video.c +++ b/dec_video.c @@ -51,7 +51,11 @@ extern picture_t *picture; // exported from libmpeg2/decode.c #endif #ifdef USE_LIBAVCODEC +#ifdef USE_LIBAVCODEC_SO +#include <libffmpeg/avcodec.h> +#else #include "libavcodec/avcodec.h" +#endif static AVCodec *lavc_codec=NULL; static AVCodecContext lavc_context; static AVPicture lavc_picture; diff --git a/libvo/vo_mpegpes.c b/libvo/vo_mpegpes.c index d7855b4684..62be9e6415 100644 --- a/libvo/vo_mpegpes.c +++ b/libvo/vo_mpegpes.c @@ -50,8 +50,11 @@ int vo_mpegpes_fd2=-1; #ifdef USE_LIBAVCODEC +#ifdef USE_LIBAVCODEC_SO +#include <libffmpeg/avcodec.h> +#else #include "../libavcodec/avcodec.h" - +#endif static unsigned char *picture_buf=NULL; static unsigned char *outbuf=NULL; static int outbuf_size = 100000; |