Always build in h264 support.

This commit is contained in:
Themaister 2012-08-16 09:25:13 +02:00
parent 979e45ea66
commit 70fd5350dc
6 changed files with 4 additions and 28 deletions

View File

@ -166,7 +166,6 @@ ifeq ($(HAVE_FFMPEG), 1)
DEFINES += -DHAVE_FFMPEG_AVIO_OPEN
DEFINES += -DHAVE_FFMPEG_AVFORMAT_WRITE_HEADER
DEFINES += -DHAVE_FFMPEG_AVFORMAT_NEW_STREAM
DEFINES += -DHAVE_X264RGB
OBJ += record/ffemu.o
endif

View File

@ -134,12 +134,6 @@ static const bool _ffmpeg_supp = true;
static const bool _ffmpeg_supp = false;
#endif
#ifdef HAVE_X264RGB
static const bool _x264rgb_supp = true;
#else
static const bool _x264rgb_supp = false;
#endif
#ifdef HAVE_CONFIGFILE
static const bool _configfile_supp = true;
#else

View File

@ -120,10 +120,6 @@ if [ "$HAVE_THREADS" != 'no' ]; then
check_lib FFMPEG_AVFORMAT_NEW_STREAM "$AVFORMAT_LIBS" avformat_new_stream
check_lib FFMPEG_AVCODEC_ENCODE_VIDEO2 "$AVCODEC_LIBS" avcodec_encode_video2
fi
if [ "$HAVE_FFMPEG" = 'no' ] && [ "$HAVE_X264RGB" = 'yes' ]; then
echo "x264 RGB recording is enabled, but FFmpeg is not. --enable-x264rgb will not have any effect."
fi
else
echo "Not building with threading support. Will skip FFmpeg."
HAVE_FFMPEG='no'
@ -148,6 +144,6 @@ check_pkgconf PYTHON python3
add_define_make OS "$OS"
# Creates config.mk and config.h.
VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE CONFIGFILE FREETYPE XVIDEO X11 XEXT NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 X264RGB SINC FIXED_POINT BSV_MOVIE RPI"
VARS="ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO PULSE SDL OPENGL DYLIB GETOPT_LONG THREADS CG XML SDL_IMAGE LIBPNG DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE CONFIGFILE FREETYPE XVIDEO X11 XEXT NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 SINC FIXED_POINT BSV_MOVIE RPI"
create_config_make config.mk $VARS
create_config_header config.h $VARS

View File

@ -2,7 +2,6 @@ HAVE_DYNAMIC=yes # Disable dynamic loading of libretro library
HAVE_LIBRETRO= # libretro library used
HAVE_THREADS=auto # Threading support
HAVE_FFMPEG=auto # Enable FFmpeg recording support
HAVE_X264RGB=no # Enable lossless X264 RGB recording
HAVE_DYLIB=auto # Enable dynamic loading support
HAVE_NETPLAY=auto # Enable netplay support
HAVE_CONFIGFILE=yes # Disable support for config file

View File

@ -154,7 +154,6 @@ static bool ffemu_init_audio(struct ff_audio_info *audio, struct ffemu_params *p
static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_params *param)
{
#ifdef HAVE_X264RGB
AVCodec *codec = NULL;
if (g_settings.video.h264_record)
{
@ -165,9 +164,7 @@ static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_par
}
else
codec = avcodec_find_encoder_by_name("ffv1");
#else
AVCodec *codec = avcodec_find_encoder_by_name("ffv1");
#endif
if (!codec)
return false;
@ -185,11 +182,7 @@ static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_par
video->pix_size = sizeof(uint32_t);
}
#ifdef HAVE_X264RGB
video->pix_fmt = g_settings.video.h264_record ? PIX_FMT_BGR24 : PIX_FMT_RGB32;
#else
video->pix_fmt = PIX_FMT_RGB32;
#endif
#ifdef HAVE_FFMPEG_ALLOC_CONTEXT3
video->codec = avcodec_alloc_context3(codec);
@ -208,7 +201,6 @@ static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_par
AVDictionary *opts = NULL;
#endif
#ifdef HAVE_X264RGB
if (g_settings.video.h264_record)
{
video->codec->thread_count = 3;
@ -216,9 +208,6 @@ static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_par
}
else
video->codec->thread_count = 2;
#else
video->codec->thread_count = 2;
#endif
#ifdef HAVE_FFMPEG_AVCODEC_OPEN2
if (avcodec_open2(video->codec, codec, &opts) != 0)
@ -298,10 +287,10 @@ static bool ffemu_init_muxer(ffemu_t *handle)
handle->audio.codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
handle->muxer.astream = stream;
#ifdef HAVE_X264RGB // Avoids a warning at end about non-monotonically increasing DTS values. It seems to be harmless to disable this.
// Avoids a warning at end about non-monotonically increasing DTS values.
// It seems to be harmless to disable this.
if (g_settings.video.h264_record)
ctx->oformat->flags |= AVFMT_TS_NONSTRICT;
#endif
av_dict_set(&ctx->metadata, "title", "RetroArch video dump", 0);

View File

@ -506,7 +506,6 @@ static void print_features(void)
_PSUPP(fbo, "FBO", "OpenGL render-to-texture (multi-pass shaders)");
_PSUPP(dynamic, "Dynamic", "Dynamic run-time loading of libretro library");
_PSUPP(ffmpeg, "FFmpeg", "On-the-fly recording of gameplay with libavcodec");
_PSUPP(x264rgb, "x264 RGB", "x264 lossless RGB recording for FFmpeg");
_PSUPP(configfile, "Config file", "Configuration file support");
_PSUPP(freetype, "FreeType", "TTF font rendering with FreeType");
_PSUPP(netplay, "Netplay", "Peer-to-peer netplay");