History

avdevice: deprecate opengl outdev

J. Dekker committed 2 years ago

Commit e4c0cdf1 parent 570052c3 files · +14 −1Browse files

Unified · Split

3 files
  1. doc/outdevs.texi +1 −1
  2. libavdevice/opengl_enc.c +11 −0
  3. libavdevice/version_major.h +2 −0
doc/outdevs.texi+1−1
@@ -302,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0 · 301 unmodified lines
302302 See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
303303
304304 @section opengl
305−OpenGL output device.
305+OpenGL output device. Deprecated and will be removed.
306306
307307 To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
308308
libavdevice/opengl_enc.c+11−0
@@ -224,6 +224,8 @@ typedef struct OpenGLContext { · 223 unmodified lines
224224 int picture_height; ///< Rendered height
225225 int window_width;
226226 int window_height;
227+
228+ int warned;
227229 } OpenGLContext;
228230
229231 static const struct OpenGLFormatDesc {
@@ -1060,6 +1062,15 @@ static av_cold int opengl_write_header(AVFormatContext *h) · 830 unmodified lines
10601062 AVStream *st;
10611063 int ret;
10621064
1065+ if (!opengl->warned) {
1066+ av_log(opengl, AV_LOG_WARNING,
1067+ "The opengl output device is deprecated due to being fundamentally incompatible with libavformat API. "
1068+ "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
1069+ "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n"
1070+ );
1071+ opengl->warned = 1;
1072+ }
1073+
10631074 if (h->nb_streams != 1 ||
10641075 par->codec_type != AVMEDIA_TYPE_VIDEO ||
10651076 (par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME && par->codec_id != AV_CODEC_ID_RAWVIDEO)) {
libavdevice/version_major.h+2−0
@@ -35,5 +35,7 @@ · 34 unmodified lines
3535
3636 // reminder to remove the bktr device on next major bump
3737 #define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
38+// reminder to remove the opengl device on next major bump
39+#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
3840
3941 #endif /* AVDEVICE_VERSION_MAJOR_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t