From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C4D674890A for ; Wed, 21 Feb 2024 11:34:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E02F268D1C7; Wed, 21 Feb 2024 13:34:07 +0200 (EET) 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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 */ -- 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".