Commit 516fba50 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac: detect if libavformat is present.
* modules/codec/ffmpeg/demux.c: new experimental demuxer using libavformat (most of the work done by fenrir).
   This demuxer should allow us to support "frindge" formats (FLIC, SWF, etc...).
   The demuxer has been put here because of its dependancy on libavformat and libavcodec.
* modules/codec/ffmpeg/ffmpeg.c: re-arranged the codecs list.
parent d6d35240
dnl Autoconf settings for vlc dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.145 2004/01/05 17:42:36 gbazin Exp $ dnl $Id: configure.ac,v 1.146 2004/01/08 00:12:50 gbazin Exp $
AC_INIT(vlc,0.7.1-cvs) AC_INIT(vlc,0.7.1-cvs)
...@@ -1746,7 +1746,7 @@ AC_CHECK_HEADERS(id3tag.h, [ ...@@ -1746,7 +1746,7 @@ AC_CHECK_HEADERS(id3tag.h, [
AX_ADD_PLUGINS([id3tag])]) ]) AX_ADD_PLUGINS([id3tag])]) ])
dnl dnl
dnl ffmpeg decoder plugin dnl ffmpeg decoder/demuxer plugin
dnl dnl
AC_ARG_ENABLE(ffmpeg, AC_ARG_ENABLE(ffmpeg,
[ --enable-ffmpeg ffmpeg codec (default enabled)]) [ --enable-ffmpeg ffmpeg codec (default enabled)])
...@@ -1785,6 +1785,10 @@ then ...@@ -1785,6 +1785,10 @@ then
dnl linker would miserably barf on multiple definitions. dnl linker would miserably barf on multiple definitions.
AX_ADD_LDFLAGS([stream_out_transcode],[]) ], AX_ADD_LDFLAGS([stream_out_transcode],[]) ],
[ 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.]) ]) [ 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.]) ])
AC_CHECK_LIB(avformat, av_open_input_stream, [
AC_DEFINE(HAVE_LIBAVFORMAT, 1,
[Define if you have ffmpeg's libavformat.])
AX_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ])
LDFLAGS="${LDFLAGS_save}" LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
fi fi
...@@ -1807,6 +1811,13 @@ then ...@@ -1807,6 +1811,13 @@ then
AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec -lavcodec]) AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavcodec -lavcodec])
AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavcodec]) AX_ADD_CPPFLAGS([ffmpeg],[-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.])
AX_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat -lavformat -lz])
AX_ADD_CPPFLAGS([ffmpeg],[-I${real_ffmpeg_tree}/libavformat])
fi
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions. dnl linker would miserably barf on multiple definitions.
AX_ADD_LDFLAGS([stream_out_transcode],[-L${real_ffmpeg_tree}/libavcodec]) AX_ADD_LDFLAGS([stream_out_transcode],[-L${real_ffmpeg_tree}/libavcodec])
......
...@@ -6,5 +6,6 @@ SOURCES_ffmpeg = \ ...@@ -6,5 +6,6 @@ SOURCES_ffmpeg = \
chroma.c \ chroma.c \
encoder.c \ encoder.c \
postprocess.c \ postprocess.c \
demux.c \
$(NULL) $(NULL)
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* ffmpeg.h: decoder using the ffmpeg library * ffmpeg.h: decoder using the ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: ffmpeg.h,v 1.30 2003/11/26 22:12:48 gbazin Exp $ * $Id: ffmpeg.h,v 1.31 2004/01/08 00:12:50 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -35,7 +35,8 @@ struct AVCodecContext; ...@@ -35,7 +35,8 @@ struct AVCodecContext;
struct AVCodec; struct AVCodec;
void E_(InitLibavcodec)( vlc_object_t * ); void E_(InitLibavcodec)( vlc_object_t * );
int E_(GetFfmpegCodec)( vlc_fourcc_t, int *, int *, char ** ); int E_(GetFfmpegCodec) ( vlc_fourcc_t, int *, int *, char ** );
int E_(GetVlcFourcc) ( int, int *, vlc_fourcc_t *, char ** );
int E_(GetFfmpegChroma)( vlc_fourcc_t ); int E_(GetFfmpegChroma)( vlc_fourcc_t );
/* Video decoder module */ /* Video decoder module */
...@@ -62,6 +63,10 @@ void E_(CloseEncoder)( vlc_object_t * ); ...@@ -62,6 +63,10 @@ void E_(CloseEncoder)( vlc_object_t * );
int E_(OpenAudioEncoder) ( vlc_object_t * ); int E_(OpenAudioEncoder) ( vlc_object_t * );
void E_(CloseAudioEncoder)( vlc_object_t * ); void E_(CloseAudioEncoder)( vlc_object_t * );
/* Demux module */
int E_(OpenDemux) ( vlc_object_t * );
void E_(CloseDemux)( vlc_object_t * );
/* Postprocessing module */ /* Postprocessing module */
void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * ); void *E_(OpenPostproc)( decoder_t *, vlc_bool_t * );
int E_(InitPostproc)( decoder_t *, void *, int, int, int ); int E_(InitPostproc)( decoder_t *, void *, int, int, int );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video.c: video decoder using the ffmpeg library * video.c: video decoder using the ffmpeg library
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: video.c,v 1.57 2003/12/02 10:55:21 gbazin Exp $ * $Id: video.c,v 1.58 2004/01/08 00:12:50 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -615,8 +615,9 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec, ...@@ -615,8 +615,9 @@ static void ffmpeg_CopyPicture( decoder_t *p_dec,
/* we need to convert to I420 */ /* we need to convert to I420 */
switch( p_sys->p_context->pix_fmt ) switch( p_sys->p_context->pix_fmt )
{ {
case( PIX_FMT_YUV410P ): case PIX_FMT_YUV410P:
case( PIX_FMT_YUV411P ): case PIX_FMT_YUV411P:
case PIX_FMT_PAL8:
for( i = 0; i < p_pic->i_planes; i++ ) for( i = 0; i < p_pic->i_planes; i++ )
{ {
dest_pic.data[i] = p_pic->p[i].p_pixels; dest_pic.data[i] = p_pic->p[i].p_pixels;
......
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