Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
@ 2024-02-04  9:02 J. Dekker
  2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 1/2] avdevice: remove sdl2 outdev J. Dekker
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: J. Dekker @ 2024-02-04  9:02 UTC (permalink / raw)
  To: ffmpeg-devel

With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
'main' thread. This means that both the SDL2 and OpenGL output device are broken
in master. Rather than attempting to fix it, they should be removed instead as
there are better alternatives for debugging or viewing streams.

The 'pipe:' output can be used with a real video player such as mpv, vlc, or
even ffplay. For cases where the user was an application using the API they
should supply their own renderer.

J. Dekker (2):
  avdevice: remove sdl2 outdev
  avdevice: remove OpenGL device

 MAINTAINERS              |    3 -
 configure                |   16 -
 doc/outdevs.texi         |  105 ---
 libavdevice/Makefile     |    2 -
 libavdevice/alldevices.c |    2 -
 libavdevice/opengl_enc.c | 1313 --------------------------------------
 libavdevice/sdl2.c       |  370 -----------
 7 files changed, 1811 deletions(-)
 delete mode 100644 libavdevice/opengl_enc.c
 delete mode 100644 libavdevice/sdl2.c

-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [FFmpeg-devel] [PATCH 1/2] avdevice: remove sdl2 outdev
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
@ 2024-02-04  9:02 ` J. Dekker
  2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 2/2] avdevice: remove OpenGL device J. Dekker
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: J. Dekker @ 2024-02-04  9:02 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: J. Dekker <jdek@itanimul.li>
---
 MAINTAINERS              |   2 -
 configure                |   3 +-
 doc/outdevs.texi         |  66 -------
 libavdevice/Makefile     |   1 -
 libavdevice/alldevices.c |   1 -
 libavdevice/sdl2.c       | 370 ---------------------------------------
 6 files changed, 1 insertion(+), 442 deletions(-)
 delete mode 100644 libavdevice/sdl2.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 4677931211..baead5d270 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -292,8 +292,6 @@ libavdevice
   libdc1394.c                           Roman Shaposhnik
   opengl_enc.c                          Lukasz Marek
   pulse_audio_enc.c                     Lukasz Marek
-  sdl                                   Stefano Sabatini
-  sdl2.c                                Josh de Kock
   v4l2.c                                Giorgio Vazzana
   vfwcap.c                              Ramiro Polla
   xv.c                                  Lukasz Marek
diff --git a/configure b/configure
index 68f675a4bc..c4eebab14f 100755
--- a/configure
+++ b/configure
@@ -3635,7 +3635,6 @@ oss_indev_deps_any="sys_soundcard_h"
 oss_outdev_deps_any="sys_soundcard_h"
 pulse_indev_deps="libpulse"
 pulse_outdev_deps="libpulse"
-sdl2_outdev_deps="sdl2"
 sndio_indev_deps="sndio"
 sndio_outdev_deps="sndio"
 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
@@ -7710,7 +7709,7 @@ enabled zoompan_filter      && prepend avfilter_deps "swscale"
 enabled lavfi_indev         && prepend avdevice_deps "avfilter"
 
 #FIXME
-enabled_any sdl2_outdev opengl_outdev && enabled sdl2 &&
+enabled_any opengl_outdev && enabled sdl2 &&
     add_cflags $(filter_out '-Dmain=SDL_main' $sdl2_cflags)
 
 enabled opus_decoder    && prepend avcodec_deps "swresample"
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index f0484bbf8f..d3b9199463 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -406,72 +406,6 @@ Play a file on default device on default server:
 ffmpeg  -i INPUT -f pulse "stream name"
 @end example
 
-@section sdl
-
-SDL (Simple DirectMedia Layer) output device.
-
-"sdl2" can be used as alias for "sdl".
-
-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.
-
-To enable this output device you need libsdl installed on your system
-when configuring your build.
-
-For more information about SDL, check:
-@url{http://www.libsdl.org/}
-
-@subsection Options
-
-@table @option
-
-@item window_borderless
-Set SDL window border off.
-Default value is 0 (enable window border).
-
-@item window_enable_quit
-Enable quit action (using window button or keyboard key)
-when non-zero value is provided.
-Default value is 1 (enable quit action).
-
-@item window_fullscreen
-Set fullscreen mode when non-zero value is provided.
-Default value is zero.
-
-@item window_size
-Set the SDL window size, can be a string of the form
-@var{width}x@var{height} or a video size abbreviation.
-If not specified it defaults to the size of the input video,
-downscaled according to the aspect ratio.
-
-@item window_title
-Set the SDL window title, if not specified default to the filename
-specified for the output device.
-
-@item window_x
-@item window_y
-Set the position of the window on the screen.
-@end table
-
-@subsection Interactive commands
-
-The window created by the device can be controlled through the
-following interactive commands.
-
-@table @key
-@item q, ESC
-Quit the device immediately.
-@end table
-
-@subsection Examples
-
-The following command shows the @command{ffmpeg} output is an
-SDL window, forcing its size to the qcif format:
-@example
-ffmpeg -i INPUT -c:v rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
-@end example
-
 @section sndio
 
 sndio audio output device.
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index c30449201d..26b2339ae1 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -42,7 +42,6 @@ OBJS-$(CONFIG_PULSE_INDEV)               += pulse_audio_dec.o \
                                             pulse_audio_common.o timefilter.o
 OBJS-$(CONFIG_PULSE_OUTDEV)              += pulse_audio_enc.o \
                                             pulse_audio_common.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
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 8a90fcb5d7..9215be7214 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -46,7 +46,6 @@ extern const AVInputFormat  ff_oss_demuxer;
 extern const FFOutputFormat ff_oss_muxer;
 extern const AVInputFormat  ff_pulse_demuxer;
 extern const FFOutputFormat ff_pulse_muxer;
-extern const FFOutputFormat ff_sdl2_muxer;
 extern const AVInputFormat  ff_sndio_demuxer;
 extern const FFOutputFormat ff_sndio_muxer;
 extern const AVInputFormat  ff_v4l2_demuxer;
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
deleted file mode 100644
index 342a253dc0..0000000000
--- a/libavdevice/sdl2.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- * Copyright (c) 2016 Josh de Kock
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * @file
- * libSDL2 output device
- */
-
-#include <SDL.h>
-#include <SDL_thread.h>
-
-#include "libavutil/avstring.h"
-#include "libavutil/imgutils.h"
-#include "libavutil/opt.h"
-#include "libavutil/parseutils.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/time.h"
-#include "avdevice.h"
-#include "libavformat/mux.h"
-
-typedef struct {
-    AVClass *class;
-    SDL_Window *window;
-    SDL_Renderer *renderer;
-    char *window_title;
-    int window_width, window_height;  /**< size of the window */
-    int window_x, window_y;           /**< position of the window */
-    int window_fullscreen;
-    int window_borderless;
-    int enable_quit_action;
-
-    SDL_Texture *texture;
-    int texture_fmt;
-    SDL_Rect texture_rect;
-
-    int inited;
-} SDLContext;
-
-static const struct sdl_texture_format_entry {
-    enum AVPixelFormat format; int texture_fmt;
-} sdl_texture_format_map[] = {
-    /*
-     * Not implemented in FFmpeg, but leaving here for completeness.
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_RGBA4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ABGR4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_BGRA4444 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB1555 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_RGBA5551 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ABGR1555 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_BGRA5551 },
-     * { AV_PIX_FMT_NONE, SDL_PIXELFORMAT_ARGB2101010 },
-    */
-    { AV_PIX_FMT_RGB8,    SDL_PIXELFORMAT_RGB332 },
-    { AV_PIX_FMT_RGB444,  SDL_PIXELFORMAT_RGB444 },
-    { AV_PIX_FMT_RGB555,  SDL_PIXELFORMAT_RGB555 },
-    { AV_PIX_FMT_BGR555,  SDL_PIXELFORMAT_BGR555 },
-    { AV_PIX_FMT_RGB565,  SDL_PIXELFORMAT_RGB565 },
-    { AV_PIX_FMT_BGR565,  SDL_PIXELFORMAT_BGR565 },
-    { AV_PIX_FMT_RGB24,   SDL_PIXELFORMAT_RGB24 },
-    { AV_PIX_FMT_BGR24,   SDL_PIXELFORMAT_BGR24 },
-    { AV_PIX_FMT_0RGB32,  SDL_PIXELFORMAT_RGB888 },
-    { AV_PIX_FMT_0BGR32,  SDL_PIXELFORMAT_BGR888 },
-#if HAVE_BIGENDIAN
-    { AV_PIX_FMT_RGB0,    SDL_PIXELFORMAT_RGBX8888 },
-    { AV_PIX_FMT_BGR0,    SDL_PIXELFORMAT_BGRX8888 },
-#else
-    { AV_PIX_FMT_0BGR,    SDL_PIXELFORMAT_RGBX8888 },
-    { AV_PIX_FMT_0RGB,    SDL_PIXELFORMAT_BGRX8888 },
-#endif
-    { AV_PIX_FMT_RGB32,   SDL_PIXELFORMAT_ARGB8888 },
-    { AV_PIX_FMT_RGB32_1, SDL_PIXELFORMAT_RGBA8888 },
-    { AV_PIX_FMT_BGR32,   SDL_PIXELFORMAT_ABGR8888 },
-    { AV_PIX_FMT_BGR32_1, SDL_PIXELFORMAT_BGRA8888 },
-    { AV_PIX_FMT_YUV420P, SDL_PIXELFORMAT_IYUV },
-    { AV_PIX_FMT_YUYV422, SDL_PIXELFORMAT_YUY2 },
-    { AV_PIX_FMT_UYVY422, SDL_PIXELFORMAT_UYVY },
-    { AV_PIX_FMT_NONE,    0                },
-};
-
-static void compute_texture_rect(AVFormatContext *s)
-{
-    AVRational sar, dar; /* sample and display aspect ratios */
-    SDLContext *sdl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *codecpar = st->codecpar;
-    SDL_Rect *texture_rect = &sdl->texture_rect;
-
-    /* compute texture width and height from the codec context information */
-    sar = st->sample_aspect_ratio.num ? st->sample_aspect_ratio : (AVRational){ 1, 1 };
-    dar = av_mul_q(sar, (AVRational){ codecpar->width, codecpar->height });
-
-    /* we suppose the screen has a 1/1 sample aspect ratio */
-    if (sdl->window_width && sdl->window_height) {
-        /* fit in the window */
-        if (av_cmp_q(dar, (AVRational){ sdl->window_width, sdl->window_height }) > 0) {
-            /* fit in width */
-            texture_rect->w = sdl->window_width;
-            texture_rect->h = av_rescale(texture_rect->w, dar.den, dar.num);
-        } else {
-            /* fit in height */
-            texture_rect->h = sdl->window_height;
-            texture_rect->w = av_rescale(texture_rect->h, dar.num, dar.den);
-        }
-    } else {
-        if (sar.num > sar.den) {
-            texture_rect->w = codecpar->width;
-            texture_rect->h = av_rescale(texture_rect->w, dar.den, dar.num);
-        } else {
-            texture_rect->h = codecpar->height;
-            texture_rect->w = av_rescale(texture_rect->h, dar.num, dar.den);
-        }
-        sdl->window_width  = texture_rect->w;
-        sdl->window_height = texture_rect->h;
-    }
-
-    texture_rect->x = (sdl->window_width  - texture_rect->w) / 2;
-    texture_rect->y = (sdl->window_height - texture_rect->h) / 2;
-}
-
-static int sdl2_write_trailer(AVFormatContext *s)
-{
-    SDLContext *sdl = s->priv_data;
-
-    if (sdl->texture)
-        SDL_DestroyTexture(sdl->texture);
-    sdl->texture = NULL;
-
-    if (sdl->renderer)
-        SDL_DestroyRenderer(sdl->renderer);
-    sdl->renderer = NULL;
-
-    if (sdl->window)
-        SDL_DestroyWindow(sdl->window);
-    sdl->window = NULL;
-
-    if (!sdl->inited)
-        SDL_Quit();
-
-    return 0;
-}
-
-static int sdl2_write_header(AVFormatContext *s)
-{
-    SDLContext *sdl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *codecpar = st->codecpar;
-    int i, ret = 0;
-    int flags  = 0;
-
-    if (!sdl->window_title)
-        sdl->window_title = av_strdup(s->url);
-
-    if (SDL_WasInit(SDL_INIT_VIDEO)) {
-        av_log(s, AV_LOG_WARNING,
-               "SDL video subsystem was already inited, you could have multiple SDL outputs. This may cause unknown behaviour.\n");
-        sdl->inited = 1;
-    }
-
-    if (   s->nb_streams > 1
-        || codecpar->codec_type != AVMEDIA_TYPE_VIDEO
-        || codecpar->codec_id   != AV_CODEC_ID_RAWVIDEO) {
-        av_log(s, AV_LOG_ERROR, "Only supports one rawvideo stream\n");
-        goto fail;
-    }
-
-    for (i = 0; sdl_texture_format_map[i].format != AV_PIX_FMT_NONE; i++) {
-        if (sdl_texture_format_map[i].format == codecpar->format) {
-            sdl->texture_fmt = sdl_texture_format_map[i].texture_fmt;
-            break;
-        }
-    }
-
-    if (!sdl->texture_fmt) {
-        av_log(s, AV_LOG_ERROR,
-               "Unsupported pixel format '%s'.\n",
-               av_get_pix_fmt_name(codecpar->format));
-        goto fail;
-    }
-
-    /* resize texture to width and height from the codec context information */
-    flags = SDL_WINDOW_HIDDEN |
-            (sdl->window_fullscreen ? SDL_WINDOW_FULLSCREEN : 0) |
-            (sdl->window_borderless ? SDL_WINDOW_BORDERLESS : SDL_WINDOW_RESIZABLE);
-
-    /* initialization */
-    if (!sdl->inited){
-        if (SDL_Init(SDL_INIT_VIDEO) != 0) {
-            av_log(s, AV_LOG_ERROR, "Unable to initialize SDL: %s\n", SDL_GetError());
-            goto fail;
-        }
-    }
-
-    compute_texture_rect(s);
-
-    if (SDL_CreateWindowAndRenderer(sdl->window_width, sdl->window_height,
-                                    flags, &sdl->window, &sdl->renderer) != 0){
-        av_log(sdl, AV_LOG_ERROR, "Couldn't create window and renderer: %s\n", SDL_GetError());
-        goto fail;
-    }
-
-    SDL_SetWindowTitle(sdl->window, sdl->window_title);
-    SDL_SetWindowPosition(sdl->window, sdl->window_x, sdl->window_y);
-    SDL_ShowWindow(sdl->window);
-
-    sdl->texture = SDL_CreateTexture(sdl->renderer, sdl->texture_fmt, SDL_TEXTUREACCESS_STREAMING,
-                                     codecpar->width, codecpar->height);
-
-    if (!sdl->texture) {
-        av_log(sdl, AV_LOG_ERROR, "Unable to set create mode: %s\n", SDL_GetError());
-        goto fail;
-    }
-
-    av_log(s, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s -> w:%d h:%d\n",
-           codecpar->width, codecpar->height, av_get_pix_fmt_name(codecpar->format),
-           sdl->window_width, sdl->window_height);
-
-    sdl->inited = 1;
-
-    return 0;
-fail:
-    sdl2_write_trailer(s);
-    return ret;
-}
-
-static int sdl2_write_packet(AVFormatContext *s, AVPacket *pkt)
-{
-    int ret, quit = 0;
-    SDLContext *sdl = s->priv_data;
-    AVCodecParameters *codecpar = s->streams[0]->codecpar;
-    uint8_t *data[4];
-    int linesize[4];
-
-    SDL_Event event;
-    if (SDL_PollEvent(&event)){
-        switch (event.type) {
-        case SDL_KEYDOWN:
-            switch (event.key.keysym.sym) {
-            case SDLK_ESCAPE:
-            case SDLK_q:
-                quit = 1;
-                break;
-            default:
-                break;
-            }
-            break;
-        case SDL_QUIT:
-            quit = 1;
-            break;
-        case SDL_WINDOWEVENT:
-            switch(event.window.event){
-            case SDL_WINDOWEVENT_RESIZED:
-            case SDL_WINDOWEVENT_SIZE_CHANGED:
-                sdl->window_width  = event.window.data1;
-                sdl->window_height = event.window.data2;
-                compute_texture_rect(s);
-                break;
-            default:
-                break;
-            }
-            break;
-        default:
-            break;
-        }
-    }
-
-    if (quit && sdl->enable_quit_action) {
-        sdl2_write_trailer(s);
-        return AVERROR(EIO);
-    }
-
-    av_image_fill_arrays(data, linesize, pkt->data, codecpar->format, codecpar->width, codecpar->height, 1);
-    switch (sdl->texture_fmt) {
-    /* case SDL_PIXELFORMAT_ARGB4444:
-     * case SDL_PIXELFORMAT_RGBA4444:
-     * case SDL_PIXELFORMAT_ABGR4444:
-     * case SDL_PIXELFORMAT_BGRA4444:
-     * case SDL_PIXELFORMAT_ARGB1555:
-     * case SDL_PIXELFORMAT_RGBA5551:
-     * case SDL_PIXELFORMAT_ABGR1555:
-     * case SDL_PIXELFORMAT_BGRA5551:
-     * case SDL_PIXELFORMAT_ARGB2101010:
-     */
-    case SDL_PIXELFORMAT_IYUV:
-    case SDL_PIXELFORMAT_YUY2:
-    case SDL_PIXELFORMAT_UYVY:
-        ret = SDL_UpdateYUVTexture(sdl->texture, NULL,
-                                   data[0], linesize[0],
-                                   data[1], linesize[1],
-                                   data[2], linesize[2]);
-        break;
-    case SDL_PIXELFORMAT_RGB332:
-    case SDL_PIXELFORMAT_RGB444:
-    case SDL_PIXELFORMAT_RGB555:
-    case SDL_PIXELFORMAT_BGR555:
-    case SDL_PIXELFORMAT_RGB565:
-    case SDL_PIXELFORMAT_BGR565:
-    case SDL_PIXELFORMAT_RGB24:
-    case SDL_PIXELFORMAT_BGR24:
-    case SDL_PIXELFORMAT_RGB888:
-    case SDL_PIXELFORMAT_RGBX8888:
-    case SDL_PIXELFORMAT_BGR888:
-    case SDL_PIXELFORMAT_BGRX8888:
-    case SDL_PIXELFORMAT_ARGB8888:
-    case SDL_PIXELFORMAT_RGBA8888:
-    case SDL_PIXELFORMAT_ABGR8888:
-    case SDL_PIXELFORMAT_BGRA8888:
-        ret = SDL_UpdateTexture(sdl->texture, NULL, data[0], linesize[0]);
-        break;
-    default:
-        av_log(NULL, AV_LOG_FATAL, "Unsupported pixel format\n");
-        ret = -1;
-        break;
-    }
-    SDL_RenderClear(sdl->renderer);
-    SDL_RenderCopy(sdl->renderer, sdl->texture, NULL, &sdl->texture_rect);
-    SDL_RenderPresent(sdl->renderer);
-    return ret;
-}
-
-#define OFFSET(x) offsetof(SDLContext,x)
-
-static const AVOption options[] = {
-    { "window_title",      "set SDL window title",       OFFSET(window_title), AV_OPT_TYPE_STRING,     { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_size",       "set SDL window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_x",          "set SDL window x position",  OFFSET(window_x),     AV_OPT_TYPE_INT,        { .i64 = SDL_WINDOWPOS_CENTERED }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_y",          "set SDL window y position",  OFFSET(window_y),     AV_OPT_TYPE_INT,        { .i64 = SDL_WINDOWPOS_CENTERED }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_fullscreen", "set SDL window fullscreen",  OFFSET(window_fullscreen), AV_OPT_TYPE_BOOL,  { .i64 = 0 },    0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_borderless", "set SDL window border off",  OFFSET(window_borderless), AV_OPT_TYPE_BOOL,  { .i64 = 0 },    0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { "window_enable_quit", "set if quit action is available", OFFSET(enable_quit_action), AV_OPT_TYPE_INT, {.i64=1},   0, 1, AV_OPT_FLAG_ENCODING_PARAM },
-    { NULL },
-};
-
-static const AVClass sdl2_class = {
-    .class_name = "sdl2 outdev",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
-};
-
-const FFOutputFormat ff_sdl2_muxer = {
-    .p.name         = "sdl,sdl2",
-    .p.long_name    = NULL_IF_CONFIG_SMALL("SDL2 output device"),
-    .priv_data_size = sizeof(SDLContext),
-    .p.audio_codec  = AV_CODEC_ID_NONE,
-    .p.video_codec  = AV_CODEC_ID_RAWVIDEO,
-    .write_header   = sdl2_write_header,
-    .write_packet   = sdl2_write_packet,
-    .write_trailer  = sdl2_write_trailer,
-    .p.flags        = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
-    .p.priv_class   = &sdl2_class,
-};
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] avdevice: remove OpenGL device
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
  2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 1/2] avdevice: remove sdl2 outdev J. Dekker
@ 2024-02-04  9:02 ` J. Dekker
  2024-02-04  9:19 ` [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices Zhao Zhili
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: J. Dekker @ 2024-02-04  9:02 UTC (permalink / raw)
  To: ffmpeg-devel

Signed-off-by: J. Dekker <jdek@itanimul.li>
---
 MAINTAINERS              |    1 -
 configure                |   15 -
 doc/outdevs.texi         |   39 --
 libavdevice/Makefile     |    1 -
 libavdevice/alldevices.c |    1 -
 libavdevice/opengl_enc.c | 1313 --------------------------------------
 6 files changed, 1370 deletions(-)
 delete mode 100644 libavdevice/opengl_enc.c

diff --git a/MAINTAINERS b/MAINTAINERS
index baead5d270..c816be66ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -290,7 +290,6 @@ libavdevice
   iec61883.c                            Georg Lippitsch
   lavfi                                 Stefano Sabatini
   libdc1394.c                           Roman Shaposhnik
-  opengl_enc.c                          Lukasz Marek
   pulse_audio_enc.c                     Lukasz Marek
   v4l2.c                                Giorgio Vazzana
   vfwcap.c                              Ramiro Polla
diff --git a/configure b/configure
index c4eebab14f..d97b9eedcc 100755
--- a/configure
+++ b/configure
@@ -317,7 +317,6 @@ External library support:
   --enable-libmysofa       enable libmysofa, needed for sofalizer filter [no]
   --enable-openal          enable OpenAL 1.1 capture support [no]
   --enable-opencl          enable OpenCL processing [no]
-  --enable-opengl          enable OpenGL rendering [no]
   --enable-openssl         enable openssl, needed for https support
                            if gnutls, libtls or mbedtls is not used [no]
   --enable-pocketsphinx    enable PocketSphinx, needed for asr filter [no]
@@ -1917,7 +1916,6 @@ EXTERNAL_LIBRARY_LIST="
     lv2
     mediacodec
     openal
-    opengl
     openssl
     pocketsphinx
     vapoursynth
@@ -2237,7 +2235,6 @@ HEADERS_LIST="
     machine_ioctl_meteor_h
     malloc_h
     opencv2_core_core_c_h
-    OpenGL_gl3_h
     poll_h
     sys_param_h
     sys_resource_h
@@ -3629,8 +3626,6 @@ lavfi_indev_deps="avfilter"
 libcdio_indev_deps="libcdio"
 libdc1394_indev_deps="libdc1394"
 openal_indev_deps="openal"
-opengl_outdev_deps="opengl"
-opengl_outdev_suggest="sdl2"
 oss_indev_deps_any="sys_soundcard_h"
 oss_outdev_deps_any="sys_soundcard_h"
 pulse_indev_deps="libpulse"
@@ -6952,12 +6947,6 @@ enabled opencl            && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueN
                              { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" ||
                                test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" ||
                                die "ERROR: opencl must be installed and version must be 1.2 or compatible"; }
-enabled opengl            && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
-                               check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
-                               check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" ||
-                               check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" ||
-                               die "ERROR: opengl not found."
-                             }
 enabled omx_rpi           && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
                                { ! enabled cross_compile &&
                                  add_cflags -isystem/opt/vc/include/IL &&
@@ -7708,10 +7697,6 @@ enabled zoompan_filter      && prepend avfilter_deps "swscale"
 
 enabled lavfi_indev         && prepend avdevice_deps "avfilter"
 
-#FIXME
-enabled_any opengl_outdev && enabled sdl2 &&
-    add_cflags $(filter_out '-Dmain=SDL_main' $sdl2_cflags)
-
 enabled opus_decoder    && prepend avcodec_deps "swresample"
 
 # reorder the items at var $1 to align with the items order at var $2 .
diff --git a/doc/outdevs.texi b/doc/outdevs.texi
index d3b9199463..86c78f31b7 100644
--- a/doc/outdevs.texi
+++ b/doc/outdevs.texi
@@ -301,45 +301,6 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
 
 See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
 
-@section opengl
-OpenGL output device.
-
-To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
-
-This output device allows one to render to OpenGL context.
-Context may be provided by application or default SDL window is created.
-
-When device renders to external context, application must implement handlers for following messages:
-@code{AV_DEV_TO_APP_CREATE_WINDOW_BUFFER} - create OpenGL context on current thread.
-@code{AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER} - make OpenGL context current.
-@code{AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER} - swap buffers.
-@code{AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER} - destroy OpenGL context.
-Application is also required to inform a device about current resolution by sending @code{AV_APP_TO_DEV_WINDOW_SIZE} message.
-
-@subsection Options
-@table @option
-
-@item background
-Set background color. Black is a default.
-@item no_window
-Disables default SDL window when set to non-zero value.
-Application must provide OpenGL context and both @code{window_size_cb} and @code{window_swap_buffers_cb} callbacks when set.
-@item window_title
-Set the SDL window title, if not specified default to the filename specified for the output device.
-Ignored when @option{no_window} is set.
-@item window_size
-Set preferred window size, can be a string of the form widthxheight or a video size abbreviation.
-If not specified it defaults to the size of the input video, downscaled according to the aspect ratio.
-Mostly usable when @option{no_window} is not set.
-
-@end table
-
-@subsection Examples
-Play a file on SDL window using OpenGL rendering:
-@example
-ffmpeg  -i INPUT -f opengl "window title"
-@end example
-
 @section oss
 
 OSS (Open Sound System) output device.
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index 26b2339ae1..ef07945d5b 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -35,7 +35,6 @@ OBJS-$(CONFIG_JACK_INDEV)                += jack.o timefilter.o
 OBJS-$(CONFIG_KMSGRAB_INDEV)             += kmsgrab.o
 OBJS-$(CONFIG_LAVFI_INDEV)               += lavfi.o
 OBJS-$(CONFIG_OPENAL_INDEV)              += openal-dec.o
-OBJS-$(CONFIG_OPENGL_OUTDEV)             += opengl_enc.o
 OBJS-$(CONFIG_OSS_INDEV)                 += oss_dec.o oss.o
 OBJS-$(CONFIG_OSS_OUTDEV)                += oss_enc.o oss.o
 OBJS-$(CONFIG_PULSE_INDEV)               += pulse_audio_dec.o \
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 9215be7214..d2554d3533 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -41,7 +41,6 @@ extern const AVInputFormat  ff_jack_demuxer;
 extern const AVInputFormat  ff_kmsgrab_demuxer;
 extern const AVInputFormat  ff_lavfi_demuxer;
 extern const AVInputFormat  ff_openal_demuxer;
-extern const FFOutputFormat ff_opengl_muxer;
 extern const AVInputFormat  ff_oss_demuxer;
 extern const FFOutputFormat ff_oss_muxer;
 extern const AVInputFormat  ff_pulse_demuxer;
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
deleted file mode 100644
index b2ac6eb16a..0000000000
--- a/libavdevice/opengl_enc.c
+++ /dev/null
@@ -1,1313 +0,0 @@
-/*
- * Copyright (c) 2014 Lukasz Marek
- *
- * This file is part of FFmpeg.
- *
- * FFmpeg is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * FFmpeg is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-//TODO: support for more formats
-//TODO: support for more systems.
-//TODO: implement X11, Windows, Mac OS native default window. SDL 1.2 doesn't allow to render to custom thread.
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-
-#include "config.h"
-
-#if HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-#if HAVE_OPENGL_GL3_H
-#include <OpenGL/gl3.h>
-#elif HAVE_ES2_GL_H
-#include <ES2/gl.h>
-#else
-#include <GL/gl.h>
-#include <GL/glext.h>
-#endif
-#if HAVE_GLXGETPROCADDRESS
-#include <GL/glx.h>
-#endif
-
-#if CONFIG_SDL2
-#include <SDL.h>
-#endif
-
-#include "libavutil/common.h"
-#include "libavutil/frame.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/log.h"
-#include "libavutil/opt.h"
-#include "libavutil/avassert.h"
-#include "libavformat/avformat.h"
-#include "libavformat/internal.h"
-#include "libavformat/mux.h"
-#include "libavdevice/avdevice.h"
-#include "opengl_enc_shaders.h"
-
-#ifndef APIENTRY
-#define APIENTRY
-#endif
-
-/* FF_GL_RED_COMPONENT is used for planar pixel types.
- * Only red component is sampled in shaders.
- * On some platforms GL_RED is not available and GL_LUMINANCE have to be used,
- * but since OpenGL 3.0 GL_LUMINANCE is deprecated.
- * GL_RED produces RGBA = value, 0, 0, 1.
- * GL_LUMINANCE produces RGBA = value, value, value, 1.
- * Note: GL_INTENSITY may also be used which produce RGBA = value, value, value, value. */
-#if defined(GL_RED)
-#define FF_GL_RED_COMPONENT GL_RED
-#elif defined(GL_LUMINANCE)
-#define FF_GL_RED_COMPONENT GL_LUMINANCE
-#else
-#define FF_GL_RED_COMPONENT 0x1903; //GL_RED
-#endif
-
-/* Constants not defined for iOS */
-#define FF_GL_UNSIGNED_BYTE_3_3_2 0x8032
-#define FF_GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
-#define FF_GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
-#define FF_GL_UNPACK_ROW_LENGTH          0x0CF2
-
-/* MinGW exposes only OpenGL 1.1 API */
-#define FF_GL_ARRAY_BUFFER                0x8892
-#define FF_GL_ELEMENT_ARRAY_BUFFER        0x8893
-#define FF_GL_STATIC_DRAW                 0x88E4
-#define FF_GL_FRAGMENT_SHADER             0x8B30
-#define FF_GL_VERTEX_SHADER               0x8B31
-#define FF_GL_COMPILE_STATUS              0x8B81
-#define FF_GL_LINK_STATUS                 0x8B82
-#define FF_GL_INFO_LOG_LENGTH             0x8B84
-typedef void   (APIENTRY *FF_PFNGLACTIVETEXTUREPROC) (GLenum texture);
-typedef void   (APIENTRY *FF_PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
-typedef void   (APIENTRY *FF_PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
-typedef void   (APIENTRY *FF_PFNGLBUFFERDATAPROC) (GLenum target, ptrdiff_t size, const GLvoid *data, GLenum usage);
-typedef void   (APIENTRY *FF_PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
-typedef GLint  (APIENTRY *FF_PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const char *name);
-typedef void   (APIENTRY *FF_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
-typedef void   (APIENTRY *FF_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, uintptr_t pointer);
-typedef GLint  (APIENTRY *FF_PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const char *name);
-typedef void   (APIENTRY *FF_PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
-typedef void   (APIENTRY *FF_PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
-typedef void   (APIENTRY *FF_PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
-typedef GLuint (APIENTRY *FF_PFNGLCREATEPROGRAMPROC) (void);
-typedef void   (APIENTRY *FF_PFNGLDELETEPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLUSEPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLLINKPROGRAMPROC) (GLuint program);
-typedef void   (APIENTRY *FF_PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
-typedef void   (APIENTRY *FF_PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog);
-typedef void   (APIENTRY *FF_PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
-typedef GLuint (APIENTRY *FF_PFNGLCREATESHADERPROC) (GLenum type);
-typedef void   (APIENTRY *FF_PFNGLDELETESHADERPROC) (GLuint shader);
-typedef void   (APIENTRY *FF_PFNGLCOMPILESHADERPROC) (GLuint shader);
-typedef void   (APIENTRY *FF_PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const char* *string, const GLint *length);
-typedef void   (APIENTRY *FF_PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
-typedef void   (APIENTRY *FF_PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog);
-
-typedef struct FFOpenGLFunctions {
-    FF_PFNGLACTIVETEXTUREPROC glActiveTexture;                     //Require GL ARB multitexture
-    FF_PFNGLGENBUFFERSPROC glGenBuffers;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLDELETEBUFFERSPROC glDeleteBuffers;                     //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLBUFFERDATAPROC glBufferData;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLBINDBUFFERPROC glBindBuffer;                           //Require GL_ARB_vertex_buffer_object
-    FF_PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation;             //Require GL_ARB_vertex_shader
-    FF_PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; //Require GL_ARB_vertex_shader
-    FF_PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer;         //Require GL_ARB_vertex_shader
-    FF_PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation;           //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORM1FPROC glUniform1f;                             //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORM1IPROC glUniform1i;                             //Require GL_ARB_shader_objects
-    FF_PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv;               //Require GL_ARB_shader_objects
-    FF_PFNGLCREATEPROGRAMPROC glCreateProgram;                     //Require GL_ARB_shader_objects
-    FF_PFNGLDELETEPROGRAMPROC glDeleteProgram;                     //Require GL_ARB_shader_objects
-    FF_PFNGLUSEPROGRAMPROC glUseProgram;                           //Require GL_ARB_shader_objects
-    FF_PFNGLLINKPROGRAMPROC glLinkProgram;                         //Require GL_ARB_shader_objects
-    FF_PFNGLGETPROGRAMIVPROC glGetProgramiv;                       //Require GL_ARB_shader_objects
-    FF_PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog;             //Require GL_ARB_shader_objects
-    FF_PFNGLATTACHSHADERPROC glAttachShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLCREATESHADERPROC glCreateShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLDELETESHADERPROC glDeleteShader;                       //Require GL_ARB_shader_objects
-    FF_PFNGLCOMPILESHADERPROC glCompileShader;                     //Require GL_ARB_shader_objects
-    FF_PFNGLSHADERSOURCEPROC glShaderSource;                       //Require GL_ARB_shader_objects
-    FF_PFNGLGETSHADERIVPROC glGetShaderiv;                         //Require GL_ARB_shader_objects
-    FF_PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog;               //Require GL_ARB_shader_objects
-} FFOpenGLFunctions;
-
-#define OPENGL_ERROR_CHECK(ctx) \
-{\
-    GLenum err_code; \
-    if ((err_code = glGetError()) != GL_NO_ERROR) { \
-        av_log(ctx, AV_LOG_ERROR, "OpenGL error occurred in '%s', line %d: %d\n", __func__, __LINE__, err_code); \
-        goto fail; \
-    } \
-}\
-
-typedef struct OpenGLVertexInfo
-{
-    float x, y, z;    ///<Position
-    float s0, t0;     ///<Texture coords
-} OpenGLVertexInfo;
-
-/* defines 2 triangles to display */
-static const GLushort g_index[6] =
-{
-    0, 1, 2,
-    0, 3, 2,
-};
-
-typedef struct OpenGLContext {
-    AVClass *class;                    ///< class for private options
-
-#if CONFIG_SDL2
-    SDL_Window *window;
-    SDL_GLContext glcontext;
-#endif
-    FFOpenGLFunctions glprocs;
-
-    int inited;                        ///< Set to 1 when write_header was successfully called.
-    uint8_t background[4];             ///< Background color
-    int no_window;                     ///< 0 for create default window
-    char *window_title;                ///< Title of the window
-
-    /* OpenGL implementation limits */
-    GLint max_texture_size;            ///< Maximum texture size
-    GLint max_viewport_width;          ///< Maximum viewport size
-    GLint max_viewport_height;         ///< Maximum viewport size
-    int non_pow_2_textures;            ///< 1 when non power of 2 textures are supported
-    int unpack_subimage;               ///< 1 when GL_EXT_unpack_subimage is available
-
-    /* Current OpenGL configuration */
-    GLuint program;                    ///< Shader program
-    GLuint vertex_shader;              ///< Vertex shader
-    GLuint fragment_shader;            ///< Fragment shader for current pix_pmt
-    GLuint texture_name[4];            ///< Textures' IDs
-    GLuint index_buffer;               ///< Index buffer
-    GLuint vertex_buffer;              ///< Vertex buffer
-    OpenGLVertexInfo vertex[4];        ///< VBO
-    GLint projection_matrix_location;  ///< Uniforms' locations
-    GLint model_view_matrix_location;
-    GLint color_map_location;
-    GLint chroma_div_w_location;
-    GLint chroma_div_h_location;
-    GLint texture_location[4];
-    GLint position_attrib;             ///< Attibutes' locations
-    GLint texture_coords_attrib;
-
-    GLfloat projection_matrix[16];     ///< Projection matrix
-    GLfloat model_view_matrix[16];     ///< Modev view matrix
-    GLfloat color_map[16];             ///< RGBA color map matrix
-    GLfloat chroma_div_w;              ///< Chroma subsampling w ratio
-    GLfloat chroma_div_h;              ///< Chroma subsampling h ratio
-
-    /* Stream information */
-    GLenum format;
-    GLenum type;
-    int width;                         ///< Stream width
-    int height;                        ///< Stream height
-    enum AVPixelFormat pix_fmt;        ///< Stream pixel format
-    int picture_width;                 ///< Rendered width
-    int picture_height;                ///< Rendered height
-    int window_width;
-    int window_height;
-} OpenGLContext;
-
-static const struct OpenGLFormatDesc {
-    enum AVPixelFormat fixel_format;
-    const char * const * fragment_shader;
-    GLenum format;
-    GLenum type;
-} opengl_format_desc[] = {
-    { AV_PIX_FMT_YUV420P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV444P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV422P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV410P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV411P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV440P,    &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUV420P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUV422P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUV444P16,  &FF_OPENGL_FRAGMENT_SHADER_YUV_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA420P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA444P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA422P,   &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_YUVA420P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA422P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_YUVA444P16, &FF_OPENGL_FRAGMENT_SHADER_YUVA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_RGB24,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGR24,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_0RGB,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGB0,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_0BGR,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGR0,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGB565,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
-    { AV_PIX_FMT_BGR565,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
-    { AV_PIX_FMT_RGB555,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, FF_GL_UNSIGNED_SHORT_1_5_5_5_REV },
-    { AV_PIX_FMT_BGR555,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGBA, FF_GL_UNSIGNED_SHORT_1_5_5_5_REV },
-    { AV_PIX_FMT_RGB8,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, FF_GL_UNSIGNED_BYTE_3_3_2 },
-    { AV_PIX_FMT_BGR8,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, FF_GL_UNSIGNED_BYTE_2_3_3_REV },
-    { AV_PIX_FMT_RGB48,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_BGR48,      &FF_OPENGL_FRAGMENT_SHADER_RGB_PACKET,  GL_RGB, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_ARGB,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGBA,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_ABGR,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_BGRA,       &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_RGBA64,     &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_BGRA64,     &FF_OPENGL_FRAGMENT_SHADER_RGBA_PACKET, GL_RGBA, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GBRP,       &FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GBRP16,     &FF_OPENGL_FRAGMENT_SHADER_RGB_PLANAR,  FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GBRAP,      &FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GBRAP16,    &FF_OPENGL_FRAGMENT_SHADER_RGBA_PLANAR, FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_GRAY8,      &FF_OPENGL_FRAGMENT_SHADER_GRAY,        FF_GL_RED_COMPONENT, GL_UNSIGNED_BYTE },
-    { AV_PIX_FMT_GRAY16,     &FF_OPENGL_FRAGMENT_SHADER_GRAY,        FF_GL_RED_COMPONENT, GL_UNSIGNED_SHORT },
-    { AV_PIX_FMT_NONE,       NULL }
-};
-
-static av_cold int opengl_prepare_vertex(AVFormatContext *s);
-static int opengl_draw(AVFormatContext *h, void *intput, int repaint, int is_pkt);
-static av_cold int opengl_init_context(OpenGLContext *opengl);
-
-static av_cold void opengl_deinit_context(OpenGLContext *opengl)
-{
-    glDeleteTextures(4, opengl->texture_name);
-    opengl->texture_name[0] = opengl->texture_name[1] =
-    opengl->texture_name[2] = opengl->texture_name[3] = 0;
-    if (opengl->glprocs.glUseProgram)
-        opengl->glprocs.glUseProgram(0);
-    if (opengl->glprocs.glDeleteProgram) {
-        opengl->glprocs.glDeleteProgram(opengl->program);
-        opengl->program = 0;
-    }
-    if (opengl->glprocs.glDeleteShader) {
-        opengl->glprocs.glDeleteShader(opengl->vertex_shader);
-        opengl->glprocs.glDeleteShader(opengl->fragment_shader);
-        opengl->vertex_shader = opengl->fragment_shader = 0;
-    }
-    if (opengl->glprocs.glBindBuffer) {
-        opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, 0);
-        opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, 0);
-    }
-    if (opengl->glprocs.glDeleteBuffers) {
-        opengl->glprocs.glDeleteBuffers(2, &opengl->index_buffer);
-        opengl->vertex_buffer = opengl->index_buffer = 0;
-    }
-}
-
-static int opengl_resize(AVFormatContext *h, int width, int height)
-{
-    int ret = 0;
-    OpenGLContext *opengl = h->priv_data;
-    opengl->window_width = width;
-    opengl->window_height = height;
-    if (opengl->inited) {
-        if (opengl->no_window &&
-            (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-            goto end;
-        }
-        if ((ret = opengl_prepare_vertex(h)) < 0)
-            goto end;
-        ret = opengl_draw(h, NULL, 1, 0);
-    }
-  end:
-    return ret;
-}
-
-static int opengl_control_message(AVFormatContext *h, int type, void *data, size_t data_size)
-{
-    OpenGLContext *opengl = h->priv_data;
-    switch(type) {
-    case AV_APP_TO_DEV_WINDOW_SIZE:
-        if (data) {
-            AVDeviceRect *message = data;
-            return opengl_resize(h, message->width, message->height);
-        }
-        return AVERROR(EINVAL);
-    case AV_APP_TO_DEV_WINDOW_REPAINT:
-        return opengl_resize(h, opengl->window_width, opengl->window_height);
-    }
-    return AVERROR(ENOSYS);
-}
-
-#if CONFIG_SDL2
-static int opengl_sdl_process_events(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVDeviceRect message;
-    SDL_Event event;
-    SDL_PumpEvents();
-    while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_FIRSTEVENT, SDL_LASTEVENT) > 0) {
-        switch (event.type) {
-        case SDL_QUIT:
-            return AVERROR(EIO);
-        case SDL_KEYDOWN:
-            switch (event.key.keysym.sym) {
-            case SDLK_ESCAPE:
-            case SDLK_q:
-                return AVERROR(EIO);
-            }
-            return 0;
-        case SDL_WINDOWEVENT:
-            switch(event.window.event) {
-            case SDL_WINDOWEVENT_RESIZED:
-            case SDL_WINDOWEVENT_SIZE_CHANGED:
-                SDL_GL_GetDrawableSize(opengl->window, &message.width, &message.height);
-                return opengl_control_message(h, AV_APP_TO_DEV_WINDOW_SIZE, &message, sizeof(AVDeviceRect));
-            default:
-                break;
-            }
-        }
-    }
-    return 0;
-}
-
-static int av_cold opengl_sdl_create_window(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVDeviceRect message;
-    if (SDL_Init(SDL_INIT_VIDEO)) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to initialize SDL: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    opengl->window = SDL_CreateWindow(opengl->window_title,
-                                      SDL_WINDOWPOS_UNDEFINED,
-                                      SDL_WINDOWPOS_UNDEFINED,
-                                      opengl->window_width, opengl->window_height,
-                                      SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL);
-    if (!opengl->window) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to create default window: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    opengl->glcontext = SDL_GL_CreateContext(opengl->window);
-    if (!opengl->glcontext) {
-        av_log(opengl, AV_LOG_ERROR, "Unable to create OpenGL context on default window: %s\n", SDL_GetError());
-        return AVERROR_EXTERNAL;
-    }
-    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
-    av_log(opengl, AV_LOG_INFO, "SDL driver: '%s'.\n", SDL_GetCurrentVideoDriver());
-    SDL_GL_GetDrawableSize(opengl->window, &message.width, &message.height);
-    return opengl_control_message(h, AV_APP_TO_DEV_WINDOW_SIZE, &message, sizeof(AVDeviceRect));
-}
-
-static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#define LOAD_OPENGL_FUN(name, type) \
-    procs->name = (type)SDL_GL_GetProcAddress(#name); \
-    if (!procs->name) { \
-        av_log(opengl, AV_LOG_ERROR, "Cannot load OpenGL function: '%s'\n", #name); \
-        return AVERROR(ENOSYS); \
-    }
-
-    LOAD_OPENGL_FUN(glActiveTexture, FF_PFNGLACTIVETEXTUREPROC)
-    LOAD_OPENGL_FUN(glGenBuffers, FF_PFNGLGENBUFFERSPROC)
-    LOAD_OPENGL_FUN(glDeleteBuffers, FF_PFNGLDELETEBUFFERSPROC)
-    LOAD_OPENGL_FUN(glBufferData, FF_PFNGLBUFFERDATAPROC)
-    LOAD_OPENGL_FUN(glBindBuffer, FF_PFNGLBINDBUFFERPROC)
-    LOAD_OPENGL_FUN(glGetAttribLocation, FF_PFNGLGETATTRIBLOCATIONPROC)
-    LOAD_OPENGL_FUN(glGetUniformLocation, FF_PFNGLGETUNIFORMLOCATIONPROC)
-    LOAD_OPENGL_FUN(glUniform1f, FF_PFNGLUNIFORM1FPROC)
-    LOAD_OPENGL_FUN(glUniform1i, FF_PFNGLUNIFORM1IPROC)
-    LOAD_OPENGL_FUN(glUniformMatrix4fv, FF_PFNGLUNIFORMMATRIX4FVPROC)
-    LOAD_OPENGL_FUN(glCreateProgram, FF_PFNGLCREATEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glDeleteProgram, FF_PFNGLDELETEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glUseProgram, FF_PFNGLUSEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glLinkProgram, FF_PFNGLLINKPROGRAMPROC)
-    LOAD_OPENGL_FUN(glGetProgramiv, FF_PFNGLGETPROGRAMIVPROC)
-    LOAD_OPENGL_FUN(glGetProgramInfoLog, FF_PFNGLGETPROGRAMINFOLOGPROC)
-    LOAD_OPENGL_FUN(glAttachShader, FF_PFNGLATTACHSHADERPROC)
-    LOAD_OPENGL_FUN(glCreateShader, FF_PFNGLCREATESHADERPROC)
-    LOAD_OPENGL_FUN(glDeleteShader, FF_PFNGLDELETESHADERPROC)
-    LOAD_OPENGL_FUN(glCompileShader, FF_PFNGLCOMPILESHADERPROC)
-    LOAD_OPENGL_FUN(glShaderSource, FF_PFNGLSHADERSOURCEPROC)
-    LOAD_OPENGL_FUN(glGetShaderiv, FF_PFNGLGETSHADERIVPROC)
-    LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC)
-    LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC)
-    LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC)
-
-    return 0;
-
-#undef LOAD_OPENGL_FUN
-}
-#endif /* CONFIG_SDL2 */
-
-#if defined(__APPLE__)
-static int av_cold opengl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        return opengl_sdl_load_procedures(opengl);
-#endif
-
-    procs->glActiveTexture = glActiveTexture;
-    procs->glGenBuffers = glGenBuffers;
-    procs->glDeleteBuffers = glDeleteBuffers;
-    procs->glBufferData = glBufferData;
-    procs->glBindBuffer = glBindBuffer;
-    procs->glGetAttribLocation = glGetAttribLocation;
-    procs->glGetUniformLocation = glGetUniformLocation;
-    procs->glUniform1f = glUniform1f;
-    procs->glUniform1i = glUniform1i;
-    procs->glUniformMatrix4fv = glUniformMatrix4fv;
-    procs->glCreateProgram = glCreateProgram;
-    procs->glDeleteProgram = glDeleteProgram;
-    procs->glUseProgram = glUseProgram;
-    procs->glLinkProgram = glLinkProgram;
-    procs->glGetProgramiv = glGetProgramiv;
-    procs->glGetProgramInfoLog = glGetProgramInfoLog;
-    procs->glAttachShader = glAttachShader;
-    procs->glCreateShader = glCreateShader;
-    procs->glDeleteShader = glDeleteShader;
-    procs->glCompileShader = glCompileShader;
-    procs->glShaderSource = glShaderSource;
-    procs->glGetShaderiv = glGetShaderiv;
-    procs->glGetShaderInfoLog = glGetShaderInfoLog;
-    procs->glEnableVertexAttribArray = glEnableVertexAttribArray;
-    procs->glVertexAttribPointer = (FF_PFNGLVERTEXATTRIBPOINTERPROC) glVertexAttribPointer;
-    return 0;
-}
-#else
-static int av_cold opengl_load_procedures(OpenGLContext *opengl)
-{
-    FFOpenGLFunctions *procs = &opengl->glprocs;
-
-#if HAVE_GLXGETPROCADDRESS
-#define SelectedGetProcAddress glXGetProcAddress
-#elif HAVE_WGLGETPROCADDRESS
-#define SelectedGetProcAddress wglGetProcAddress
-#endif
-
-#define LOAD_OPENGL_FUN(name, type) \
-    procs->name = (type)SelectedGetProcAddress(#name); \
-    if (!procs->name) { \
-        av_log(opengl, AV_LOG_ERROR, "Cannot load OpenGL function: '%s'\n", #name); \
-        return AVERROR(ENOSYS); \
-    }
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        return opengl_sdl_load_procedures(opengl);
-#endif
-
-    LOAD_OPENGL_FUN(glActiveTexture, FF_PFNGLACTIVETEXTUREPROC)
-    LOAD_OPENGL_FUN(glGenBuffers, FF_PFNGLGENBUFFERSPROC)
-    LOAD_OPENGL_FUN(glDeleteBuffers, FF_PFNGLDELETEBUFFERSPROC)
-    LOAD_OPENGL_FUN(glBufferData, FF_PFNGLBUFFERDATAPROC)
-    LOAD_OPENGL_FUN(glBindBuffer, FF_PFNGLBINDBUFFERPROC)
-    LOAD_OPENGL_FUN(glGetAttribLocation, FF_PFNGLGETATTRIBLOCATIONPROC)
-    LOAD_OPENGL_FUN(glGetUniformLocation, FF_PFNGLGETUNIFORMLOCATIONPROC)
-    LOAD_OPENGL_FUN(glUniform1f, FF_PFNGLUNIFORM1FPROC)
-    LOAD_OPENGL_FUN(glUniform1i, FF_PFNGLUNIFORM1IPROC)
-    LOAD_OPENGL_FUN(glUniformMatrix4fv, FF_PFNGLUNIFORMMATRIX4FVPROC)
-    LOAD_OPENGL_FUN(glCreateProgram, FF_PFNGLCREATEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glDeleteProgram, FF_PFNGLDELETEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glUseProgram, FF_PFNGLUSEPROGRAMPROC)
-    LOAD_OPENGL_FUN(glLinkProgram, FF_PFNGLLINKPROGRAMPROC)
-    LOAD_OPENGL_FUN(glGetProgramiv, FF_PFNGLGETPROGRAMIVPROC)
-    LOAD_OPENGL_FUN(glGetProgramInfoLog, FF_PFNGLGETPROGRAMINFOLOGPROC)
-    LOAD_OPENGL_FUN(glAttachShader, FF_PFNGLATTACHSHADERPROC)
-    LOAD_OPENGL_FUN(glCreateShader, FF_PFNGLCREATESHADERPROC)
-    LOAD_OPENGL_FUN(glDeleteShader, FF_PFNGLDELETESHADERPROC)
-    LOAD_OPENGL_FUN(glCompileShader, FF_PFNGLCOMPILESHADERPROC)
-    LOAD_OPENGL_FUN(glShaderSource, FF_PFNGLSHADERSOURCEPROC)
-    LOAD_OPENGL_FUN(glGetShaderiv, FF_PFNGLGETSHADERIVPROC)
-    LOAD_OPENGL_FUN(glGetShaderInfoLog, FF_PFNGLGETSHADERINFOLOGPROC)
-    LOAD_OPENGL_FUN(glEnableVertexAttribArray, FF_PFNGLENABLEVERTEXATTRIBARRAYPROC)
-    LOAD_OPENGL_FUN(glVertexAttribPointer, FF_PFNGLVERTEXATTRIBPOINTERPROC)
-
-    return 0;
-
-#undef SelectedGetProcAddress
-#undef LOAD_OPENGL_FUN
-}
-#endif
-
-static void opengl_make_identity(float matrix[16])
-{
-    memset(matrix, 0, 16 * sizeof(float));
-    matrix[0] = matrix[5] = matrix[10] = matrix[15] = 1.0f;
-}
-
-static void opengl_make_ortho(float matrix[16], float left, float right,
-                              float bottom, float top, float nearZ, float farZ)
-{
-    float ral = right + left;
-    float rsl = right - left;
-    float tab = top + bottom;
-    float tsb = top - bottom;
-    float fan = farZ + nearZ;
-    float fsn = farZ - nearZ;
-
-    memset(matrix, 0, 16 * sizeof(float));
-    matrix[0] = 2.0f / rsl;
-    matrix[5] = 2.0f / tsb;
-    matrix[10] = -2.0f / fsn;
-    matrix[12] = -ral / rsl;
-    matrix[13] = -tab / tsb;
-    matrix[14] = -fan / fsn;
-    matrix[15] = 1.0f;
-}
-
-static av_cold int opengl_read_limits(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    static const struct{
-        const char *extension;
-        int major;
-        int minor;
-    } required_extensions[] = {
-        { "GL_ARB_multitexture",         1, 3 },
-        { "GL_ARB_vertex_buffer_object", 1, 5 }, //GLX_ARB_vertex_buffer_object
-        { "GL_ARB_vertex_shader",        2, 0 },
-        { "GL_ARB_fragment_shader",      2, 0 },
-        { "GL_ARB_shader_objects",       2, 0 },
-        { NULL,                          0, 0 }
-    };
-    int i, major, minor;
-    const char *extensions, *version;
-
-    version = glGetString(GL_VERSION);
-    extensions = glGetString(GL_EXTENSIONS);
-    if (!version || !extensions) {
-        av_log(h, AV_LOG_ERROR, "No OpenGL context initialized for the current thread\n");
-        return AVERROR(ENOSYS);
-    }
-
-    av_log(h, AV_LOG_DEBUG, "OpenGL version: %s\n", version);
-    if (sscanf(version, "%d.%d", &major, &minor) != 2)
-        return AVERROR(ENOSYS);
-
-    for (i = 0; required_extensions[i].extension; i++) {
-        if (major < required_extensions[i].major &&
-            (major == required_extensions[i].major && minor < required_extensions[i].minor) &&
-            !strstr(extensions, required_extensions[i].extension)) {
-            av_log(h, AV_LOG_ERROR, "Required extension %s is not supported.\n",
-                   required_extensions[i].extension);
-            av_log(h, AV_LOG_DEBUG, "Supported extensions are: %s\n", extensions);
-            return AVERROR(ENOSYS);
-        }
-    }
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &opengl->max_texture_size);
-    glGetIntegerv(GL_MAX_VIEWPORT_DIMS, &opengl->max_viewport_width);
-    opengl->non_pow_2_textures = major >= 2 || strstr(extensions, "GL_ARB_texture_non_power_of_two");
-#if defined(GL_ES_VERSION_2_0)
-    opengl->unpack_subimage = !!strstr(extensions, "GL_EXT_unpack_subimage");
-#else
-    opengl->unpack_subimage = 1;
-#endif
-
-    av_log(h, AV_LOG_DEBUG, "Non Power of 2 textures support: %s\n", opengl->non_pow_2_textures ? "Yes" : "No");
-    av_log(h, AV_LOG_DEBUG, "Unpack Subimage extension support: %s\n", opengl->unpack_subimage ? "Yes" : "No");
-    av_log(h, AV_LOG_DEBUG, "Max texture size: %dx%d\n", opengl->max_texture_size, opengl->max_texture_size);
-    av_log(h, AV_LOG_DEBUG, "Max viewport size: %dx%d\n",
-           opengl->max_viewport_width, opengl->max_viewport_height);
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static const char* opengl_get_fragment_shader_code(enum AVPixelFormat format)
-{
-    int i;
-    for (i = 0; i < FF_ARRAY_ELEMS(opengl_format_desc); i++) {
-        if (opengl_format_desc[i].fixel_format == format)
-            return *opengl_format_desc[i].fragment_shader;
-    }
-    return NULL;
-}
-
-static int opengl_type_size(GLenum type)
-{
-    switch(type) {
-    case GL_UNSIGNED_SHORT:
-    case FF_GL_UNSIGNED_SHORT_1_5_5_5_REV:
-    case GL_UNSIGNED_SHORT_5_6_5:
-        return 2;
-    case GL_UNSIGNED_BYTE:
-    case FF_GL_UNSIGNED_BYTE_3_3_2:
-    case FF_GL_UNSIGNED_BYTE_2_3_3_REV:
-    default:
-        break;
-    }
-    return 1;
-}
-
-static av_cold void opengl_get_texture_params(OpenGLContext *opengl)
-{
-    int i;
-    for (i = 0; i < FF_ARRAY_ELEMS(opengl_format_desc); i++) {
-        if (opengl_format_desc[i].fixel_format == opengl->pix_fmt) {
-            opengl->format = opengl_format_desc[i].format;
-            opengl->type = opengl_format_desc[i].type;
-            break;
-        }
-    }
-}
-
-static void opengl_compute_display_area(AVFormatContext *s)
-{
-    AVRational sar, dar; /* sample and display aspect ratios */
-    OpenGLContext *opengl = s->priv_data;
-    AVStream *st = s->streams[0];
-    AVCodecParameters *par = st->codecpar;
-
-    /* compute overlay width and height from the codec context information */
-    sar = st->sample_aspect_ratio.num ? st->sample_aspect_ratio : (AVRational){ 1, 1 };
-    dar = av_mul_q(sar, (AVRational){ par->width, par->height });
-
-    /* we suppose the screen has a 1/1 sample aspect ratio */
-    /* fit in the window */
-    if (av_cmp_q(dar, (AVRational){ opengl->window_width, opengl->window_height }) > 0) {
-        /* fit in width */
-        opengl->picture_width = opengl->window_width;
-        opengl->picture_height = av_rescale(opengl->picture_width, dar.den, dar.num);
-    } else {
-        /* fit in height */
-        opengl->picture_height = opengl->window_height;
-        opengl->picture_width = av_rescale(opengl->picture_height, dar.num, dar.den);
-    }
-}
-
-static av_cold void opengl_get_texture_size(OpenGLContext *opengl, int in_width, int in_height,
-                                            int *out_width, int *out_height)
-{
-    if (opengl->non_pow_2_textures) {
-        *out_width = in_width;
-        *out_height = in_height;
-    } else {
-        int max = FFMIN(FFMAX(in_width, in_height), opengl->max_texture_size);
-        unsigned power_of_2 = 1;
-        while (power_of_2 < max)
-            power_of_2 *= 2;
-        *out_height = power_of_2;
-        *out_width = power_of_2;
-        av_log(opengl, AV_LOG_DEBUG, "Texture size calculated from %dx%d into %dx%d\n",
-               in_width, in_height, *out_width, *out_height);
-    }
-}
-
-static av_cold void opengl_fill_color_map(OpenGLContext *opengl)
-{
-    const AVPixFmtDescriptor *desc;
-    int shift;
-    enum AVPixelFormat pix_fmt = opengl->pix_fmt;
-
-    /* We need order of components, not exact position, some minor HACKs here */
-    if (pix_fmt == AV_PIX_FMT_RGB565 || pix_fmt == AV_PIX_FMT_BGR555 ||
-        pix_fmt == AV_PIX_FMT_BGR8   || pix_fmt == AV_PIX_FMT_RGB8)
-        pix_fmt = AV_PIX_FMT_RGB24;
-    else if (pix_fmt == AV_PIX_FMT_BGR565 || pix_fmt == AV_PIX_FMT_RGB555)
-        pix_fmt = AV_PIX_FMT_BGR24;
-
-    desc = av_pix_fmt_desc_get(pix_fmt);
-    if (!(desc->flags & AV_PIX_FMT_FLAG_RGB))
-        return;
-
-#define FILL_COMPONENT(i) { \
-        shift = (desc->comp[i].depth - 1) >> 3; \
-        opengl->color_map[(i << 2) + (desc->comp[i].offset >> shift)] = 1.0; \
-    }
-
-    memset(opengl->color_map, 0, sizeof(opengl->color_map));
-    FILL_COMPONENT(0);
-    FILL_COMPONENT(1);
-    FILL_COMPONENT(2);
-    if (desc->flags & AV_PIX_FMT_FLAG_ALPHA)
-        FILL_COMPONENT(3);
-
-#undef FILL_COMPONENT
-}
-
-static av_cold GLuint opengl_load_shader(OpenGLContext *opengl, GLenum type, const char *source)
-{
-    GLuint shader = opengl->glprocs.glCreateShader(type);
-    GLint result;
-    if (!shader) {
-        av_log(opengl, AV_LOG_ERROR, "glCreateShader() failed\n");
-        return 0;
-    }
-    opengl->glprocs.glShaderSource(shader, 1, &source, NULL);
-    opengl->glprocs.glCompileShader(shader);
-
-    opengl->glprocs.glGetShaderiv(shader, FF_GL_COMPILE_STATUS, &result);
-    if (!result) {
-        char *log;
-        opengl->glprocs.glGetShaderiv(shader, FF_GL_INFO_LOG_LENGTH, &result);
-        if (result) {
-            if ((log = av_malloc(result))) {
-                opengl->glprocs.glGetShaderInfoLog(shader, result, NULL, log);
-                av_log(opengl, AV_LOG_ERROR, "Compile error: %s\n", log);
-                av_free(log);
-            }
-        }
-        goto fail;
-    }
-    OPENGL_ERROR_CHECK(opengl);
-    return shader;
-  fail:
-    opengl->glprocs.glDeleteShader(shader);
-    return 0;
-}
-
-static av_cold int opengl_compile_shaders(OpenGLContext *opengl, enum AVPixelFormat pix_fmt)
-{
-    GLint result;
-    const char *fragment_shader_code = opengl_get_fragment_shader_code(pix_fmt);
-
-    if (!fragment_shader_code) {
-        av_log(opengl, AV_LOG_ERROR, "Provided pixel format '%s' is not supported\n",
-               av_get_pix_fmt_name(pix_fmt));
-        return AVERROR(EINVAL);
-    }
-
-    opengl->vertex_shader = opengl_load_shader(opengl, FF_GL_VERTEX_SHADER,
-                                               FF_OPENGL_VERTEX_SHADER);
-    if (!opengl->vertex_shader) {
-        av_log(opengl, AV_LOG_ERROR, "Vertex shader loading failed.\n");
-        goto fail;
-    }
-    opengl->fragment_shader = opengl_load_shader(opengl, FF_GL_FRAGMENT_SHADER,
-                                                 fragment_shader_code);
-    if (!opengl->fragment_shader) {
-        av_log(opengl, AV_LOG_ERROR, "Fragment shader loading failed.\n");
-        goto fail;
-    }
-
-    opengl->program = opengl->glprocs.glCreateProgram();
-    if (!opengl->program)
-        goto fail;
-
-    opengl->glprocs.glAttachShader(opengl->program, opengl->vertex_shader);
-    opengl->glprocs.glAttachShader(opengl->program, opengl->fragment_shader);
-    opengl->glprocs.glLinkProgram(opengl->program);
-
-    opengl->glprocs.glGetProgramiv(opengl->program, FF_GL_LINK_STATUS, &result);
-    if (!result) {
-        char *log;
-        opengl->glprocs.glGetProgramiv(opengl->program, FF_GL_INFO_LOG_LENGTH, &result);
-        if (result) {
-            log = av_malloc(result);
-            if (!log)
-                goto fail;
-            opengl->glprocs.glGetProgramInfoLog(opengl->program, result, NULL, log);
-            av_log(opengl, AV_LOG_ERROR, "Link error: %s\n", log);
-            av_free(log);
-        }
-        goto fail;
-    }
-
-    opengl->position_attrib = opengl->glprocs.glGetAttribLocation(opengl->program, "a_position");
-    opengl->texture_coords_attrib = opengl->glprocs.glGetAttribLocation(opengl->program, "a_textureCoords");
-    opengl->projection_matrix_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_projectionMatrix");
-    opengl->model_view_matrix_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_modelViewMatrix");
-    opengl->color_map_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_colorMap");
-    opengl->texture_location[0] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture0");
-    opengl->texture_location[1] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture1");
-    opengl->texture_location[2] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture2");
-    opengl->texture_location[3] = opengl->glprocs.glGetUniformLocation(opengl->program, "u_texture3");
-    opengl->chroma_div_w_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_chroma_div_w");
-    opengl->chroma_div_h_location = opengl->glprocs.glGetUniformLocation(opengl->program, "u_chroma_div_h");
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    opengl->glprocs.glDeleteShader(opengl->vertex_shader);
-    opengl->glprocs.glDeleteShader(opengl->fragment_shader);
-    opengl->glprocs.glDeleteProgram(opengl->program);
-    opengl->fragment_shader = opengl->vertex_shader = opengl->program = 0;
-    return AVERROR_EXTERNAL;
-}
-
-static av_cold int opengl_configure_texture(OpenGLContext *opengl, GLuint texture,
-                                            GLsizei width, GLsizei height)
-{
-    if (texture) {
-        int new_width, new_height;
-        opengl_get_texture_size(opengl, width, height, &new_width, &new_height);
-        glBindTexture(GL_TEXTURE_2D, texture);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-        glTexImage2D(GL_TEXTURE_2D, 0, opengl->format, new_width, new_height, 0,
-                     opengl->format, opengl->type, NULL);
-        OPENGL_ERROR_CHECK(NULL);
-    }
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static av_cold int opengl_prepare_vertex(AVFormatContext *s)
-{
-    OpenGLContext *opengl = s->priv_data;
-    int tex_w, tex_h;
-
-    if (opengl->window_width > opengl->max_viewport_width || opengl->window_height > opengl->max_viewport_height) {
-        opengl->window_width = FFMIN(opengl->window_width, opengl->max_viewport_width);
-        opengl->window_height = FFMIN(opengl->window_height, opengl->max_viewport_height);
-        av_log(opengl, AV_LOG_WARNING, "Too big viewport requested, limited to %dx%d", opengl->window_width, opengl->window_height);
-    }
-    glViewport(0, 0, opengl->window_width, opengl->window_height);
-    opengl_make_ortho(opengl->projection_matrix,
-                      - (float)opengl->window_width  / 2.0f, (float)opengl->window_width  / 2.0f,
-                      - (float)opengl->window_height / 2.0f, (float)opengl->window_height / 2.0f,
-                      1.0f, -1.0f);
-    opengl_make_identity(opengl->model_view_matrix);
-
-    opengl_compute_display_area(s);
-
-    opengl->vertex[0].z = opengl->vertex[1].z = opengl->vertex[2].z = opengl->vertex[3].z = 0.0f;
-    opengl->vertex[0].x = opengl->vertex[1].x = - (float)opengl->picture_width / 2.0f;
-    opengl->vertex[2].x = opengl->vertex[3].x =   (float)opengl->picture_width / 2.0f;
-    opengl->vertex[1].y = opengl->vertex[2].y = - (float)opengl->picture_height / 2.0f;
-    opengl->vertex[0].y = opengl->vertex[3].y =   (float)opengl->picture_height / 2.0f;
-
-    opengl_get_texture_size(opengl, opengl->width, opengl->height, &tex_w, &tex_h);
-
-    opengl->vertex[0].s0 = 0.0f;
-    opengl->vertex[0].t0 = 0.0f;
-    opengl->vertex[1].s0 = 0.0f;
-    opengl->vertex[1].t0 = (float)opengl->height / (float)tex_h;
-    opengl->vertex[2].s0 = (float)opengl->width  / (float)tex_w;
-    opengl->vertex[2].t0 = (float)opengl->height / (float)tex_h;
-    opengl->vertex[3].s0 = (float)opengl->width  / (float)tex_w;
-    opengl->vertex[3].t0 = 0.0f;
-
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, opengl->vertex_buffer);
-    opengl->glprocs.glBufferData(FF_GL_ARRAY_BUFFER, sizeof(opengl->vertex), opengl->vertex, FF_GL_STATIC_DRAW);
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, 0);
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static int opengl_prepare(OpenGLContext *opengl)
-{
-    int i;
-    opengl->glprocs.glUseProgram(opengl->program);
-    opengl->glprocs.glUniformMatrix4fv(opengl->projection_matrix_location, 1, GL_FALSE, opengl->projection_matrix);
-    opengl->glprocs.glUniformMatrix4fv(opengl->model_view_matrix_location, 1, GL_FALSE, opengl->model_view_matrix);
-    for (i = 0; i < 4; i++)
-        if (opengl->texture_location[i] != -1) {
-            opengl->glprocs.glActiveTexture(GL_TEXTURE0 + i);
-            glBindTexture(GL_TEXTURE_2D, opengl->texture_name[i]);
-            opengl->glprocs.glUniform1i(opengl->texture_location[i], i);
-        }
-    if (opengl->color_map_location != -1)
-        opengl->glprocs.glUniformMatrix4fv(opengl->color_map_location, 1, GL_FALSE, opengl->color_map);
-    if (opengl->chroma_div_h_location != -1)
-        opengl->glprocs.glUniform1f(opengl->chroma_div_h_location, opengl->chroma_div_h);
-    if (opengl->chroma_div_w_location != -1)
-        opengl->glprocs.glUniform1f(opengl->chroma_div_w_location, opengl->chroma_div_w);
-
-    OPENGL_ERROR_CHECK(opengl);
-    return 0;
-  fail:
-    return AVERROR_EXTERNAL;
-}
-
-static int opengl_create_window(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    int ret;
-
-    if (!opengl->no_window) {
-#if CONFIG_SDL2
-        if ((ret = opengl_sdl_create_window(h)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Cannot create default SDL window.\n");
-            return ret;
-        }
-#else
-        av_log(opengl, AV_LOG_ERROR, "FFmpeg is compiled without SDL. Cannot create default window.\n");
-        return AVERROR(ENOSYS);
-#endif
-    } else {
-        AVDeviceRect message;
-        message.x = message.y = 0;
-        message.width = opengl->window_width;
-        message.height = opengl->window_height;
-        if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_CREATE_WINDOW_BUFFER,
-                                                       &message , sizeof(message))) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to create window buffer.\n");
-            return ret;
-        }
-        if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-            av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-            return ret;
-        }
-    }
-    return 0;
-}
-
-static int opengl_release_window(AVFormatContext *h)
-{
-    int ret;
-    OpenGLContext *opengl = h->priv_data;
-    if (!opengl->no_window) {
-#if CONFIG_SDL2
-        SDL_GL_DeleteContext(opengl->glcontext);
-        SDL_DestroyWindow(opengl->window);
-        SDL_Quit();
-#endif
-    } else if ((ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to release window buffer.\n");
-        return ret;
-    }
-    return 0;
-}
-
-static av_cold int opengl_write_trailer(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-
-    if (opengl->no_window &&
-        avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0) < 0)
-        av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-
-    opengl_deinit_context(opengl);
-    opengl_release_window(h);
-
-    return 0;
-}
-
-static av_cold int opengl_init_context(OpenGLContext *opengl)
-{
-    int i, ret;
-    const AVPixFmtDescriptor *desc;
-
-    if ((ret = opengl_compile_shaders(opengl, opengl->pix_fmt)) < 0)
-        goto fail;
-
-    desc = av_pix_fmt_desc_get(opengl->pix_fmt);
-    av_assert0(desc->nb_components > 0 && desc->nb_components <= 4);
-    glGenTextures(desc->nb_components, opengl->texture_name);
-
-    opengl->glprocs.glGenBuffers(2, &opengl->index_buffer);
-    if (!opengl->index_buffer || !opengl->vertex_buffer) {
-        av_log(opengl, AV_LOG_ERROR, "Buffer generation failed.\n");
-        ret = AVERROR_EXTERNAL;
-        goto fail;
-    }
-
-    opengl_configure_texture(opengl, opengl->texture_name[0], opengl->width, opengl->height);
-    if (desc->nb_components > 1) {
-        int has_alpha = desc->flags & AV_PIX_FMT_FLAG_ALPHA;
-        int num_planes = desc->nb_components - (has_alpha ? 1 : 0);
-        if (opengl->non_pow_2_textures) {
-            opengl->chroma_div_w = 1.0f;
-            opengl->chroma_div_h = 1.0f;
-        } else {
-            opengl->chroma_div_w = 1 << desc->log2_chroma_w;
-            opengl->chroma_div_h = 1 << desc->log2_chroma_h;
-        }
-        for (i = 1; i < num_planes; i++)
-            if (opengl->non_pow_2_textures)
-                opengl_configure_texture(opengl, opengl->texture_name[i],
-                        AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w),
-                        AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h));
-            else
-                opengl_configure_texture(opengl, opengl->texture_name[i], opengl->width, opengl->height);
-        if (has_alpha)
-            opengl_configure_texture(opengl, opengl->texture_name[3], opengl->width, opengl->height);
-    }
-
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, opengl->index_buffer);
-    opengl->glprocs.glBufferData(FF_GL_ELEMENT_ARRAY_BUFFER, sizeof(g_index), g_index, FF_GL_STATIC_DRAW);
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, 0);
-
-    glEnable(GL_BLEND);
-    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-    glClearColor((float)opengl->background[0] / 255.0f, (float)opengl->background[1] / 255.0f,
-                 (float)opengl->background[2] / 255.0f, 1.0f);
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    return 0;
-  fail:
-    return ret;
-}
-
-static av_cold int opengl_write_header(AVFormatContext *h)
-{
-    OpenGLContext *opengl = h->priv_data;
-    AVCodecParameters *par = h->streams[0]->codecpar;
-    AVStream *st;
-    int ret;
-
-    if (h->nb_streams != 1 ||
-        par->codec_type != AVMEDIA_TYPE_VIDEO ||
-        (par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME && par->codec_id != AV_CODEC_ID_RAWVIDEO)) {
-        av_log(opengl, AV_LOG_ERROR, "Only a single raw or wrapped avframe video stream is supported.\n");
-        return AVERROR(EINVAL);
-    }
-    st = h->streams[0];
-    opengl->width = st->codecpar->width;
-    opengl->height = st->codecpar->height;
-    opengl->pix_fmt = st->codecpar->format;
-    if (!opengl->window_width)
-        opengl->window_width = opengl->width;
-    if (!opengl->window_height)
-        opengl->window_height = opengl->height;
-
-    if (!opengl->window_title && !opengl->no_window)
-        opengl->window_title = av_strdup(h->url);
-
-    if ((ret = opengl_create_window(h)))
-        goto fail;
-
-    if ((ret = opengl_read_limits(h)) < 0)
-        goto fail;
-
-    if (opengl->width > opengl->max_texture_size || opengl->height > opengl->max_texture_size) {
-        av_log(opengl, AV_LOG_ERROR, "Too big picture %dx%d, max supported size is %dx%d\n",
-               opengl->width, opengl->height, opengl->max_texture_size, opengl->max_texture_size);
-        ret = AVERROR(EINVAL);
-        goto fail;
-    }
-
-    if ((ret = opengl_load_procedures(opengl)) < 0)
-        goto fail;
-
-    opengl_fill_color_map(opengl);
-    opengl_get_texture_params(opengl);
-
-    if ((ret = opengl_init_context(opengl)) < 0)
-        goto fail;
-
-    if ((ret = opengl_prepare_vertex(h)) < 0)
-        goto fail;
-
-    glClear(GL_COLOR_BUFFER_BIT);
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        SDL_GL_SwapWindow(opengl->window);
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to display window buffer.\n");
-        goto fail;
-    }
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    opengl->inited = 1;
-    return 0;
-
-  fail:
-    opengl_write_trailer(h);
-    return ret;
-}
-
-static uint8_t* opengl_get_plane_pointer(OpenGLContext *opengl, AVPacket *pkt, int comp_index,
-                                         const AVPixFmtDescriptor *desc)
-{
-    uint8_t *data = pkt->data;
-    int wordsize = opengl_type_size(opengl->type);
-    int width_chroma = AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w);
-    int height_chroma = AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h);
-    int plane = desc->comp[comp_index].plane;
-
-    switch(plane) {
-    case 0:
-        break;
-    case 1:
-        data += opengl->width * opengl->height * wordsize;
-        break;
-    case 2:
-        data += opengl->width * opengl->height * wordsize;
-        data += width_chroma * height_chroma * wordsize;
-        break;
-    case 3:
-        data += opengl->width * opengl->height * wordsize;
-        data += 2 * width_chroma * height_chroma * wordsize;
-        break;
-    default:
-        return NULL;
-    }
-    return data;
-}
-
-#define LOAD_TEXTURE_DATA(comp_index, sub)                                                  \
-{                                                                                           \
-    int width = sub ? AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w) : opengl->width;   \
-    int height = sub ? AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h): opengl->height; \
-    uint8_t *data;                                                                          \
-    int plane = desc->comp[comp_index].plane;                                               \
-                                                                                            \
-    glBindTexture(GL_TEXTURE_2D, opengl->texture_name[comp_index]);                         \
-    if (!is_pkt) {                                                                          \
-        GLint length = ((AVFrame *)input)->linesize[plane];                                 \
-        int bytes_per_pixel = opengl_type_size(opengl->type);                               \
-        if (!(desc->flags & AV_PIX_FMT_FLAG_PLANAR))                                        \
-            bytes_per_pixel *= desc->nb_components;                                         \
-        data = ((AVFrame *)input)->data[plane];                                             \
-        if (!(length % bytes_per_pixel) &&                                                  \
-            (opengl->unpack_subimage || ((length / bytes_per_pixel) == width))) {           \
-            length /= bytes_per_pixel;                                                      \
-            if (length != width)                                                            \
-                glPixelStorei(FF_GL_UNPACK_ROW_LENGTH, length);                             \
-            glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,                          \
-                            opengl->format, opengl->type, data);                            \
-            if (length != width)                                                            \
-                glPixelStorei(FF_GL_UNPACK_ROW_LENGTH, 0);                                  \
-        } else {                                                                            \
-            int h;                                                                          \
-            for (h = 0; h < height; h++) {                                                  \
-                glTexSubImage2D(GL_TEXTURE_2D, 0, 0, h, width, 1,                           \
-                                opengl->format, opengl->type, data);                        \
-                data += length;                                                             \
-            }                                                                               \
-        }                                                                                   \
-    } else {                                                                                \
-        data = opengl_get_plane_pointer(opengl, input, comp_index, desc);                   \
-        glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height,                              \
-                        opengl->format, opengl->type, data);                                \
-    }                                                                                       \
-}
-
-static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
-{
-    OpenGLContext *opengl = h->priv_data;
-    enum AVPixelFormat pix_fmt = h->streams[0]->codecpar->format;
-    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-    int ret;
-
-#if CONFIG_SDL2
-    /* At this point, opengl->glcontext implies opengl->glcontext */
-    if (opengl->glcontext)
-        SDL_GL_MakeCurrent(opengl->window, opengl->glcontext);
-
-    if (!opengl->no_window && (ret = opengl_sdl_process_events(h)) < 0)
-        goto fail;
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to prepare window buffer.\n");
-        goto fail;
-    }
-
-    glClear(GL_COLOR_BUFFER_BIT);
-
-    if (!repaint) {
-        if (is_pkt)
-            glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-        LOAD_TEXTURE_DATA(0, 0)
-        if (desc->flags & AV_PIX_FMT_FLAG_PLANAR) {
-            LOAD_TEXTURE_DATA(1, 1)
-            LOAD_TEXTURE_DATA(2, 1)
-            if (desc->flags & AV_PIX_FMT_FLAG_ALPHA)
-                LOAD_TEXTURE_DATA(3, 0)
-        }
-    }
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-    if ((ret = opengl_prepare(opengl)) < 0)
-        goto fail;
-
-    opengl->glprocs.glBindBuffer(FF_GL_ARRAY_BUFFER, opengl->vertex_buffer);
-    opengl->glprocs.glBindBuffer(FF_GL_ELEMENT_ARRAY_BUFFER, opengl->index_buffer);
-    opengl->glprocs.glVertexAttribPointer(opengl->position_attrib, 3, GL_FLOAT, GL_FALSE, sizeof(OpenGLVertexInfo), 0);
-    opengl->glprocs.glEnableVertexAttribArray(opengl->position_attrib);
-    opengl->glprocs.glVertexAttribPointer(opengl->texture_coords_attrib, 2, GL_FLOAT, GL_FALSE, sizeof(OpenGLVertexInfo), 12);
-    opengl->glprocs.glEnableVertexAttribArray(opengl->texture_coords_attrib);
-
-    glDrawElements(GL_TRIANGLES, FF_ARRAY_ELEMS(g_index), GL_UNSIGNED_SHORT, 0);
-
-    ret = AVERROR_EXTERNAL;
-    OPENGL_ERROR_CHECK(opengl);
-
-#if CONFIG_SDL2
-    if (!opengl->no_window)
-        SDL_GL_SwapWindow(opengl->window);
-#endif
-    if (opengl->no_window &&
-        (ret = avdevice_dev_to_app_control_message(h, AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER, NULL , 0)) < 0) {
-        av_log(opengl, AV_LOG_ERROR, "Application failed to display window buffer.\n");
-        goto fail;
-    }
-
-    return 0;
-  fail:
-    return ret;
-}
-
-static int opengl_write_packet(AVFormatContext *h, AVPacket *pkt)
-{
-    AVCodecParameters *par = h->streams[0]->codecpar;
-    if (par->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
-        AVFrame *frame = (AVFrame *)pkt->data;
-        return opengl_draw(h, frame, 0, 0);
-    } else {
-        return opengl_draw(h, pkt, 0, 1);
-    }
-}
-
-static int opengl_write_frame(AVFormatContext *h, int stream_index,
-                              AVFrame **frame, unsigned flags)
-{
-    if ((flags & AV_WRITE_UNCODED_FRAME_QUERY))
-        return 0;
-    return opengl_draw(h, *frame, 0, 0);
-}
-
-#define OFFSET(x) offsetof(OpenGLContext, x)
-#define ENC AV_OPT_FLAG_ENCODING_PARAM
-static const AVOption options[] = {
-    { "background",   "set background color",   OFFSET(background),   AV_OPT_TYPE_COLOR,  {.str = "black"}, 0, 0, ENC },
-    { "no_window",    "disable default window", OFFSET(no_window),    AV_OPT_TYPE_INT,    {.i64 = 0}, INT_MIN, INT_MAX, ENC },
-    { "window_title", "set window title",       OFFSET(window_title), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, ENC },
-    { "window_size",  "set window size",        OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, ENC },
-    { NULL }
-};
-
-static const AVClass opengl_class = {
-    .class_name = "opengl outdev",
-    .item_name  = av_default_item_name,
-    .option     = options,
-    .version    = LIBAVUTIL_VERSION_INT,
-    .category   = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
-};
-
-const FFOutputFormat ff_opengl_muxer = {
-    .p.name              = "opengl",
-    .p.long_name         = NULL_IF_CONFIG_SMALL("OpenGL output"),
-    .p.audio_codec       = AV_CODEC_ID_NONE,
-    .p.video_codec       = AV_CODEC_ID_WRAPPED_AVFRAME,
-    .p.flags             = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS,
-    .p.priv_class        = &opengl_class,
-    .priv_data_size = sizeof(OpenGLContext),
-    .write_header   = opengl_write_header,
-    .write_packet   = opengl_write_packet,
-    .write_uncoded_frame = opengl_write_frame,
-    .write_trailer  = opengl_write_trailer,
-    .control_message = opengl_control_message,
-};
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
  2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 1/2] avdevice: remove sdl2 outdev J. Dekker
  2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 2/2] avdevice: remove OpenGL device J. Dekker
@ 2024-02-04  9:19 ` Zhao Zhili
  2024-02-04  9:31   ` Anton Khirnov
  2024-02-04  9:26 ` Anton Khirnov
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 26+ messages in thread
From: Zhao Zhili @ 2024-02-04  9:19 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> On Feb 4, 2024, at 17:02, J. Dekker <jdek@itanimul.li> wrote:
> 
> With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> in master. Rather than attempting to fix it, they should be removed instead as
> there are better alternatives for debugging or viewing streams.

