* [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev
@ 2024-02-13 7:34 J. Dekker
2024-02-13 7:34 ` [FFmpeg-devel] [PATCH 2/2] avdevice: deprecate sdl outdev J. Dekker
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: J. Dekker @ 2024-02-13 7:34 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: J. Dekker <jdek@itanimul.li>
---
These devices are fundamentally broken and usecases should be switched
away from output devices in general. Discussion in the thread tended towards
deprecation rather than immediate removal to give time for users to figure out
the best alternatives for their usecase.
libavdevice/opengl_enc.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index b2ac6eb16a..0c81ccc1c4 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,14 @@ 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. For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
+ "Example: ffmpeg -i input.mkv -f nut - | 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)) {
--
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] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avdevice: deprecate sdl outdev
2024-02-13 7:34 [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev J. Dekker
@ 2024-02-13 7:34 ` J. Dekker
2024-02-13 10:15 ` [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev Marton Balint
2024-02-15 16:20 ` Anton Khirnov
2 siblings, 0 replies; 4+ messages in thread
From: J. Dekker @ 2024-02-13 7:34 UTC (permalink / raw)
To: ffmpeg-devel
Signed-off-by: J. Dekker <jdek@itanimul.li>
---
libavdevice/sdl2.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c
index 342a253dc0..6a6751e40f 100644
--- a/libavdevice/sdl2.c
+++ b/libavdevice/sdl2.c
@@ -51,6 +51,7 @@ typedef struct {
SDL_Rect texture_rect;
int inited;
+ int warned;
} SDLContext;
static const struct sdl_texture_format_entry {
@@ -165,6 +166,14 @@ static int sdl2_write_header(AVFormatContext *s)
int i, ret = 0;
int flags = 0;
+ if (!sdl->warned) {
+ av_log(sdl, AV_LOG_WARNING,
+ "The sdl output device is deprecated. For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
+ "Example: ffmpeg -i input.mkv -f nut - | ffplay \n"
+ );
+ sdl->warned = 1;
+ }
+
if (!sdl->window_title)
sdl->window_title = av_strdup(s->url);
--
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev
2024-02-13 7:34 [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-13 7:34 ` [FFmpeg-devel] [PATCH 2/2] avdevice: deprecate sdl outdev J. Dekker
@ 2024-02-13 10:15 ` Marton Balint
2024-02-15 16:20 ` Anton Khirnov
2 siblings, 0 replies; 4+ messages in thread
From: Marton Balint @ 2024-02-13 10:15 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Tue, 13 Feb 2024, J. Dekker wrote:
> Signed-off-by: J. Dekker <jdek@itanimul.li>
> ---
>
> These devices are fundamentally broken and usecases should be switched
> away from output devices in general. Discussion in the thread tended towards
> deprecation rather than immediate removal to give time for users to figure out
> the best alternatives for their usecase.
>
> libavdevice/opengl_enc.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
> index b2ac6eb16a..0c81ccc1c4 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,14 @@ 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. For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
> + "Example: ffmpeg -i input.mkv -f nut - | ffplay \n"
The example seems wrong. Let's try to provide one which is working and is
more similar to the old use (does not reencode the video):
-f nut -c:v rawvideo - | ffplay -
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev
2024-02-13 7:34 [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-13 7:34 ` [FFmpeg-devel] [PATCH 2/2] avdevice: deprecate sdl outdev J. Dekker
2024-02-13 10:15 ` [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev Marton Balint
@ 2024-02-15 16:20 ` Anton Khirnov
2 siblings, 0 replies; 4+ messages in thread
From: Anton Khirnov @ 2024-02-15 16:20 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Quoting J. Dekker (2024-02-13 08:34:25)
> Signed-off-by: J. Dekker <jdek@itanimul.li>
> ---
>
> These devices are fundamentally broken and usecases should be switched
> away from output devices in general. Discussion in the thread tended towards
> deprecation rather than immediate removal to give time for users to figure out
> the best alternatives for their usecase.
>
> libavdevice/opengl_enc.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
> index b2ac6eb16a..0c81ccc1c4 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,14 @@ 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. For monitoring purposes in ffmpeg you can output to a file or use pipes and a video player.\n"
Besides Marton's comment, this could also elaborate a little on why it
is deprecated, e.g. "...due to being fundamentally incompatible with
libavformat API".
Also, could add a removal remind to version_major.h, similar to
FF_CODEC_CRYSTAL_HD.
Other than those, looks good to me.
--
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] 4+ messages in thread
end of thread, other threads:[~2024-02-15 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 7:34 [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev J. Dekker
2024-02-13 7:34 ` [FFmpeg-devel] [PATCH 2/2] avdevice: deprecate sdl outdev J. Dekker
2024-02-13 10:15 ` [FFmpeg-devel] [PATCH 1/2] avdevice: deprecate opengl outdev Marton Balint
2024-02-15 16:20 ` Anton Khirnov
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