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 5F98041071 for ; Sun, 13 Feb 2022 12:08:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC76B68ADDC; Sun, 13 Feb 2022 14:08:55 +0200 (EET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A945968AD9E for ; Sun, 13 Feb 2022 14:08:48 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id EF00E240006 for ; Sun, 13 Feb 2022 12:08:47 +0000 (UTC) Date: Sun, 13 Feb 2022 13:08:46 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220213120846.GE2829255@pb2> References: <20220212001301.4090-1-jamrial@gmail.com> <20220212120802.GB2829255@pb2> <42e8b38e-60da-cbbb-85ea-94f3ce73b49a@gmail.com> MIME-Version: 1.0 In-Reply-To: <42e8b38e-60da-cbbb-85ea-94f3ce73b49a@gmail.com> Subject: Re: [FFmpeg-devel] [RFC][PATCH 1/4] avutil/frame: add an internal field to store the size of AVFrame 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: multipart/mixed; boundary="===============3560631967130654346==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3560631967130654346== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jTEP+BGvTg7HpCJH" Content-Disposition: inline --jTEP+BGvTg7HpCJH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 12, 2022 at 09:16:36AM -0300, James Almer wrote: > On 2/12/2022 9:08 AM, Michael Niedermayer wrote: > > On Fri, Feb 11, 2022 at 09:12:58PM -0300, James Almer wrote: > > > This is unfortunately needed to remove (or reduce the awfulness) of c= ertain > > > modules violating the AVFrame API and using sizeof(AVFrame). > > > With this, the sizeof(AVFrame) value of the libavutil loaded at runti= me can be > > > used instead of the compile time value of whatever library included f= rame.h > > >=20 > > > Signed-off-by: James Almer > > > --- > > > This is sucks, but at least less so than the current situation. > > >=20 > > > I don't see wrapped_avframe going away anytime soon, so something mus= t be done, > > > and last time i tried to change how the packets are generated my appr= oach was > > > shut down, so here's another attempt. > >=20 > > iam probably missing something but if the goal is to wrap AVFrame in so= me > > other structure as a array or buffer > > without the sizeof(AVFrame) cant the wraping/unwraping code be put in > > libavutil ? >=20 > How would that fix the situation of setting AVPacket.size to sizeof(AVFra= me) > and AVPacket.data to an structure that big + padding bytes in packets > returned to the caller? If you had a function which turned a AVFrame into a AVBufferRef pkt->data =3D buf->data; pkt->size =3D buf->size; If done carefully, this might work even independant of how that function does it, by reference, copy or full serialization If that direction would be pursued (possibly later), the wraping function could have a flag that switches between zero copy reference and=20 full serialization of AVFrames which could be passed accross a network=20 or stored on disk and used later/elsewhere thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch --jTEP+BGvTg7HpCJH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYgj0ywAKCRBhHseHBAsP qweBAJ9Cqga3Le9tf9aHv4JMXyyL6pMl7wCfevXPRyMd+6W8KKKvZTe99gDG2gs= =32By -----END PGP SIGNATURE----- --jTEP+BGvTg7HpCJH-- --===============3560631967130654346== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============3560631967130654346==--