Patch to compile

This commit is contained in:
Alibek Omarov 2024-07-17 01:33:02 +03:00
parent d0912a019f
commit c0a3ef106b
7 changed files with 47 additions and 4 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
ffplay_standalone
*.kate-swp

View File

@ -30,7 +30,7 @@
references to libraries that are not being built. */
#include "config.h"
#include "compat/va_copy.h"
//#include "compat/va_copy.h"
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#include "libswscale/version.h"
@ -39,22 +39,26 @@
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/display.h"
#include "libavutil/getenv_utf8.h"
//#include "libavutil/getenv_utf8.h"
#include "libavutil/mathematics.h"
#include "libavutil/imgutils.h"
#include "libavutil/libm.h"
//#include "libavutil/libm.h"
#include "libavutil/parseutils.h"
#include "libavutil/eval.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "cmdutils.h"
#include "fopen_utf8.h"
//#include "fopen_utf8.h"
#include "opt_common.h"
#ifdef _WIN32
#include <windows.h>
#include "compat/w32dlfcn.h"
#endif
#define getenv_utf8 getenv
#define freeenv_utf8
#define fopen_utf8 fopen
AVDictionary *sws_dict;
AVDictionary *swr_opts;
AVDictionary *format_opts, *codec_opts;

14
compile.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
SDL2_FLAGS=$(sdl2-config --cflags --libs)
LAVU_FLAGS=$(pkg-config libavutil --cflags --libs)
LAVF_FLAGS=$(pkg-config libavformat --cflags --libs)
LAVC_FLAGS=$(pkg-config libavcodec --cflags --libs)
LAVFI_FLAGS=$(pkg-config libavfilter --cflags --libs)
LSWS_FLAGS=$(pkg-config libswscale --cflags --libs)
LSWR_FLAGS=$(pkg-config libswresample --cflags --libs)
LPP_FLAGS=$(pkg-config libpostproc --cflags --libs)
EXTRA_FLAGS=-lm
exec gcc *.c -Istubs ${SDL2_FLAGS} ${LAVU_FLAGS} ${LAVF_FLAGS} ${LAVC_FLAGS} ${LAVFI_FLAGS} ${LSWS_FLAGS} ${LSWR_FLAGS} ${LPP_FLAGS} ${EXTRA_FLAGS} -o ffplay_standalone

View File

@ -44,7 +44,9 @@
#include "libavutil/time.h"
#include "libavutil/bprint.h"
#include "libavformat/avformat.h"
#if CONFIG_AVDEVICE
#include "libavdevice/avdevice.h"
#endif
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"

View File

@ -48,8 +48,10 @@
#include "libavformat/avformat.h"
#include "libavformat/version.h"
#if CONFIG_AVDEVICE
#include "libavdevice/avdevice.h"
#include "libavdevice/version.h"
#endif
#include "libavfilter/avfilter.h"
#include "libavfilter/version.h"
@ -187,7 +189,9 @@ static void print_all_libs_info(int flags, int level)
PRINT_LIB_INFO(avutil, AVUTIL, flags, level);
PRINT_LIB_INFO(avcodec, AVCODEC, flags, level);
PRINT_LIB_INFO(avformat, AVFORMAT, flags, level);
#if CONFIG_AVDEVICE
PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level);
#endif
PRINT_LIB_INFO(avfilter, AVFILTER, flags, level);
PRINT_LIB_INFO(swscale, SWSCALE, flags, level);
PRINT_LIB_INFO(swresample, SWRESAMPLE, flags, level);

17
stubs/config.h Normal file
View File

@ -0,0 +1,17 @@
#define CONFIG_AVUTIL 1
#define CONFIG_AVCODEC 1
#define CONFIG_AVFORMAT 1
#define CONFIG_AVDEVICE 0
#define CONFIG_AVFILTER 1
#define CONFIG_SWSCALE 1
#define CONFIG_SWRESAMPLE 1
#define CONFIG_POSTPROC 1
#define FFMPEG_DATADIR NULL
#define CONFIG_THIS_YEAR 2024
#define FFMPEG_CONFIGURATION "N/A"
#define CC_IDENT "N/A"
#include <libavutil/opt.h>

View File