[FFmpeg-devel] [PATCH v3 2/3] lavd: deprecate SDL device

Josh de Kock josh at itanimul.li
Sun Sep 11 21:54:57 EEST 2016


SDL1 has been unmaintained for quite a while (version 1.2.15 was
released 4 years ago). Due to how SDL2 works (it requires the main
thread), there won't be able to be a replacement to the SDL
avdevice if FFmpeg were to switch to SDL2 in the future. This
commit would also help in getting ffplay to switch to SDL2 as
there'd no longer be a dependency on the SDL avdevice.

Signed-off-by: Josh de Kock <josh at itanimul.li>
---
 Changelog         | 1 +
 doc/outdevs.texi  | 2 ++
 libavdevice/sdl.c | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/Changelog b/Changelog
index 64695c8..f609a86 100644
--- a/Changelog
+++ b/Changelog
@@ -27,6 +27,7 @@ version <next>:
 - weave filter
 - gblur filter
 - avgblur filter
+- deprecated sdl outdev
 
 
 version 3.1:
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index e68653f..cfcc176 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -320,6 +320,8 @@ ffmpeg  -i INPUT -f pulse "stream name"
 
 SDL (Simple DirectMedia Layer) output device.
 
+This device is deprecated and will be removed in a future release.
+
 This output device allows one to show a video stream in an SDL
 window. Only one SDL window is allowed per application, so you can
 have only one instance of this output device in an application.
diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c
index 4322750..06ef35c 100644
--- a/libavdevice/sdl.c
+++ b/libavdevice/sdl.c
@@ -237,6 +237,8 @@ static int sdl_write_header(AVFormatContext *s)
     AVCodecParameters *par = st->codecpar;
     int i, ret;
 
+    av_log(s, AV_LOG_WARNING, "The SDL output device is deprecated.\n");
+
     if (!sdl->window_title)
         sdl->window_title = av_strdup(s->filename);
     if (!sdl->icon_title)
-- 
2.7.4 (Apple Git-66)



More information about the ffmpeg-devel mailing list