build: enable/disable all FFmpeg libraries together

Enable all of libavcodec, libavformat, libswscale, and libpostproc
together (libavutil is always required).

based on svn commit by diego:

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
Uoti Urpala 2010-10-31 03:19:56 +03:00
parent 389c32b5c7
commit c5e462b33d
16 changed files with 93 additions and 227 deletions

View File

@ -98,6 +98,27 @@ SRCS_COMMON-$(FAAD_INTERNAL) += libfaad2/bits.c \
libfaad2/tns.c \
SRCS_COMMON-$(FASTMEMCPY) += libvo/aclib.c
SRCS_COMMON-$(FFMPEG) += libmpcodecs/vf_pp.c \
av_opts.c \
libaf/af_lavcac3enc.c \
av_sub.c \
libaf/af_lavcresample.c \
libmpcodecs/ad_ffmpeg.c \
libmpcodecs/vd_ffmpeg.c \
libmpcodecs/vf_lavc.c \
libmpcodecs/vf_lavcdeint.c \
libmpcodecs/vf_screenshot.c \
libmpcodecs/vf_uspp.c \
libmpdemux/demux_lavf.c \
stream/stream_ffmpeg.c \
# These filters use private headers and do not work with shared libavcodec.
SRCS_COMMON-$(FFMPEG_INTERNALS) += libmpcodecs/vf_fspp.c \
libmpcodecs/vf_geq.c \
libmpcodecs/vf_mcdeint.c \
libmpcodecs/vf_qp.c \
libmpcodecs/vf_spp.c \
SRCS_COMMON-$(FREETYPE) += libvo/font_load_ft.c
SRCS_COMMON-$(FTP) += stream/stream_ftp.c
SRCS_COMMON-$(GIF) += libmpdemux/demux_gif.c
@ -109,27 +130,6 @@ SRCS_COMMON-$(LIBA52) += libmpcodecs/ad_liba52.c
SRCS_COMMON-$(LIBASS) += ass_mp.c \
libmpcodecs/vf_ass.c \
SRCS_COMMON-$(LIBAVCODEC) += av_opts.c \
libaf/af_lavcac3enc.c \
av_sub.c \
libaf/af_lavcresample.c \
libmpcodecs/ad_ffmpeg.c \
libmpcodecs/vd_ffmpeg.c \
libmpcodecs/vf_lavc.c \
libmpcodecs/vf_lavcdeint.c \
libmpcodecs/vf_screenshot.c \
libmpcodecs/vf_uspp.c \
# These filters use private headers and do not work with shared libavcodec.
SRCS_COMMON-$(LIBAVCODEC_INTERNALS) += libmpcodecs/vf_fspp.c \
libmpcodecs/vf_geq.c \
libmpcodecs/vf_mcdeint.c \
libmpcodecs/vf_qp.c \
libmpcodecs/vf_spp.c \
SRCS_COMMON-$(LIBAVFORMAT) += libmpdemux/demux_lavf.c \
stream/stream_ffmpeg.c \
SRCS_COMMON-$(LIBBLURAY) += stream/stream_bluray.c
SRCS_COMMON-$(LIBBS2B) += libaf/af_bs2b.c
SRCS_COMMON-$(LIBDCA) += libmpcodecs/ad_libdca.c
@ -167,7 +167,6 @@ SRCS_COMMON-$(LIBMPEG2) += libmpcodecs/vd_libmpeg2.c \
SRCS_COMMON-$(LIBNEMESI) += libmpdemux/demux_nemesi.c \
stream/stream_nemesi.c
SRCS_COMMON-$(LIBNUT) += libmpdemux/demux_nut.c
SRCS_COMMON-$(LIBPOSTPROC) += libmpcodecs/vf_pp.c
SRCS_COMMON-$(LIBSMBCLIENT) += stream/stream_smb.c
SRCS_COMMON-$(LIBTHEORA) += libmpcodecs/vd_theora.c
@ -536,6 +535,7 @@ SRCS_MPLAYER-$(DXR2) += libao2/ao_dxr2.c libvo/vo_dxr2.c
SRCS_MPLAYER-$(DXR3) += libvo/vo_dxr3.c
SRCS_MPLAYER-$(ESD) += libao2/ao_esd.c
SRCS_MPLAYER-$(FBDEV) += libvo/vo_fbdev.c libvo/vo_fbdev2.c
SRCS_MPLAYER-$(FFMPEG) += libvo/vo_png.c
SRCS_MPLAYER-$(GGI) += libvo/vo_ggi.c
SRCS_MPLAYER-$(GIF) += libvo/vo_gif89a.c
SRCS_MPLAYER-$(GL) += libvo/gl_common.c libvo/vo_gl.c \
@ -551,7 +551,6 @@ SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
SRCS_MPLAYER-$(KAI) += libao2/ao_kai.c
SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
SRCS_MPLAYER-$(LIBAVCODEC) += libvo/vo_png.c
SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
libmenu/menu_chapsel.c \
libmenu/menu_cmdlist.c \