Please note they are broken only with fftools, they work as before when used as libavdevice
in theory. Please take this into consideration. I have no use case by myself.

> 
> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> even ffplay. For cases where the user was an application using the API they
> should supply their own renderer.
> 
> J. Dekker (2):
>  avdevice: remove sdl2 outdev
>  avdevice: remove OpenGL device
> 
> MAINTAINERS              |    3 -
> configure                |   16 -
> doc/outdevs.texi         |  105 ---
> libavdevice/Makefile     |    2 -
> libavdevice/alldevices.c |    2 -
> libavdevice/opengl_enc.c | 1313 --------------------------------------
> libavdevice/sdl2.c       |  370 -----------
> 7 files changed, 1811 deletions(-)
> delete mode 100644 libavdevice/opengl_enc.c
> delete mode 100644 libavdevice/sdl2.c
> 
> -- 
> 2.43.0
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (2 preceding siblings ...)
  2024-02-04  9:19 ` [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices Zhao Zhili
@ 2024-02-04  9:26 ` Anton Khirnov
  2024-02-04 10:11 ` Marton Balint
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: Anton Khirnov @ 2024-02-04  9:26 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Quoting J. Dekker (2024-02-04 10:02:31)
> With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> in master. Rather than attempting to fix it, they should be removed instead as
> there are better alternatives for debugging or viewing streams.
> 
> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> even ffplay. For cases where the user was an application using the API they
> should supply their own renderer.

I am in favor of this.

Even when they did "work", they were toys unsuitable for any serious
use.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:19 ` [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices Zhao Zhili
@ 2024-02-04  9:31   ` Anton Khirnov
  2024-02-04 10:08     ` Paul B Mahol
  0 siblings, 1 reply; 26+ messages in thread
From: Anton Khirnov @ 2024-02-04  9:31 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Quoting Zhao Zhili (2024-02-04 10:19:11)
> > On Feb 4, 2024, at 17:02, J. Dekker <jdek@itanimul.li> wrote:
> > 
> > With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> > 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> > in master. Rather than attempting to fix it, they should be removed instead as
> > there are better alternatives for debugging or viewing streams.
> 
> Please note they are broken only with fftools, they work as before when used as libavdevice
> in theory.

In other words, unlike any normal muxer, they are broken for any
multithreaded caller and always have been.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:31   ` Anton Khirnov
@ 2024-02-04 10:08     ` Paul B Mahol
  0 siblings, 0 replies; 26+ messages in thread
From: Paul B Mahol @ 2024-02-04 10:08 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

FFmpeg project leader never left, it is still Michael.
But now there are his minions like Anton and others.

FFmpeg is already dead project.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (3 preceding siblings ...)
  2024-02-04  9:26 ` Anton Khirnov
@ 2024-02-04 10:11 ` Marton Balint
  2024-02-04 11:36   ` Rémi Denis-Courmont
  2024-02-07 10:31   ` Anton Khirnov
  2024-02-04 11:37 ` Rémi Denis-Courmont
                   ` (3 subsequent siblings)
  8 siblings, 2 replies; 26+ messages in thread
From: Marton Balint @ 2024-02-04 10:11 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



On Sun, 4 Feb 2024, J. Dekker wrote:

> With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> in master. Rather than attempting to fix it, they should be removed instead as
> there are better alternatives for debugging or viewing streams.

Actually they work here on a linux box with OpenSuse 15.5. So even if they
are broken on some setups, they are not broken everywhere, or not more 
broken than they used to be.

Also, poper deprecation is needed here, since not only the CLI tools might 
use these. Especially since there is no drop-in replacement.

>
> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> even ffplay. For cases where the user was an application using the API they
> should supply their own renderer.

Yeah, but I never liked when people piped uncompressed data... Not 
everything that the devices support can be serialized, it is extra CPU, 
latency of the receiving app reading from pipe is a question...

I'd be a lot more happy with this if we'd offer some replacement which has 
no issues. Maybe a libplacebo based outdev.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04 10:11 ` Marton Balint
@ 2024-02-04 11:36   ` Rémi Denis-Courmont
  2024-02-04 14:55     ` Marton Balint
  2024-02-07 10:31   ` Anton Khirnov
  1 sibling, 1 reply; 26+ messages in thread
From: Rémi Denis-Courmont @ 2024-02-04 11:36 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



Le 4 février 2024 11:11:12 GMT+01:00, Marton Balint <cus@passwd.hu> a écrit :
>Actually they work here on a linux box with OpenSuse 15.5. So even if they
>are broken on some setups, they are not broken everywhere, or not more broken than they used to be.

No. They were always broken in terms of the design, and they are more technically broken than before because the threading rework exposed the design bugs from within fftools.

No sane application would use this. If it doesn't even work in fftools, it should be removed.

>Also, poper deprecation is needed here, since not only the CLI tools might use these. Especially since there is no drop-in replacement.

First it's not what would be considered an API. The removal shouldn't break source compatibility, so deprecation won't get us anything here. Where would you even put the deprecation guards?

And then deprecation only makes sense if it can be fixed. Nobody has come forward with a practical solution to make it work, probably because there is not one, at least on MacOS.

>> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
>> even ffplay. For cases where the user was an application using the API they
>> should supply their own renderer.
>
>Yeah, but I never liked when people piped uncompressed data... Not everything that the devices support can be serialized, it is extra CPU, latency of the receiving app reading from pipe is a question...

That sounds pretty minor problems for something that's purely meant for testing, and well, at least piping works.

>I'd be a lot more happy with this if we'd offer some replacement which has no issues. Maybe a libplacebo based outdev.

That's orthogonal, and you're welcome to provide patches. But AFAICT, any video output device would suffer the same problems on the same platforms. You simply can't treat video output as a generic pipeline component, at least on Windows and especially MacOS.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (4 preceding siblings ...)
  2024-02-04 10:11 ` Marton Balint
@ 2024-02-04 11:37 ` Rémi Denis-Courmont
  2024-02-04 13:15 ` Michael Niedermayer
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 26+ messages in thread
From: Rémi Denis-Courmont @ 2024-02-04 11:37 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



Le 4 février 2024 10:02:31 GMT+01:00, "J. Dekker" <jdek@itanimul.li> a écrit :
>With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
>'main' thread. This means that both the SDL2 and OpenGL output device are broken
>in master. Rather than attempting to fix it, they should be removed instead as
>there are better alternatives for debugging or viewing streams.

This is as agreed after discussed in yesterday's technical meeting. So obviously I support this patchset.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (5 preceding siblings ...)
  2024-02-04 11:37 ` Rémi Denis-Courmont
@ 2024-02-04 13:15 ` Michael Niedermayer
  2024-02-05  0:02 ` Stefano Sabatini
  2024-02-06  8:08 ` Michael Koch
  8 siblings, 0 replies; 26+ messages in thread
From: Michael Niedermayer @ 2024-02-04 13:15 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1345 bytes --]

On Sun, Feb 04, 2024 at 10:02:31AM +0100, J. Dekker wrote:
> With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> in master. Rather than attempting to fix it, they should be removed instead as
> there are better alternatives for debugging or viewing streams.

> 
> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> even ffplay. For cases where the user was an application using the API they
> should supply their own renderer.

we should point to our tools (ffplay in this case) first and foremost.

Also if they can be used, an example is needed in the documentation. This
could be in place of the removed device

Alternatively, a flag could be added to devices that specifies that they need
to be called from the main thread

This flag could switch tools which want to support this into single threaded
mode, if it doesnt fit naturally in their architecture.
While tools not supporting it could simply fail with a "unsupported" message

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04 11:36   ` Rémi Denis-Courmont
@ 2024-02-04 14:55     ` Marton Balint
  0 siblings, 0 replies; 26+ messages in thread
From: Marton Balint @ 2024-02-04 14:55 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



On Sun, 4 Feb 2024, Rémi Denis-Courmont wrote:

>
>
> Le 4 février 2024 11:11:12 GMT+01:00, Marton Balint <cus@passwd.hu> a écrit :
>> Actually they work here on a linux box with OpenSuse 15.5. So even if they
>> are broken on some setups, they are not broken everywhere, or not more broken than they used to be.
>
> No. They were always broken in terms of the design, and they are more technically broken than before because the threading rework exposed the design bugs from within fftools.
>
> No sane application would use this. If it doesn't even work in fftools, it should be removed.

As I wrote earlier, it works for me.

>
>> Also, poper deprecation is needed here, since not only the CLI tools might use these. Especially since there is no drop-in replacement.
>
> First it's not what would be considered an API. The removal shouldn't break source compatibility, so deprecation won't get us anything here. Where would you even put the deprecation guards?

See what Anton did with the BKTR device.

>
> And then deprecation only makes sense if it can be fixed. Nobody has come forward with a practical solution to make it work, probably because there is not one, at least on MacOS.

See Michael's suggestions with the thread safety flag.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (6 preceding siblings ...)
  2024-02-04 13:15 ` Michael Niedermayer
@ 2024-02-05  0:02 ` Stefano Sabatini
  2024-02-07 17:09   ` Anton Khirnov
  2024-02-06  8:08 ` Michael Koch
  8 siblings, 1 reply; 26+ messages in thread
From: Stefano Sabatini @ 2024-02-05  0:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On date Sunday 2024-02-04 10:02:31 +0100, J. Dekker wrote:
> With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
> 'main' thread. This means that both the SDL2 and OpenGL output device are broken
> in master. Rather than attempting to fix it, they should be removed instead as
> there are better alternatives for debugging or viewing streams.
> 
> The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> even ffplay. For cases where the user was an application using the API they
> should supply their own renderer.
> 
> J. Dekker (2):
>   avdevice: remove sdl2 outdev
>   avdevice: remove OpenGL device

I am against this.

1. If at all, the devices should be deprecated and removed only after a
given timeframe, so users can switch to something else (you don't know
what they are using).

2. > With the addition of threading in ffmpeg.c, the SDL2 devices no longer have the
   > 'main' thread. 

This implies a misunderstanding of what these components are. If
they are broken with ffmpeg.c this is not a good reason to remove
them (ffmpeg.c is not the only user).

Also, it was already suggested some way to fix it, it's not like they
are "broken by design", it is just that the assumptions done
previuosly apply no more. Probably ffmpeg.c should not use the main
thread or make this selectable. If this cannot be supported in a given
OS, the feature should be disabled only for that OS.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
                   ` (7 preceding siblings ...)
  2024-02-05  0:02 ` Stefano Sabatini
@ 2024-02-06  8:08 ` Michael Koch
  2024-02-06 11:45   ` Zhao Zhili
  2024-02-06 15:02   ` Vittorio Giovara
  8 siblings, 2 replies; 26+ messages in thread
From: Michael Koch @ 2024-02-06  8:08 UTC (permalink / raw)
  To: ffmpeg-devel

Removing SDL2 sounds like a very bad idea. There are many examples which 
are using these output devices, and all these examples would be broken. 
A quick search in my book
http://www.astro-electronic.de/FFmpeg_Book.pdf
finds about 40 occurences for "-f sdl" or "-f sdl2".

Michael


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-06  8:08 ` Michael Koch
@ 2024-02-06 11:45   ` Zhao Zhili
  2024-02-06 12:40     ` Nicolas George
  2024-02-06 15:02   ` Vittorio Giovara
  1 sibling, 1 reply; 26+ messages in thread
From: Zhao Zhili @ 2024-02-06 11:45 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> On Feb 6, 2024, at 16:08, Michael Koch <astroelectronic@t-online.de> wrote:
> 
> Removing SDL2 sounds like a very bad idea. There are many examples which are using these output devices, and all these examples would be broken. A quick search in my book
> http://www.astro-electronic.de/FFmpeg_Book.pdf
> finds about 40 occurences for "-f sdl" or "-f sdl2".

Those examples are broken already before the patch. We are not talking about that in this thread.
Please reference 

https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg155921.html

> 
> Michael
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-06 11:45   ` Zhao Zhili
@ 2024-02-06 12:40     ` Nicolas George
  2024-02-06 20:51       ` Michael Koch
  0 siblings, 1 reply; 26+ messages in thread
From: Nicolas George @ 2024-02-06 12:40 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Zhao Zhili (12024-02-06):
> Those examples are broken already before the patch.

Funny that the people who actually use the feature had not noticed.

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-06  8:08 ` Michael Koch
  2024-02-06 11:45   ` Zhao Zhili
@ 2024-02-06 15:02   ` Vittorio Giovara
  1 sibling, 0 replies; 26+ messages in thread
From: Vittorio Giovara @ 2024-02-06 15:02 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Tue, Feb 6, 2024 at 9:08 AM Michael Koch <astroelectronic@t-online.de>
wrote:

> Removing SDL2 sounds like a very bad idea. There are many examples which
> are using these output devices, and all these examples would be broken.
> A quick search in my book
> http://www.astro-electronic.de/FFmpeg_Book.pdf
> finds about 40 occurences for "-f sdl" or "-f sdl2".
>

would it be easier/possible to fix SDL to work on any thread, instead of
keeping this odd architecture in the codebase?
-- 
Vittorio
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-06 12:40     ` Nicolas George
@ 2024-02-06 20:51       ` Michael Koch
  2024-02-07  9:35         ` Zhao Zhili
  0 siblings, 1 reply; 26+ messages in thread
From: Michael Koch @ 2024-02-06 20:51 UTC (permalink / raw)
  To: ffmpeg-devel

I didn't notice any problems with -f sdl2. I just tested again with 
Windows 11 and the latest FFmpeg build from Gyan, just 2 days old.

ffmpeg -re -f lavfi -i testsrc2=s=800x600 -t 10 -f sdl2 -

Works without any problems.

Michael

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-06 20:51       ` Michael Koch
@ 2024-02-07  9:35         ` Zhao Zhili
  2024-02-07 10:31           ` Michael Koch
  0 siblings, 1 reply; 26+ messages in thread
From: Zhao Zhili @ 2024-02-07  9:35 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> On Feb 7, 2024, at 04:51, Michael Koch <astroelectronic@t-online.de> wrote:
> 
> I didn't notice any problems with -f sdl2. I just tested again with Windows 11 and the latest FFmpeg build from Gyan, just 2 days old.
> 
> ffmpeg -re -f lavfi -i testsrc2=s=800x600 -t 10 -f sdl2 -
> 
> Works without any problems.

It works until move or resize the window. As far as I know, it’s broken on Linux/macOS/Windows, so not
“works without any problems”.

SDL should be run in main thread, that’s all, although we can do render in separate thread with vulkan.
It’s easy to create a video sink filter to do render, and setup a window on fftools/ffmpeg main thread,
or implement the whole preview task just inside fftools. Not everyone agrees on the preview feature
with ffmpeg, not to mention libSDL.

> 
> Michael
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-07  9:35         ` Zhao Zhili
@ 2024-02-07 10:31           ` Michael Koch
  0 siblings, 0 replies; 26+ messages in thread
From: Michael Koch @ 2024-02-07 10:31 UTC (permalink / raw)
  To: ffmpeg-devel

> It works until move or resize the window.

yes, that's right. I didn't notice because I didn't try to move or resize the window.

My point is: Removing SDL would break many examples that can be found in the internet.

Michael


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-04 10:11 ` Marton Balint
  2024-02-04 11:36   ` Rémi Denis-Courmont
@ 2024-02-07 10:31   ` Anton Khirnov
  2024-02-07 12:13     ` Nicolas George
  1 sibling, 1 reply; 26+ messages in thread
From: Anton Khirnov @ 2024-02-07 10:31 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Quoting Marton Balint (2024-02-04 11:11:12)
> > The 'pipe:' output can be used with a real video player such as mpv, vlc, or
> > even ffplay. For cases where the user was an application using the API they
> > should supply their own renderer.
> 
> Yeah, but I never liked when people piped uncompressed data... Not 
> everything that the devices support can be serialized,

For instance? What do these devices support that e.g. NUT does not?

> it is extra CPU, latency of the receiving app reading from pipe is a
> question...

People keep saying this in defence of these devices, but never support
such claims with any data. I have doubts this is an actual problem in
practice.

> I'd be a lot more happy with this if we'd offer some replacement which has 
> no issues. Maybe a libplacebo based outdev.

I don't think it's possible to have such a replacement, neither should
we try. Muxer API is simply the wrong abstraction for playback.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-07 10:31   ` Anton Khirnov
@ 2024-02-07 12:13     ` Nicolas George
  0 siblings, 0 replies; 26+ messages in thread
From: Nicolas George @ 2024-02-07 12:13 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Anton Khirnov (12024-02-07):
> For instance? What do these devices support that e.g. NUT does not?

Returning the latency of the device.

> neither should we try.

This is the libav mindset we do not want in FFmpeg.

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-05  0:02 ` Stefano Sabatini
@ 2024-02-07 17:09   ` Anton Khirnov
  2024-02-07 17:37     ` Nicolas George
  0 siblings, 1 reply; 26+ messages in thread
From: Anton Khirnov @ 2024-02-07 17:09 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Quoting Stefano Sabatini (2024-02-05 01:02:20)
> This implies a misunderstanding of what these components are. If
> they are broken with ffmpeg.c this is not a good reason to remove
> them (ffmpeg.c is not the only user).

They are broken with _any_ caller that happens to call libavformat from
a thread other than the main one. Since libavformat API does not impose
any such restrictions on its callers, these devices are broken in
general.

> Also, it was already suggested some way to fix it

There is no way to fix them other than impose new restrictions on
callers...

> it's not like they are "broken by design",

...so they are precisely broken by design.

-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-07 17:09   ` Anton Khirnov
@ 2024-02-07 17:37     ` Nicolas George
  2024-02-07 17:40       ` Vittorio Giovara
  0 siblings, 1 reply; 26+ messages in thread
From: Nicolas George @ 2024-02-07 17:37 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Anton Khirnov (12024-02-07):
> ...so they are precisely broken by design.

Words words words.

Words to try and hide that something used to work for people and now you
are done with it it no longer works.

Exactly the kind of attitude that killed libav, killing FFmpeg now.

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-07 17:37     ` Nicolas George
@ 2024-02-07 17:40       ` Vittorio Giovara
  2024-02-07 22:27         ` Paul B Mahol
  0 siblings, 1 reply; 26+ messages in thread
From: Vittorio Giovara @ 2024-02-07 17:40 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, Feb 7, 2024 at 6:38 PM Nicolas George <george@nsup.org> wrote:

> Anton Khirnov (12024-02-07):
> > ...so they are precisely broken by design.
>
> Words words words.
>
> Words to try and hide that something used to work for people and now you
> are done with it it no longer works.
>
> Exactly the kind of attitude that killed libav, killing FFmpeg now.
>
>
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
-- 
Vittorio
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices
  2024-02-07 17:40       ` Vittorio Giovara
@ 2024-02-07 22:27         ` Paul B Mahol
  0 siblings, 0 replies; 26+ messages in thread
From: Paul B Mahol @ 2024-02-07 22:27 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, Feb 7, 2024 at 6:40 PM Vittorio Giovara <vittorio.giovara@gmail.com>
wrote:

> On Wed, Feb 7, 2024 at 6:38 PM Nicolas George <george@nsup.org> wrote:
>
> > Anton Khirnov (12024-02-07):
> > > ...so they are precisely broken by design.
> >
> > Words words words.
> >
> > Words to try and hide that something used to work for people and now you
> > are done with it it no longer works.
> >
> > Exactly the kind of attitude that killed libav, killing FFmpeg now.
> >
> >
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> --
> Vittorio
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>

What about subtitles support, they are also very broken.

When subtitles support will be removed soonTM?
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-02-07 22:28 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04  9:02 [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices J. Dekker
2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 1/2] avdevice: remove sdl2 outdev J. Dekker
2024-02-04  9:02 ` [FFmpeg-devel] [PATCH 2/2] avdevice: remove OpenGL device J. Dekker
2024-02-04  9:19 ` [FFmpeg-devel] [PATCH 0/2] Remove SDL2 output devices Zhao Zhili
2024-02-04  9:31   ` Anton Khirnov
2024-02-04 10:08     ` Paul B Mahol
2024-02-04  9:26 ` Anton Khirnov
2024-02-04 10:11 ` Marton Balint
2024-02-04 11:36   ` Rémi Denis-Courmont
2024-02-04 14:55     ` Marton Balint
2024-02-07 10:31   ` Anton Khirnov
2024-02-07 12:13     ` Nicolas George
2024-02-04 11:37 ` Rémi Denis-Courmont
2024-02-04 13:15 ` Michael Niedermayer
2024-02-05  0:02 ` Stefano Sabatini
2024-02-07 17:09   ` Anton Khirnov
2024-02-07 17:37     ` Nicolas George
2024-02-07 17:40       ` Vittorio Giovara
2024-02-07 22:27         ` Paul B Mahol
2024-02-06  8:08 ` Michael Koch
2024-02-06 11:45   ` Zhao Zhili
2024-02-06 12:40     ` Nicolas George
2024-02-06 20:51       ` Michael Koch
2024-02-07  9:35         ` Zhao Zhili
2024-02-07 10:31           ` Michael Koch
2024-02-06 15:02   ` Vittorio Giovara

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git