mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 10:20:51 +00:00
Merge pull request #9810 from hasenbanck/ffmpeg-version
ffmpeg core prints out the ffmpeg library version
This commit is contained in:
commit
52fe3d2c7d
@ -23,7 +23,6 @@ extern "C" {
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libavutil/time.h>
|
||||
#include <libavutil/opt.h>
|
||||
#include <libavdevice/avdevice.h>
|
||||
#ifdef HAVE_SWRESAMPLE
|
||||
#include <libswresample/swresample.h>
|
||||
#endif
|
||||
@ -60,6 +59,11 @@ extern "C" {
|
||||
#define PIX_FMT_RGB32 AV_PIX_FMT_RGB32
|
||||
#endif
|
||||
|
||||
#define PRINT_VERSION(s) log_cb(RETRO_LOG_INFO, "[FFMPEG] lib%s version:\t%d.%d.%d\n", #s, \
|
||||
s ##_version() >> 16 & 0xFF, \
|
||||
s ##_version() >> 8 & 0xFF, \
|
||||
s ##_version() & 0xFF);
|
||||
|
||||
static bool reset_triggered;
|
||||
static void fallback_log(enum retro_log_level level, const char *fmt, ...)
|
||||
{
|
||||
@ -329,6 +333,15 @@ void CORE_PREFIX(retro_reset)(void)
|
||||
reset_triggered = true;
|
||||
}
|
||||
|
||||
static void print_ffmpeg_version()
|
||||
{
|
||||
PRINT_VERSION(avformat)
|
||||
PRINT_VERSION(avcodec)
|
||||
PRINT_VERSION(avutil)
|
||||
PRINT_VERSION(swresample)
|
||||
PRINT_VERSION(swscale)
|
||||
}
|
||||
|
||||
static void check_variables(bool firststart)
|
||||
{
|
||||
struct retro_variable hw_var = {0};
|
||||
@ -1804,6 +1817,8 @@ bool CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
|
||||
goto error;
|
||||
}
|
||||
|
||||
print_ffmpeg_version();
|
||||
|
||||
if ((ret = avformat_find_stream_info(fctx, NULL)) < 0)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "[FFMPEG] Failed to find stream info: %s\n", av_err2str(ret));
|
||||
|
Loading…
x
Reference in New Issue
Block a user