View File

@ -27,11 +27,8 @@
#include "mp_msg.h"
#include <libavutil/log.h>
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
#include <libavcodec/avcodec.h>
#endif
#ifdef CONFIG_LIBAVFORMAT
#include <libavformat/avformat.h>
#endif
@ -55,7 +52,7 @@ static int extract_msg_type_from_ctx(void *ptr)
AVClass *avc = *(AVClass **)ptr;
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
if (!strcmp(avc->class_name, "AVCodecContext")) {
AVCodecContext *s = ptr;
if (s->codec) {
@ -73,7 +70,7 @@ static int extract_msg_type_from_ctx(void *ptr)
}
#endif
#ifdef CONFIG_LIBAVFORMAT
#ifdef CONFIG_FFMPEG
if (!strcmp(avc->class_name, "AVFormatContext")) {
AVFormatContext *s = ptr;
if (s->iformat)

View File

@ -600,11 +600,9 @@ const m_option_t common_opts[] = {
{"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
{"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
// postprocessing:
#ifdef CONFIG_LIBAVCODEC
// postprocessing:
#ifdef CONFIG_FFMPEG
{"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
#endif
#ifdef CONFIG_LIBPOSTPROC
{"pphelp", &pp_help, CONF_TYPE_PRINT_INDIRECT, CONF_NOCFG, 0, 0, NULL},
#endif
@ -631,10 +629,8 @@ const m_option_t common_opts[] = {
OPT_FLAG_OFF("noslices", vd_use_slices, 0),
{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
{"lavdopts", (void *) lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
#endif
#ifdef CONFIG_LIBAVFORMAT
{"lavfdopts", (void *) lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
#endif
#ifdef CONFIG_XVID4

196
configure vendored
View File

@ -335,11 +335,8 @@ Codecs:
--disable-xvid disable Xvid [autodetect]
--disable-x264 disable x264 [autodetect]
--disable-libnut disable libnut [autodetect]
--disable-libavutil disable libavutil [autodetect]
--disable-libavcodec disable libavcodec [autodetect]
--disable-libavformat disable libavformat [autodetect]
--disable-libpostproc disable libpostproc [autodetect]
--disable-libswscale disable libswscale [autodetect]
--disable-ffmpeg_a disable static FFmpeg [autodetect]
--disable-ffmpeg_so disable shared FFmpeg [autodetect]
--disable-tremor-internal disable internal Tremor [enabled]
--enable-tremor-low enable lower accuracy internal Tremor [disabled]
--enable-tremor enable external Tremor [autodetect]
@ -550,13 +547,8 @@ _yasm=yasm
_runtime_cpudetection=no
_cross_compile=auto
_prefix="/usr/local"
_libavutil=auto
_libavcodec=auto
_libavformat=auto
_libpostproc=auto
_libswscale=auto
_libavcodec_internals=no
_libswscale_internals=no
ffmpeg=auto
ffmpeg_internals=no
_mencoder=no
_mplayer=yes
_x11=auto
@ -1109,16 +1101,8 @@ for ac_option do
--disable-x264) _x264=no ;;
--enable-libnut) _libnut=yes ;;
--disable-libnut) _libnut=no ;;
--enable-libavutil) _libavutil=yes ;;
--disable-libavutil) _libavutil=no ;;
--enable-libavcodec) _libavcodec=yes ;;
--disable-libavcodec) _libavcodec=no ;;
--enable-libavformat) _libavformat=yes ;;
--disable-libavformat) _libavformat=no ;;
--enable-libpostproc) _libpostproc=yes ;;
--disable-libpostproc) _libpostproc=no ;;
--enable-libswscale) _libswscale=yes ;;
--disable-libswscale) _libswscale=no ;;
--enable-ffmpeg) ffmpeg=yes ;;
--disable-ffmpeg) ffmpeg=no ;;
--ffmpeg-source-dir=*)
_ffmpeg_source=$(echo $ac_option | cut -d '=' -f 2 ) ;;
@ -6870,129 +6854,38 @@ fi
echores "$_live"
echocheck "FFmpeg libavutil"
if test "$_libavutil" = auto ; then
_libavutil=no
cat > $TMPC << EOF
#include <libavutil/common.h>
int main(void) { av_clip(1, 1, 1); return 0; }
EOF
if $_pkg_config --exists libavutil ; then
_inc_libavutil=$($_pkg_config --cflags libavutil)
_ld_tmp=$($_pkg_config --libs libavutil)
cc_check $_inc_libavutil $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" extra_cflags="$extra_cflags $_inc_libavutil" \
&& _libavutil=yes
elif cc_check -lavutil $_ld_lm ; then
extra_ldflags="$extra_ldflags -lavutil"
_libavutil=yes
fi
fi
def_libavutil='#undef CONFIG_LIBAVUTIL'
test "$_libavutil" = yes && def_libavutil='#define CONFIG_LIBAVUTIL 1'
# libavutil is not available, but it is mandatory ...
if test "$_libavutil" = no ; then
die "You need libavutil, MPlayer will not compile without!"
fi
echores "$_libavutil"
echocheck "FFmpeg libavcodec"
if test "$_libavcodec" = auto ; then
_libavcodec=no
cat > $TMPC << EOF
#include <libavcodec/avcodec.h>
int main(void) { avcodec_find_encoder_by_name(""); return 0; }
EOF
if $_pkg_config --exists libavcodec ; then
_inc_libavcodec=$($_pkg_config --cflags libavcodec)
_ld_tmp=$($_pkg_config --libs libavcodec)
cc_check $_inc_libavcodec $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_libavcodec" \
&& _libavcodec=yes
elif cc_check -lavcodec $_ld_lm ; then
extra_ldflags="$extra_ldflags -lavcodec"
_libavcodec=yes
all_ffmpeg_libs="libavutil libavcodec libavformat libswscale libpostproc"
echocheck "FFmpeg ($all_ffmpeg_libs)"
if test "$ffmpeg" = auto ; then
ffmpeg=no
if $_pkg_config --exists $all_ffmpeg_libs ; then
inc_ffmpeg=$($_pkg_config --cflags $all_ffmpeg_libs)
_ld_tmp=$($_pkg_config --libs $all_ffmpeg_libs)
extra_ldflags="$extra_ldflags $_ld_tmp"
extra_cflags="$extra_cflags $inc_ffmpeg"
ffmpeg=yes
elif header_check libavcore/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
ffmpeg=yes
fi
fi
def_libavcodec='#undef CONFIG_LIBAVCODEC'
test "$_libavcodec" = yes && def_libavcodec='#define CONFIG_LIBAVCODEC 1'
if test "$_libavcodec" = yes ; then
codecmodules="libavcodec $codecmodules"
if test "$ffmpeg" = yes; then
def_ffmpeg='#define CONFIG_FFMPEG 1'
codecmodules="ffmpeg $codecmodules"
else
nocodecmodules="libavcodec $nocodecmodules"
def_ffmpeg='#undef CONFIG_FFMPEG'
nocodecmodules="ffmpeg $nocodecmodules"
fi
echores "$_libavcodec"
echores "$ffmpeg"
echocheck "FFmpeg libavformat"
if test "$_libavformat" = auto ; then
_libavformat=no
cat > $TMPC <<EOF
#include <libavformat/avformat.h>
int main(void) { av_alloc_format_context(); return 0; }
EOF
if $_pkg_config --exists libavformat ; then
_inc_libavformat=$($_pkg_config --cflags libavformat)
_ld_tmp=$($_pkg_config --libs libavformat)
cc_check $_inc_libavformat $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_libavformat" \
&& _libavformat=yes
elif cc_check $_ld_lm -lavformat ; then
extra_ldflags="$extra_ldflags -lavformat"
_libavformat=yes
fi
fi
def_libavformat='#undef CONFIG_LIBAVFORMAT'
test "$_libavformat" = yes && def_libavformat='#define CONFIG_LIBAVFORMAT 1'
echores "$_libavformat"
echocheck "FFmpeg libpostproc"
if test "$_libpostproc" = auto ; then
_libpostproc=no
cat > $TMPC << EOF
#include <libpostproc/postprocess.h>
int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
EOF
if $_pkg_config --exists libpostproc ; then
_inc_libpostproc=$($_pkg_config --cflags libpostproc)
_ld_tmp=$($_pkg_config --libs libpostproc)
cc_check $_inc_libpostproc $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_libpostproc" \
&& _libpostproc=yes
elif cc_check -lpostproc $_ld_lm ; then
extra_ldflags="$extra_ldflags -lpostproc"
_libpostproc=yes
fi
fi
def_libpostproc='#undef CONFIG_LIBPOSTPROC'
test "$_libpostproc" = yes && def_libpostproc='#define CONFIG_LIBPOSTPROC 1'
echores "$_libpostproc"
echocheck "FFmpeg libswscale"
if test "$_libswscale" = auto ; then
_libswscale=no
cat > $TMPC << EOF
#include <libswscale/swscale.h>
int main(void) { sws_scale(0, 0, 0, 0, 0, 0, 0); return 0; }
EOF
if $_pkg_config --exists libswscale ; then
_inc_libswscale=$($_pkg_config --cflags libswscale)
_ld_tmp=$($_pkg_config --libs libswscale)
cc_check $_inc_libswscale $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" extra_cflags="$extra_cflags $_inc_libswscale" \
&& _libswscale=yes
elif cc_check -lswscale ; then
extra_ldflags="$extra_ldflags -lswscale"
_libswscale=yes
fi
fi
def_libswscale='#undef CONFIG_LIBSWSCALE'
test "$_libswscale" = yes && def_libswscale='#define CONFIG_LIBSWSCALE 1'
echores "$_libswscale"
def_libswscale_internals="#undef CONFIG_LIBSWSCALE_INTERNALS"
def_ffmpeg_internals="#undef CONFIG_FFMPEG_INTERNALS"
if ! test -z "$_ffmpeg_source" ; then
test "$_libswscale" = yes && def_libswscale_internals="#define CONFIG_LIBSWSCALE_INTERNALS 1" && _libswscale_internals=yes
test "$ffmpeg" = yes && def_ffmpeg_internals="#define CONFIG_FFMPEG_INTERNALS 1" && ffmpeg_internals=yes
fi
def_libavcodec_internals="#undef CONFIG_LIBAVCODEC_INTERNALS"
if ! test -z "$_ffmpeg_source" ; then
test "$_libavcodec" = yes && def_libavcodec_internals="#define CONFIG_LIBAVCODEC_INTERNALS 1" && _libavcodec_internals=yes
fi
echocheck "libdv-0.9.5+"
if test "$_libdv" = auto ; then
@ -7079,7 +6972,7 @@ else
fi
echores "$_libnut"
# These VO checks must be done after libavcodec/libswscale one
# These VO checks must be done after the FFmpeg one
echocheck "/dev/mga_vid"
if test "$_mga" = auto ; then
_mga=no
@ -7120,11 +7013,11 @@ if test "$_zr" = auto ; then
fi
fi
if test "$_zr" = yes ; then
if test "$_libavcodec_internals" = yes ; then
if test "$ffmpeg_internals" = yes ; then
def_zr='#define CONFIG_ZR 1'
vomodules="zr zr2 $vomodules"
else
res_comment="libavcodec internal headers are required by zr, sorry"
res_comment="FFmpeg internal headers are required by zr, sorry"
novomodules="zr $novomodules"
def_zr='#undef CONFIG_ZR'
fi
@ -7967,13 +7860,8 @@ YUV4MPEG = $_yuv4mpeg
ZR = $_zr
# FFmpeg
LIBAVUTIL = $_libavutil
LIBAVCODEC = $_libavcodec
LIBAVFORMAT = $_libavformat
LIBPOSTPROC = $_libpostproc
LIBSWSCALE = $_libswscale
LIBAVCODEC_INTERNALS = $_libavcodec_internals
LIBSWSCALE_INTERNALS = $_libswscale_internals
FFMPEG = $ffmpeg
FFMPEG_INTERNALS = $ffmpeg_internals
FFMPEG_SOURCE_PATH = $_ffmpeg_source
RANLIB = $_ranlib
@ -8385,13 +8273,8 @@ $def_zr
/* FFmpeg */
$def_libavcodec
$def_libavformat
$def_libavutil
$def_libpostproc
$def_libswscale
$def_libavcodec_internals
$def_libswscale_internals
$def_ffmpeg
$def_ffmpeg_internals
#define CONFIG_DECODERS 1
#define CONFIG_ENCODERS 1
@ -8460,13 +8343,6 @@ $def_yasm
#define HAVE_EBP_AVAILABLE 0
#endif
#define CONFIG_H263_VAAPI_HWACCEL 0
#define CONFIG_MPEG2_VAAPI_HWACCEL 0
#define CONFIG_MPEG4_VAAPI_HWACCEL 0
#define CONFIG_H264_VAAPI_HWACCEL 0
#define CONFIG_VC1_VAAPI_HWACCEL 0
#define CONFIG_WMV3_VAAPI_HWACCEL 0
#endif /* MPLAYER_CONFIG_H */
EOF

