Commit 3877e3d8 authored by Josh de Kock's avatar Josh de Kock

lavd: Add SDL2 output device

Acked-by: Michael Niedermayer
Signed-off-by: 's avatarJosh de Kock <josh@itanimul.li>
parent c29b532a
......@@ -32,6 +32,7 @@ version <next>:
- TrueHD encoder
- Meridian Lossless Packing (MLP) encoder
- Non-Local Means (nlmeans) denoising filter
- sdl2 output device
version 3.1:
......
......@@ -292,6 +292,7 @@ External library support:
--disable-schannel disable SChannel SSP, needed for TLS support on
Windows if openssl and gnutls are not used [autodetect]
--disable-sdl disable sdl [autodetect]
--disable-sdl2 disable sdl2 [autodetect]
--disable-securetransport disable Secure Transport, needed for TLS support
on OSX if openssl and gnutls are not used [autodetect]
--enable-x11grab enable X11 grabbing (legacy) [no]
......@@ -1548,6 +1549,7 @@ EXTERNAL_LIBRARY_LIST="
openssl
schannel
sdl
sdl2
securetransport
videotoolbox
x11grab
......@@ -2022,6 +2024,7 @@ HAVE_LIST="
perl
pod2man
sdl
sdl2
section_data_rel_ro
texi2html
threads
......@@ -2948,6 +2951,7 @@ pulse_outdev_deps="libpulse"
qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore"
qtkit_indev_select="qtkit"
sdl_outdev_deps="sdl"
sdl2_outdev_deps="sdl2"
sndio_indev_deps="sndio_h"
sndio_outdev_deps="sndio_h"
v4l_indev_deps="linux_videodev_h"
......@@ -5846,7 +5850,28 @@ if enabled gcrypt; then
fi
fi
if ! disabled sdl; then
if ! disabled sdl2 && ! enabled sdl; then
SDL2_CONFIG="${cross_prefix}sdl2-config"
if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
check_func SDL_Init $sdl2_libs $sdl2_cflags && enable sdl2
else
if "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
sdl2_libs=$("${SDL2_CONFIG}" --libs)
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
check_func SDL_Init $sdl2_libs $sdl2_cflags && enable sdl2
fi
fi
if test $target_os = "mingw32"; then
sdl2_libs="$sdl2_libs -mconsole"
fi
fi
enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs
if ! disabled sdl && ! enabled sdl2; then
SDL_CONFIG="${cross_prefix}sdl-config"
if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
......@@ -6476,6 +6501,7 @@ echo "network support ${network-no}"
echo "threading support ${thread_type-no}"
echo "safe bitstream reader ${safe_bitstream_reader-no}"
echo "SDL support ${sdl-no}"
echo "SDL2 support ${sdl2-no}"
echo "opencl enabled ${opencl-no}"
echo "JNI support ${jni-no}"
echo "texi2html enabled ${texi2html-no}"
......
......@@ -41,6 +41,7 @@ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \
pulse_audio_common.o
OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o
OBJS-$(CONFIG_SDL_OUTDEV) += sdl.o
OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o
OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o
OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o
OBJS-$(CONFIG_V4L2_INDEV) += v4l2.o v4l2-common.o timefilter.o
......
......@@ -64,6 +64,7 @@ void avdevice_register_all(void)
REGISTER_INOUTDEV(PULSE, pulse);
REGISTER_INDEV (QTKIT, qtkit);
REGISTER_OUTDEV (SDL, sdl);
REGISTER_OUTDEV (SDL2, sdl2);
REGISTER_INOUTDEV(SNDIO, sndio);
REGISTER_INOUTDEV(V4L2, v4l2);
// REGISTER_INDEV (V4L, v4l
......
This diff is collapsed.
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