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
302See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).302See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
303 303
304@section opengl304@section opengl
305OpenGL output device.305OpenGL output device. Deprecated and will be removed.
306 306
307To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.307To enable this output device you need to configure FFmpeg with @code{--enable-opengl}.
308 308
libavdevice/opengl_enc.c+11−0
@@ -224,6 +224,8 @@ typedef struct OpenGLContext { · 223 unmodified lines
224 int picture_height; ///< Rendered height224 int picture_height; ///< Rendered height
225 int window_width;225 int window_width;
226 int window_height;226 int window_height;
227
228 int warned;
227} OpenGLContext;229} OpenGLContext;
228 230
229static const struct OpenGLFormatDesc {231static const struct OpenGLFormatDesc {
@@ -1060,6 +1062,15 @@ static av_cold int opengl_write_header(AVFormatContext *h) · 830 unmodified lines
1060 AVStream *st;1062 AVStream *st;
1061 int ret;1063 int ret;
1062 1064
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
1063 if (h->nb_streams != 1 ||1074 if (h->nb_streams != 1 ||
1064 par->codec_type != AVMEDIA_TYPE_VIDEO ||1075 par->codec_type != AVMEDIA_TYPE_VIDEO ||
1065 (par->codec_id != AV_CODEC_ID_WRAPPED_AVFRAME && par->codec_id != AV_CODEC_ID_RAWVIDEO)) {1076 (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
35 35
36// reminder to remove the bktr device on next major bump36// reminder to remove the bktr device on next major bump
37#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)37#define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
38// reminder to remove the opengl device on next major bump
39#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62)
38 40
39#endif /* AVDEVICE_VERSION_MAJOR_H */41#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