View File

@ -70,7 +70,7 @@ static af_info_t* filter_list[]={
#endif
&af_info_volnorm,
&af_info_extrastereo,
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
&af_info_lavcac3enc,
&af_info_lavcresample,
#endif
@ -468,7 +468,7 @@ int af_init(af_stream_t* s)
&(s->output.rate));
if (!af) {
char *resampler = "resample";
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
if ((AF_INIT_TYPE_MASK & s->cfg.force) == AF_INIT_SLOW)
resampler = "lavcresample";
#endif
@ -492,7 +492,7 @@ int af_init(af_stream_t* s)
if ((AF_INIT_TYPE_MASK & s->cfg.force) == AF_INIT_FAST) {
char args[32];
sprintf(args, "%d", s->output.rate);
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
if (strcmp(resampler, "lavcresample") == 0)
strcat(args, ":1");
else

View File

@ -71,7 +71,7 @@ const ad_functions_t * const mpcodecs_ad_drivers[] =
#endif
&mpcodecs_ad_hwac3,
&mpcodecs_ad_hwmpa,
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
&mpcodecs_ad_ffmpeg,
#endif
&mpcodecs_ad_pcm,

View File

@ -65,7 +65,7 @@ extern const vd_functions_t mpcodecs_vd_qtvideo;
const vd_functions_t * const mpcodecs_vd_drivers[] = {
&mpcodecs_vd_null,
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
&mpcodecs_vd_ffmpeg,
#endif
#ifdef CONFIG_OGGTHEORA

View File

@ -126,9 +126,6 @@ static const vf_info_t* const filter_list[]={
#endif
&vf_info_crop,
&vf_info_expand,
#ifdef CONFIG_LIBPOSTPROC
&vf_info_pp,
#endif
&vf_info_scale,
// &vf_info_osd,
&vf_info_vo,
@ -139,7 +136,8 @@ static const vf_info_t* const filter_list[]={
&vf_info_mirror,
&vf_info_palette,
&vf_info_pp7,
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
&vf_info_pp,
&vf_info_lavc,
&vf_info_lavcdeint,
&vf_info_screenshot,
@ -188,7 +186,7 @@ static const vf_info_t* const filter_list[]={
&vf_info_delogo,
&vf_info_remove_logo,
&vf_info_hue,
#ifdef CONFIG_LIBAVCODEC_INTERNALS
#ifdef CONFIG_FFMPEG_INTERNALS
&vf_info_spp,
&vf_info_fspp,
&vf_info_qp,

View File

@ -120,7 +120,7 @@ int rtsp_transport_http = 0;
#endif
extern int rtsp_port;
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
extern AVCodecContext *avcctx;
#endif
@ -399,7 +399,7 @@ extern "C" void demux_close_rtp(demuxer_t* demuxer) {
delete rtpState->videoBufferQueue;
delete[] rtpState->sdpDescription;
delete rtpState;
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
av_freep(&avcctx);
#endif
@ -537,7 +537,7 @@ static demux_packet_t* getBuffer(demuxer_t* demuxer, demux_stream_t* ds,
if (dp == NULL) return NULL;
}
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
extern AVCodecParserContext * h264parserctx;
int consumed, poutbuf_size = 1;
const uint8_t *poutbuf = NULL;
@ -568,7 +568,7 @@ static demux_packet_t* getBuffer(demuxer_t* demuxer, demux_stream_t* ds,
if (headersize == 1) // amr
dp->buffer[0] =
((AMRAudioSource*)bufferQueue->readSource())->lastFrameHeader();
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
} else {
bufferQueue->dp = dp = bufferQueue->nextpacket;
bufferQueue->nextpacket = NULL;

View File

@ -27,7 +27,7 @@ extern "C" {
#include "libavutil/base64.h"
}
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
AVCodecParserContext * h264parserctx;
AVCodecContext *avcctx;
#endif
@ -134,7 +134,7 @@ void rtpCodecInitialize_video(demuxer_t* demuxer,
unsigned char* configData
= parseH264ConfigStr(subsession->fmtp_spropparametersets(), configLen);
sh_video->bih = bih = insertVideoExtradata(bih, configData, configLen);
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
int fooLen;
const uint8_t* fooData;
avcodec_register_all();

View File

@ -23,7 +23,7 @@
extern "C" {
#include "demuxer.h"
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
#include "libavcodec/avcodec.h"
#endif
}

View File

@ -45,7 +45,7 @@
#include "ass_mp.h"
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
#include "libavcodec/avcodec.h"
#if MP_INPUT_BUFFER_PADDING_SIZE < FF_INPUT_BUFFER_PADDING_SIZE
#error MP_INPUT_BUFFER_PADDING_SIZE is too small!
@ -116,7 +116,7 @@ const demuxer_desc_t *const demuxer_list[] = {
&demuxer_desc_tv,
#endif
&demuxer_desc_mf,
#ifdef CONFIG_LIBAVFORMAT
#ifdef CONFIG_FFMPEG
&demuxer_desc_lavf_preferred,
#endif
&demuxer_desc_avi,
@ -159,7 +159,7 @@ const demuxer_desc_t *const demuxer_list[] = {
#ifdef CONFIG_LIBNEMESI
&demuxer_desc_rtp_nemesi,
#endif
#ifdef CONFIG_LIBAVFORMAT
#ifdef CONFIG_FFMPEG
&demuxer_desc_lavf,
#endif
#ifdef CONFIG_MUSEPACK
@ -307,7 +307,7 @@ static void free_sh_sub(sh_sub_t *sh)
ass_free_track(sh->ass_track);
#endif
free(sh->lang);
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
clear_parser((sh_common_t *)sh);
#endif
free(sh);
@ -346,7 +346,7 @@ void free_sh_audio(demuxer_t *demuxer, int id)
free(sh->wf);
free(sh->codecdata);
free(sh->lang);
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
clear_parser((sh_common_t *)sh);
#endif
free(sh);
@ -378,7 +378,7 @@ void free_sh_video(sh_video_t *sh)
{
mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUXER: freeing sh_video at %p\n", sh);
free(sh->bih);
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
clear_parser((sh_common_t *)sh);
#endif
free(sh);
@ -436,7 +436,7 @@ static void ds_add_packet_internal(demux_stream_t *ds, demux_packet_t *dp)
ds->demuxer->video->packs);
}
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
static void allocate_parser(AVCodecContext **avctx, AVCodecParserContext **parser, unsigned format)
{
enum CodecID codec_id = CODEC_ID_NONE;
@ -532,7 +532,7 @@ void ds_clear_parser(demux_stream_t *ds)
void ds_add_packet(demux_stream_t *ds, demux_packet_t *dp)
{
#if PARSE_ON_ADD && defined(CONFIG_LIBAVCODEC)
#if PARSE_ON_ADD && defined(CONFIG_FFMPEG)
int len = dp->len;
int pos = 0;
while (len > 0) {
@ -666,7 +666,7 @@ int ds_fill_buffer(demux_stream_t *ds)
break;
}
if (!demux_fill_buffer(demux, ds)) {
#if PARSE_ON_ADD && defined(CONFIG_LIBAVCODEC)
#if PARSE_ON_ADD && defined(CONFIG_FFMPEG)
uint8_t *parsed_start = NULL;
int parsed_len = 0;
ds_parse(ds->sh, &parsed_start, &parsed_len, MP_NOPTS_VALUE, 0);

View File

@ -261,7 +261,7 @@ const struct vo_driver *video_out_drivers[] =
#ifdef CONFIG_YUV4MPEG
&video_out_yuv4mpeg,
#endif
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
&video_out_png,
#endif
#ifdef CONFIG_JPEG

View File

@ -115,7 +115,7 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
spudec_reset(vo_spudec);
vo_osd_changed(OSDTYPE_SPU);
}
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
if (is_av_sub(type))
reset_avsub(d_dvdsub->sh);
#endif
@ -203,7 +203,7 @@ void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts,
double endpts = d_dvdsub->first->endpts + sub_offset;
len = ds_get_packet_sub(d_dvdsub, &packet);
if (is_av_sub(type)) {
#ifdef CONFIG_LIBAVCODEC
#ifdef CONFIG_FFMPEG
type = decode_avsub(d_dvdsub->sh, &packet, &len, &subpts, &endpts);
if (type <= 0)
#endif

View File

@ -66,7 +66,7 @@ int network_ipv4_only_proxy = 0;
const mime_struct_t mime_type_table[] = {
#ifdef CONFIG_LIBAVFORMAT
#ifdef CONFIG_FFMPEG
// Flash Video
{ "video/x-flv", DEMUXER_TYPE_LAVF_PREFERRED},
// do not force any demuxer in this case!

View File

@ -137,7 +137,7 @@ static const stream_info_t* const auto_open_streams[] = {
#ifdef CONFIG_LIBBLURAY
&stream_info_bluray,
#endif
#ifdef CONFIG_LIBAVFORMAT
#ifdef CONFIG_FFMPEG
&stream_info_ffmpeg,
#endif