From patchwork Wed Feb 21 11:33:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Dekker" X-Patchwork-Id: 46415 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1b29:b0:19e:cdac:8cce with SMTP id ch41csp238411pzb; Wed, 21 Feb 2024 03:34:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV/ph/xdcgP49M1kbmyxbOPZXBmhDKFTGW26TK+eTzYTMif5mxuki2B4W31PXF4T1tAnfsNCnlKcRrZ6LKbMuJBFdJ/M2zjKsyznA== X-Google-Smtp-Source: AGHT+IGqd2LE3O4Qg90gZeM7uybAlVfiizC48oZHzgToVnrO+WM9ltb10Kdx1RJCoDUMSl9xQqmn X-Received: by 2002:a05:6402:38e:b0:565:12c5:4df6 with SMTP id o14-20020a056402038e00b0056512c54df6mr273656edv.31.1708515249928; Wed, 21 Feb 2024 03:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708515249; cv=none; d=google.com; s=arc-20160816; b=u+nWO5KSqkN2NDPGyHBoZwMyY99RlEVYs0C3uf+LJH0JxXUe3e5hXp7jAca55oqsmG Bg7eidTpdTpVswzB7DRRPEjta5IMryvsyG6Xgl+niGrz8pZ19tywX2+f5sCkpysumDgP BhIrQkImeySfV4i3ey2xFk7za0pG9DY9gfq9InteDb5+nFOoP13uukN4G+1dRmtKtx9Z //WAb4Q5j/Q6ADM3OcOx9bA2q6yK+wslHycwpEHgzOjMQ/VcH+bsYmgJWvcOaj3su73p soXFTlAGwovc+Xkoix8+8dWLnuEA0Cx+1ySNlQLBxTEOwXQYxN74+Vgqhf3pqE9bFomC 7Z3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from:feedback-id :dkim-signature:dkim-signature:delivered-to; bh=QWgtyndT9+LxFvDfMimH9ExK05TRXAWBvoo4LFZeV7w=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=joglkdwvRfdHl/inL1hJXZDA05dtuVu7LKsAedcfFgin58saBfJUHJytyyY/23nLnO aLnjvlrTPQq7WvIYMZQTrxd/riXhegtxCNpD0R2qB0qx8x7dAhXONopEI77CJGXQPOeR T1eCRmyPJxZxQqBwtyfPrlOewC19yIYxnzlH8PWwwdwPTzan7JhG26vIu+ODaNrSNB5u 4rlB+C5YQZmbvgeQY9hkfN/0vnmrl3CgApJGOk7vGd9H5Llx0l4tQ378g/j5LtcLhwUN CiPAvplod02KV704ItKL52PFR6MIbcQ6p+ue00BMYq2Foas8BD1i7wSggR7syFV79ESy UA1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm2 header.b=kNm8kA5b; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b=qtzJ9zPu; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c15-20020aa7c98f000000b00564d94c563dsi1140101edt.286.2024.02.21.03.34.09; Wed, 21 Feb 2024 03:34:09 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm2 header.b=kNm8kA5b; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b=qtzJ9zPu; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F290B68D1BC; Wed, 21 Feb 2024 13:34:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AF1FC68D19B for ; Wed, 21 Feb 2024 13:33:59 +0200 (EET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 638EA11400B0 for ; Wed, 21 Feb 2024 06:33:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 21 Feb 2024 06:33:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itanimul.li; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1708515238; x=1708601638; bh=8W5M9ElaX4KVU1lnWUQsh kv5nY1Sg5VesuUZc2ulVb8=; b=kNm8kA5bfPIf9kbZBlTA7QLNqa6K2qiFi+mFz 60w8SyBKpclaHikGoTPyqiHA15T/Ime3c7jJwq0UXyYhOTM8UetqvJn9nqOeuKgo iWr5Hsz4SOrmrtQcMa2QUnulbJEy3uD4ElHaHcH55J7OGYY1mdUnSvbUj8teR8Vb bkf0ZueeqjfoZfF6h5P7YQTOWXputgCbxFwTk38uXmTahBRpos1IBI6g9e7Hud4s Ef1+v4dl74vqwaxxytgFk/2J0ZNTBXRSmmZfLITJenmbH+4PqlNyfCeKl6aMWtTs uZo++K+eBWtnxjNvZKKFNoViR+X3t2ovVxc62EmtX4keIMLkw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708515238; x=1708601638; bh=8W5M9ElaX4KVU1lnWUQshkv5nY1S g5VesuUZc2ulVb8=; b=qtzJ9zPuUbLgncIKwGeQl+uZewCJ+j9HH1CWME+PPk5y sKmPYAhtyMhKuDuml8eT3/Yw/iQ4mZFW4t320UQlyjoL1nDMbd1TAwYpVjiVTst1 O21defp0Yf44rjP0vzXEw5uG7yiN5TSTUZ60CM95Pr1UHkGxm74zwnDptLiG+fcy ifL9jrbwHtOrwI0MJcrFQRBQkqMxpio92+b0TOri1ajfxKUOd4d6o2Znql4lRHEq 0KEYgw1XniDnPsZ62N2js4LvGGVm3ocElYOaD5m4n+kporNymA3aCxutuJnVNX14 GnNlG0+1O2BDNDaLpcU16OIssWePWKhKGuOB4oh7Ag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenuc fjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepfdflrdcuffgvkhhk vghrfdcuoehjuggvkhesihhtrghnihhmuhhlrdhliheqnecuggftrfgrthhtvghrnhepue evieethefgteffgefhkeeutdetudeikeeifffgleeufeetffekieffvdejhfevnecuffho mhgrihhnpehsohhurhgtvghfohhrghgvrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepjhguvghksehithgrnhhimhhulhdrlhhi X-ME-Proxy: Feedback-ID: i84994747:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 21 Feb 2024 06:33:57 -0500 (EST) From: "J. Dekker" To: ffmpeg-devel@ffmpeg.org Date: Wed, 21 Feb 2024 12:33:55 +0100 Message-ID: <20240221113356.203887-1-jdek@itanimul.li> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] avdevice: deprecate opengl outdev X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8dt9b08BYGyY Signed-off-by: J. Dekker --- 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 */ From patchwork Wed Feb 21 11:33:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Dekker" X-Patchwork-Id: 46416 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1b29:b0:19e:cdac:8cce with SMTP id ch41csp238493pzb; Wed, 21 Feb 2024 03:34:19 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV49hROjdEl3xcIVCxVjKju+m7SF54GJrJ+Fvvx20ia1qvVpVsoxdJVAnTIle/AYpQnUPpdcoBs3URAOGQQsUoSpieTDzFR7/kIiA== X-Google-Smtp-Source: AGHT+IHHI0W1XwD8oy/BRvClGoRJ6MqM9gFqPRoVQvKgB+g8PWqDiMIgscxnAcsQskyWex3hgpgj X-Received: by 2002:aa7:c655:0:b0:561:548e:e4c4 with SMTP id z21-20020aa7c655000000b00561548ee4c4mr12793678edr.19.1708515259188; Wed, 21 Feb 2024 03:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708515259; cv=none; d=google.com; s=arc-20160816; b=yRcfzaVA2ACOQRFQEkpasx7KmuM+DyMET13fflUx/3Zp+avfYh0qxGQ4lTJ85THdDp erU/x8fdYdChpgtcbiQ0pkuol67iaBs+HZ/dDILT6VNF5gQZ3V4EYPka+nqEFI3IVSJR wZB75S1jErYa2+QgSQCZuSL05jPaF4UkRMeTy+Ym0J53e3g+d6pcKtLQNvaI0QgQPQ9K 8bLPesZw2qR4fxumDuWiH7GjhNwr5xGelVckwftt2p4d7rsDjXHTsMfzLhE6x7nAQm+9 mwumWOMH8h9bp4UNu7cE2h28ZFzv+tXRTCegdEJXVRem4d70j+6L2oeK9LodO0zd+Efx YEVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:feedback-id:dkim-signature:dkim-signature:delivered-to; bh=wijjcrdB88vZnNIZhJPQrFHa1LTi0CpultDRTNfCQl0=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=YtvIeIZdLVDYnkRGmkwurkvi+g6k4y4lHMIbWV1StUZVQqspRhfkMS9mG2z9CadSwI OVMuJM3kWX2k7r4jzyohSx05DK9tCLlvYxgmA57aDL/90ipdR9H6GbHiIlP+VIqSfD5c EvKd8IKDRQBZufqPORllfO+jSv1Zy9YrtixVcBrumzL9YwVzWNo+b7AbWqHOpdJpXw75 be3+IiCAdEwcVHozzG70BbAxyIIqTe6sVykQH06W5v8gdt1rd4nWuJD9IW31caBdSPTS Bxr5IOiBge+IbyVVIsmLuGvNKM92dZjxwUyVGfxBnYzgJ/vGJRzYSpWjhVtIj94XoNBr FBjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm2 header.b=MlaGo4Uv; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b="lWR6/GB1"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cy28-20020a0564021c9c00b00563e973660asi4273806edb.100.2024.02.21.03.34.18; Wed, 21 Feb 2024 03:34:19 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li header.s=fm2 header.b=MlaGo4Uv; dkim=neutral (body hash did not verify) header.i=@messagingengine.com header.s=fm1 header.b="lWR6/GB1"; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2BB3968D1A8; Wed, 21 Feb 2024 13:34:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from fhigh4-smtp.messagingengine.com (fhigh4-smtp.messagingengine.com [103.168.172.155]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4026068D1BE for ; Wed, 21 Feb 2024 13:34:01 +0200 (EET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 5224011400AA for ; Wed, 21 Feb 2024 06:34:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 21 Feb 2024 06:34:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itanimul.li; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1708515240; x= 1708601640; bh=pkqoGx+S5zUgNwcM9ncn8W2opQRsFBYJ7IhhhRtU69g=; b=M laGo4Uvq1xUUzH6vp6FUfkwEDfWMidwjqLcO0SdhQogsuIySf6dUtkdp78GOHjuP mhi1mZtkaYEqFNl32say81lKYQxBLabomnvNb4HVwF41T1MkkszUywlJ1lepbMs7 cCecTGyVYR9djskJEIL3jJ+eHBGlF9vY/etblqgWYOYAHktuzQ+uHoT8+Q0E957t /msdbV3YoLVsEFTosujx6/V18/4VzMLTe25NGfLhXyjhz57pdU0nO/auHnKpgq4L Ifjulozen4Td7Fz7N1XlJtWbYQYmCW8YvyT9nEOTf/VPS9+M4VES5gau9mHZ0kSY zxWorjGvoCbqbxQtezUSA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1708515240; x=1708601640; bh=pkqoGx+S5zUgN wcM9ncn8W2opQRsFBYJ7IhhhRtU69g=; b=lWR6/GB1guSA9okg7bd+wg+kr3pLU YLL7b4Fu30+0CQ27yP6ncuPBYM4oWo/G1X/h6u+YFriQJGzvcSKrOtUoHcwcCKC9 fEJbwbcYF1WhUSpF3mCcvbQn40AxzjpY3O9cD/8IwyHwSZdZmeaYTtoznkvsqxcn TJv7HrgnMxxxx9292Ja/VvoZyzlAt+Q7iek/7alU9QEHoRppzmytDl5Qi9j+pZHh sSQHQUOIpBozJPUFcEMsgLC05QU7CG4VzLDqdhJ4QehUzmaQ82NZ1c8d0vuKlf1I 2pr1t/SDZcYw84dicPf142yJe2z1bgUvdKlSkKWkRgkuTc2KaOaGDHVhg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpedflfdrucffvghkkhgvrhdfuceojhguvghksehithgrnhhimhhu lhdrlhhiqeenucggtffrrghtthgvrhhnpeegvdfhffduudegheevieekieeffefgveffke dtheekieefhfevueetueefhfetteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehjuggvkhesihhtrghnihhmuhhlrdhlih X-ME-Proxy: Feedback-ID: i84994747:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 21 Feb 2024 06:33:59 -0500 (EST) From: "J. Dekker" To: ffmpeg-devel@ffmpeg.org Date: Wed, 21 Feb 2024 12:33:56 +0100 Message-ID: <20240221113356.203887-2-jdek@itanimul.li> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221113356.203887-1-jdek@itanimul.li> References: <20240221113356.203887-1-jdek@itanimul.li> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/2] avdevice: deprecate sdl outdev X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: IzyBES2gEk1y Signed-off-by: J. Dekker --- doc/outdevs.texi | 8 +++++++- libavdevice/sdl2.c | 10 ++++++++++ libavdevice/version_major.h | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/outdevs.texi b/doc/outdevs.texi index 941429a8c8..9ee857528e 100644 --- a/doc/outdevs.texi +++ b/doc/outdevs.texi @@ -408,7 +408,13 @@ ffmpeg -i INPUT -f pulse "stream name" @section sdl -SDL (Simple DirectMedia Layer) output device. +SDL (Simple DirectMedia Layer) output device. Deprecated and will be removed. + +For monitoring purposes in FFmpeg, pipes and a video player such as ffplay can be used: + +@example +ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay - +@end example "sdl2" can be used as alias for "sdl". diff --git a/libavdevice/sdl2.c b/libavdevice/sdl2.c index 342a253dc0..ec3c3d19b5 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,15 @@ 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 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" + ); + sdl->warned = 1; + } + if (!sdl->window_title) sdl->window_title = av_strdup(s->url); diff --git a/libavdevice/version_major.h b/libavdevice/version_major.h index da5854ed4c..6e04e0939d 100644 --- a/libavdevice/version_major.h +++ b/libavdevice/version_major.h @@ -37,5 +37,7 @@ #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) +// reminder to remove the sdl2 device on next major bump +#define FF_API_SDL2_DEVICE (LIBAVDEVICE_VERSION_MAJOR < 62) #endif /* AVDEVICE_VERSION_MAJOR_H */