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 D6AD643947 for ; Sun, 3 Jul 2022 13:41:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C63F668B9DB; Sun, 3 Jul 2022 16:40:58 +0300 (EEST) Received: from btbn.de (btbn.de [136.243.74.85]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F0F1D68B8AF for ; Sun, 3 Jul 2022 16:40:52 +0300 (EEST) Received: from [authenticated] by btbn.de (Postfix) with ESMTPSA id 9506E351486; Sun, 3 Jul 2022 15:40:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rothenpieler.org; s=mail; t=1656855652; bh=8QmFR30ldq0LYSahaiZ/Dsgyb/ty94EWI3AXPgwY/+E=; h=Date:Subject:To:References:Cc:From:In-Reply-To; b=HwBtyVJptmlYY/2PoCNziL5E+pIT71fKfqaGl35BcageOrXPSRHBBqz0I/7xmgYlH D2XITltH7PTVjpgXMVY8mC4QpXYzlKQUz5vJRkz3Xyi0UxvYFuReVQwaz/83zfs+9a 1Es5/sdECU88aV5VMmU38adkL+dNihiPjQ2Rq7nrZlpieV2l5I8Wh9Knl/qAG2b2Jm QRgmk5KUxhIvyGUXl7u8eMsBvO0N57TB7ES58JhOCPmhvN/ysDmB1Jsi7CmNQJgnwB nfSRYTLoZfciwUaWML2Ctb06fkyUNHfD+lG2kzqbUvMPmWtsItD/A+LKmrGwEJ416Q b3p1dD1w2Z6kA== Message-ID: <83fdaa4a-e5f3-2520-9cad-0c2a4b75e71a@rothenpieler.org> Date: Sun, 3 Jul 2022 15:40:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0 To: ffmpeg-devel@ffmpeg.org References: <20220629195250.29341-1-timo@rothenpieler.org> Content-Language: en-US From: Timo Rothenpieler In-Reply-To: Subject: Re: [FFmpeg-devel] [RFC] avdevice/lavfi: output wrapped AVFrames 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 Cc: Nicolas George Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 03.07.2022 15:19, Nicolas George wrote: > Timo Rothenpieler (12022-06-29): >> The lavfi avdevice as it is right now can't output "special frames" >> like hardware frames. >> This patch makes the lavfi avdevice output wrapped AVFrames instead >> of copying the actual data, greatly simplifying it in the process. > > Thanks for the patch. I am not familiar with the hardware frame > infrastructure, but this patch makes the whole code much simpler, and > assumedly more efficient to boot. That makes it worth it for that reason > alone. Make sure to take a look at the non-RFC version of this patch I sent. It sadly is a bit more complex again, since wrapped avframes only work for video frames after all. But copying audio data is not nearly as heavy weight as copying whole video frames. Plus, there are no hardware-audio-frames. > If it also allows to use hardware frames, even in a limited or fragile > way, it is a bonus. I do not see how anybody could object. > >> I am not at all sure if this has some unexpected consequences. >> It works just fine with ffmpeg.c, but it might be an ABI break for >> potential library consumers? > > I think the case can be made for both positions: on one hand, an > application should not assume a demuxer will output any kind of frame > and should be ready for wrapped AVFrame; on the other hand, devices are > special and somebody who uses a specific device on purpose may make > assumptions on its behavior. > > I think this case is fringe enough that we can accept the break, at > least if the device only outputs normal frames by default, not hardware > frames. Yeah, I'm also leaning in that direction. And full proper implementation won't care what kind of packets come out of it. Plus I can't really think of any API consumer that'd possibly implement a lavfi.c based device and then also hardcodes the assumption what kind of packets it outputs. So once the issue Michael discovered is ironed out, I'd be inclined to apply it, after some more testing. _______________________________________________ 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".