From: "J. Dekker" <jdek@itanimul.li> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Date: Wed, 21 Feb 2024 12:33:55 +0100 Message-ID: <20240221113356.203887-1-jdek@itanimul.li> (raw) Signed-off-by: J. Dekker <jdek@itanimul.li> --- doc/outdevs.texi | 2 +- libavdevice/opengl_enc.c | 11 +++++++++++ libavdevice/version_major.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/outdevs.texi b/doc/outdevs.texi index f0484bbf8f..941429a8c8 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -302,7 +302,7 @@ 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. +OpenGL output device. Deprecated and will be removed. To enable this output device you need to configure FFmpeg with @code{--enable-opengl}. diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index b2ac6eb16a..69de6fad03 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -224,6 +224,8 @@ typedef struct OpenGLContext { int picture_height; ///< Rendered height int window_width; int window_height; + + int warned; } OpenGLContext; static const struct OpenGLFormatDesc { @@ -1060,6 +1062,15 @@ static av_cold int opengl_write_header(AVFormatContext *h) AVStream *st; int ret; + if (!opengl->warned) { + av_log(opengl, AV_LOG_WARNING, + "The opengl output device is deprecated due to being fundamentally incompatible with libavformat API. " + "For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n" + "Example: ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay -\n" + ); + opengl->warned = 1; + } + 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)) { diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h index 9f7b79b2ee..da5854ed4c 100644 --- a/libavdevice/version_major.h +++ b/libavdevice/version_major.h @@ -35,5 +35,7 @@ // reminder to remove the bktr device on next major bump #define FF_API_BKTR_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) +// reminder to remove the opengl device on next major bump +#define FF_API_OPENGL_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) #endif /* AVDEVICE_VERSION_MAJOR_H */ -- 2.43.2 _______________________________________________ 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".
next reply other threads:[~2024-02-21 11:34 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-21 11:33 J. Dekker [this message] 2024-02-21 11:33 ` [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev J. Dekker 2024-02-21 12:32 ` [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev Lynne 2024-02-26 15:43 ` Anton Khirnov 2024-02-28 9:31 ` J. Dekker 2024-02-26 16:47 ` Jan Ekström 2024-02-27 1:42 ` Zhao Zhili
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240221113356.203887-1-jdek@itanimul.li \ --to=jdek@itanimul.li \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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