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 C410543213 for ; Wed, 24 Aug 2022 15:59:35 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4A37168B973; Wed, 24 Aug 2022 18:59:32 +0300 (EEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2107.outbound.protection.outlook.com [40.92.91.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 376E568B7E6 for ; Wed, 24 Aug 2022 18:59:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VnCQDuGbRc4NIgNzSn+1d+skjNPqjnSsKlZrO+3SWZRP2oF54wbkv74G06vJj3tOOpwxmZcaEOzmjaZeYIblErDTKE/+obNEyb8BUcY/QFNRkF5aEtvYh9BwqR239iN8M/L4LC9qesJUFNmC4CIap026xDPOFBJsI0XKojKZuNyJ2mZhN5/MdFfboAJPAbpuDupP31C9gg1M6c86U67JB6pOmBjxp3c2alR2FHiif7oVFunz8mw0633sxtiNQPg9od8Jczq2ljiMIrUeNGuLAYBSwMogtvr97akgqudhr8sbgjEuHCPFodht5sZPK5OZcJUiQhw91w48htV1Sw9hJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7NejVCFoycfqs8M6SB6rsiyO4FmjGhQVB2W7W/J7adg=; b=H6OfZpI/UkQ8yJLs8q4vV6SgZvtL30yv3sIQp/QaicH3Lo6qVYVi4XBFtc33aSyy/bvHdgPoWvILhUKFjoIn/dE1HvJXRHxFD2HSBtsb3EpUjdlHScHX8Z3El+weQ5S4P3HUvFhh6ksIsUrTRAz3WP/7NOaxEZ6s2hgIgDim9/a2Qet4wvEjJKn44Oo0EqANt+uEc5fReWNukC7pyIaNzjxZpL/+mb0I4pAGIC6IavRgDFu9ACGitOw8RyNmJGBF2L4cDrn7GSXktkeFIj7uAPUeOFL/Xb52PM55uoYLkFc3o0Im8HQm7zT1pT4ZOT+8r5cR3hsH/FY9YXJdshwY7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7NejVCFoycfqs8M6SB6rsiyO4FmjGhQVB2W7W/J7adg=; b=mowIpKcrO4gUb0OGytdnjBG8xQliq2sePZuO0wEfE4KlmDeELRhtGUEYMHy1n9VTAHAscSebdVoF9Zx9TsIuIt36+M6LMQpBODnHPXhxa/GHBZ/evo3esTKZEbp8hJyPHec8eh/hZpM/njfVGycgmwtwdUcyKKfopEFx4bZTV+B+o+wCMfnmew9gDLUbqFZjI7VJB7D4saLXtO9X0Pcdw8Vah/JA6TmUbKIijK/In2a4lSMwLyuwM8l1GUcfLWmAF46KMv0RQ+ezScioem7V/5JWOUMKiKk61RNik+zKgX4QJgHdfl8bfAY/UotiRQGDXCjfBspc26rGeZZtXvK/VA== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by PA4PR01MB7840.eurprd01.prod.exchangelabs.com (2603:10a6:102:ba::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.16; Wed, 24 Aug 2022 15:59:23 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::210e:b627:bcc9:8c46%11]) with mapi id 15.20.5546.022; Wed, 24 Aug 2022 15:59:23 +0000 Message-ID: Date: Wed, 24 Aug 2022 17:59:22 +0200 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220824151828.24218-1-george@nsup.org> From: Andreas Rheinhardt In-Reply-To: <20220824151828.24218-1-george@nsup.org> X-TMN: [IjrZD6LueU4jM0U4mS4BvLUQBUqk13Li] X-ClientProxiedBy: ZR0P278CA0128.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:40::7) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <29067f44-6f7d-37b1-8896-aee120bfa8ff@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 05006fc6-793c-4a33-8f26-08da85e99ca3 X-MS-TrafficTypeDiagnostic: PA4PR01MB7840:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vYmjl7Ffuwvqcm+lZ5IiTz3xSRzjBE9+BJ1/NBi6QVhFeGBjjp4SflESRKpiKILkpYmISI9X1s1ZCvzigVKYthjWVULu/KOJ6lhO8TdFtCmksQoSk/RW8BC0ErcYGSKfuvI15f6/PSOghSWdBJyjG3YHOqTCnzMOx6RMbaq/IW2uVuIFwqVDfLFkbLz8Xae2SFeuo7XrI7AG94gyS+ECkX5W+u1qtD3/hHI+wD/ZVc3ugElWzHId+dKMq3gst7NH5kUUwj/gIloj1bqZoTZY8m6yYMdmztwLf6ibDi7LCf7HTcfkh6fraBhGU8yg/JzX+O0YHqqguUDEJ9O2KzQBudx0QwhSejy8HW5k5nr950ISsvVvAlBs0PoENsJDRaG+ZO7lqCjRGiBccsCX3/xDjgDHHQLpEPy5lyRJ/tXclKX4f7YwV953jxC7YiUYoOEXTKozLRGsGywJfesjaAe//mbaMU21fSaMMCK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Z?= =?utf-8?B?Rm9jL3c0RWN3c0phWEtCLzJBQlRFMk5mNjBodXhNWi9GUDhtSXNtS2FEWnNw?= =?utf-8?B?WkNPbUJPdjJFbVNvcWJkQW1qOTU3N3hlVi95ZTVFZXdYeVF3OC9ia21sNmFM?= =?utf-8?B?Q05kU205RUlLeWQxZWszK1h1QWZnTWVLMFI5Tks1NDhSZE1uZjJnQi9CQjho?= =?utf-8?Q?Nev5ZSY057r1E/CLjk=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05006fc6-793c-4a33-8f26-08da85e99ca3 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2022 15:59:23.0997 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR01MB7840 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: 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: Nicolas George: > The actual implementation, tests and uses in the rest of > FFmpeg code will be committed separately once the API is > settled. > I think you misunderstood JB: He did not say that the headers are pushed without the implementation, he just said that the headers should be discussed and approved before you code the actual implementation: > > You provide a full header and documentation, and then get it discussed. > When there is a consensus for approval of the headers, then, you can code the core of it that matches the headers. > That avoids the "I spent time for nothing" issue. > diff --git a/libavutil/writer.h b/libavutil/writer.h > new file mode 100644 > index 0000000000..55e2cf3ea6 > --- /dev/null > +++ b/libavutil/writer.h > @@ -0,0 +1,484 @@ > +/* > + * Copyright (c) 2022 The FFmpeg project > + * > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#ifndef AVUTIL_WRITER_H > +#define AVUTIL_WRITER_H > + > +#include > +#include > +#include > + > +#include "extendable.h" Where is this header? > +#include "bprint.h" > + > +/** > + * @defgroup av_writer AVWriter > + * > + * Object-oriented API to write strings and binary data. > + * > + * @{ > + */ > + > +typedef struct AVWriterMethods AVWriterMethods; > + > +/** > + * Opaque object to write strings and binary data. > + * > + * AVWriter is meant to allow to build and return strings (and blocks of > + * binary data) efficiently between functions. > + * For example, a function that serialize something into a string will > + * actually write into an AVWriter, and the caller will choose the way the > + * data will be stored or processed on the fly. > + * > + * For a quick introduction on how to use AVWriter in simple cases, see > + * doc/avwriter_intro.md. > + * > + * There are various pre-defined types of AVWriter, see below: > + * > + * - av_dynbuf_writer() writes the data into a buffer that is grown with > + * av_realloc() if it does not fit in the initial buffer; it is the > + * recommended choice. > + * > + * - av_buf_writer() writes the data into a pre-existing finite buffer. > + * > + * - av_stdio_writer() writes the data into a FILE*. > + * > + * - av_log_writer() writes the data to av_log(). > + * > + * AVWriter objects are passed by value. It allows creating a writer on the > + * fly, without extra variable or error checking. The structure can never > + * change. > + */ > +typedef struct AVWriter { > + const AVWriterMethods *methods; > + void *obj; > +} AVWriter; > + > +/** > + * Write a data buffer to an AVWriter. > + */ > +void av_writer_write(AVWriter wr, const char *buf, size_t size); > + > +/** > + * Write a 0-terminated string to an AVWriter. > + */ > +void av_writer_print(AVWriter wr, const char *str); > + > +/** > + * Write a formatted string to an AVWriter. > + * Note: do not use libc-specific extensions to the format string. > + */ > +void av_writer_printf(AVWriter wr, const char *fmt, ...); > + > +/** > + * Write a formatted to string an AVWriter using a va_list. s/to string/string to/ > + */ > +void av_writer_vprintf(AVWriter wr, const char *fmt, va_list va); _______________________________________________ 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".