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 5396E44173 for ; Tue, 30 Aug 2022 19:37:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB91B68B9FC; Tue, 30 Aug 2022 22:37:43 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BD37068B8C9 for ; Tue, 30 Aug 2022 22:37:37 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 27UJbaje014509 for ; Tue, 30 Aug 2022 21:37:37 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id DBE49E0101; Tue, 30 Aug 2022 21:37:36 +0200 (CEST) Date: Tue, 30 Aug 2022 21:37:36 +0200 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <20220824151828.24218-1-george@nsup.org> <5520bdbb-0f14-8409-32c6-92c14fb8e8eb@gmail.com> MIME-Version: 1.0 In-Reply-To: <5520bdbb-0f14-8409-32c6-92c14fb8e8eb@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 30 Aug 2022 21:37:37 +0200 (CEST) Subject: Re: [FFmpeg-devel] [PATCH] lavu: header and documentation for AVWriter 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="===============1205993092169594045==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============1205993092169594045== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zOOBN8b9tIm0tYeN" Content-Disposition: inline --zOOBN8b9tIm0tYeN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Leo Izen (12022-08-30): > Is there a reason this is AVWriter wr =3D foo() and not AVWriter *wr =3D = foo()? > Most other APIs return pointers to structs, rather than structs themselves > (see: av_packet_alloc). Using a pointer would prevent us from having > sizeof(AVWriter) as part of the ABI, as was done with AVPacket. Yes: to return a pointer, you need somewhere to store the structure. One of the point of AVWriter is that you can store it on the stack to avoid dynamic allocations when the string is short enough. Note that AVWriter is exactly two pointers. It will always be two pointers, and all the objects that I intend to introduce later will always be two pointers: one const pointer for the methods, one pointer for the object itself. This design is essential to the features I promised for AVWriter and for later. Regards, --=20 Nicolas George --zOOBN8b9tIm0tYeN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE6ooRQGBoNzw0KnwPcZVLI8pNxgwFAmMOZv8ACgkQcZVLI8pN xgyYyQ//U8OH619l3xewxFmOxRqPA5mMLuCyxeW/bOLc0FVgmXr3bnNu0Hh4VvE5 GzxIdOK2wxo4JaTi2QVkom8ykAS3/AAmfOfbvIrusuqe7QxpBMdnrQs3sTB+wggd WO9GZw4nzbvruq0umoeh4afX8V995ViPW8UifI3hDqFibEpQmB6OvwXtgB8UZZJL VSVUull4K/pee4/1o6Lnq2w2tllM/Njzp56IQzo8pvhaT27hhYe6P2CGXL7L/myq TyTjoqAGCKiSV8/RFS/tIgycNzB7gWYmtjJxiOwofOoq5YSzlPkw5SmEJeWbD1II pdPyrXRCA76W6vXHy+dmKDJG8S7tz3PJCOWUU6sBeG/4pzAKkmPTJw3JJ3D5uF1X czekHmStmOohX4KO/FFUXSc0/71dCBe/o7nWcNjwfMN27sTLge3Jazr0kbztrZg1 C3Y14TOFV65Muo4n+hmF7MPiFpWzinZd0A+QO7SJ1yZSHMG9gSGc5PFPf1zEGbnI /ccKbUlVLkTaGPOjEAEEH2efJy3K4msHr0gpsL0Ge2EcxMMgF20VsdEMBnBpgeTK AsyMqf1kBXu+KvpCXiCVMeLd2abE0DJS4ue5npSl5+tEZXu1uJseh8rGjO2EfJCj kBIMQwZr1V4HytYMPbNvndboF4cE8x7FlKYpCo9WmsgSrMfwBRA= =lIN3 -----END PGP SIGNATURE----- --zOOBN8b9tIm0tYeN-- --===============1205993092169594045== 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". --===============1205993092169594045==--