diff mbox

[FFmpeg-devel] lavd: deprecate SDL device

Message ID 1473537201-14503-1-git-send-email-josh@itanimul.li
State Superseded
Headers show

Commit Message

Josh Dekker Sept. 10, 2016, 7:53 p.m. UTC
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 ffplay 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@itanimul.li>
---
 configure         | 3 +++
 libavdevice/sdl.c | 2 ++
 2 files changed, 5 insertions(+)

Comments

Carl Eugen Hoyos Sept. 10, 2016, 8:05 p.m. UTC | #1
2016-09-10 21:53 GMT+02:00 Josh de Kock <josh@itanimul.li>:

> +if ! enabled sdl; then
> +    disable sdl_outdev
> +fi

This is not necessary:
You can remove the device anytime after deprecating it, no
need to disable it by default.

> +    av_log(s, AV_LOG_WARNING, "The SDL output device is deprecated.\n");

This is ok and sufficient.

Please also add a line to the documentation, add a line that it is deprecated,
feel free to also mention it in the Changelog.

Carl Eugen
Paul B Mahol Sept. 10, 2016, 8:08 p.m. UTC | #2
On 9/10/16, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2016-09-10 21:53 GMT+02:00 Josh de Kock <josh@itanimul.li>:
>
>> +if ! enabled sdl; then
>> +    disable sdl_outdev
>> +fi
>
> This is not necessary:
> You can remove the device anytime after deprecating it, no
> need to disable it by default.
>
>> +    av_log(s, AV_LOG_WARNING, "The SDL output device is deprecated.\n");
>
> This is ok and sufficient.
>
> Please also add a line to the documentation, add a line that it is
> deprecated,
> feel free to also mention it in the Changelog.
>

Why not port it to SDL2 ?
diff mbox

Patch

diff --git a/configure b/configure
index b11ca7f..48cce34 100755
--- a/configure
+++ b/configure
@@ -5850,6 +5850,9 @@  if enabled gcrypt; then
     fi
 fi
 
+if ! enabled sdl; then
+    disable sdl_outdev
+fi
 if ! disabled sdl; then
     SDL_CONFIG="${cross_prefix}sdl-config"
     if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
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)