Unified · Split
| @@ -408,7 +408,13 @@ ffmpeg -i INPUT -f pulse "stream name" · 407 unmodified lines | |||
| 408 | 408 | ||
| 409 | @section sdl | 409 | @section sdl |
| 410 | 410 | ||
| 411 | SDL (Simple DirectMedia Layer) output device. | 411 | SDL (Simple DirectMedia Layer) output device. Deprecated and will be removed. |
| 412 | |||
| 413 | For monitoring purposes in FFmpeg, pipes and a video player such as ffplay can be used: | ||
| 414 | |||
| 415 | @example | ||
| 416 | ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay - | ||
| 417 | @end example | ||
| 412 | 418 | ||
| 413 | "sdl2" can be used as alias for "sdl". | 419 | "sdl2" can be used as alias for "sdl". |
| 414 | 420 | ||
| @@ -51,6 +51,7 @@ typedef struct { · 50 unmodified lines | |||
| 51 | SDL_Rect texture_rect; | 51 | SDL_Rect texture_rect; |
| 52 | 52 | ||
| 53 | int inited; | 53 | int inited; |
| 54 | int warned; | ||
| 54 | } SDLContext; | 55 | } SDLContext; |
| 55 | 56 | ||
| 56 | static const struct sdl_texture_format_entry { | 57 | static const struct sdl_texture_format_entry { |
| @@ -165,6 +166,15 @@ static int sdl2_write_header(AVFormatContext *s) · 108 unmodified lines | |||
| 165 | int i, ret = 0; | 166 | int i, ret = 0; |
| 166 | int flags = 0; | 167 | int flags = 0; |
| 167 | 168 | ||
| 169 | if (!sdl->warned) { | ||
| 170 | av_log(sdl, AV_LOG_WARNING, | ||
| 171 | "The sdl output device is deprecated due to being fundamentally incompatible with libavformat API. " | ||
| 172 | "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n" | ||
| 173 | "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n" | ||
| 174 | ); | ||
| 175 | sdl->warned = 1; | ||
| 176 | } | ||
| 177 | |||
| 168 | if (!sdl->window_title) | 178 | if (!sdl->window_title) |
| 169 | sdl->window_title = av_strdup(s->url); | 179 | sdl->window_title = av_strdup(s->url); |
| 170 | 180 | ||
| @@ -37,5 +37,7 @@ · 36 unmodified lines | |||
| 37 | #define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) | 37 | #define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) |
| 38 | // reminder to remove the opengl device on next major bump | 38 | // reminder to remove the opengl device on next major bump |
| 39 | #define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) | 39 | #define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) |
| 40 | // reminder to remove the sdl2 device on next major bump | ||
| 41 | #define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) | ||
| 40 | 42 | ||
| 41 | #endif /* AVDEVICE_VERSION_MAJOR_H */ | 43 | #endif /* AVDEVICE_VERSION_MAJOR_H */ |