Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nicolas George <george@nsup.org>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 2/2] doc/plans: add AVWriter
Date: Wed, 17 Aug 2022 23:49:32 +0200
Message-ID: <20220817214932.42351-2-george@nsup.org> (raw)
In-Reply-To: <20220817214932.42351-1-george@nsup.org>

Signed-off-by: Nicolas George <george@nsup.org>
---
 doc/plans.md | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/doc/plans.md b/doc/plans.md
index 0d7336e8b4..d96328aabc 100644
--- a/doc/plans.md
+++ b/doc/plans.md
@@ -4,3 +4,41 @@ Projects listed below have been approved by the FFmpeg developers community,
 and their author(s) can invest time and effort implementing them. The
 resulting patches will be subject to technical review like any other
 patches, but they can no longer be rejected on principle.
+
+## AVWriter: a unified API for building and returning strings
+
+**Author:** Nicolas George
+
+An API that can be used everywhere a function needs to return a string, or
+really an arbitrary buffer of bytes, and everywhere code needs to build a
+string from parts. It needs to be fast and lightweight enough to be used in
+tight loops, like once per frame, without limiting the size of the returned
+string when needed. It should make checking for overflows and possible
+memory allocation errors simple. It should easily be compatible with other
+uses of strings, especially standard C buffers.
+
+AVWriter is an enhancement on the AVBPrint API; AVBPrint already achieves
+some of these objectives but not all.
+
+Like other FFmpeg components, AVWriter is designed as a limited
+object-oriented virtual class / interface with multiple implementations. To
+let applications define their own writers and allocate structures on the
+stack or as part of their data, structures contain their own size and the
+code only accesses fields that exist.
+
+Some functions are specific to a particular implementation of AVWriter; for
+example getting a mallocated buffer from a dynamic AVWriter. It is the
+responsibility of the caller to use the right type, which will usually be
+enforced by an assert.
+
+**Future plans where AVWriter will help:**
+
+A universal API to return the string associated with an elementary type
+(pixel format, channel layout, etc.) and to serialize complex types,
+especially side data.
+
+A system to store error messages in contexts instead of logging them, to
+make it easier for applications, especially GUI, to display them cleanly.
+
+An extension to `avwriter_printf()` to use any serializable object directly
+from the format string.
-- 
2.35.1

_______________________________________________
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".

  reply	other threads:[~2022-08-17 21:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 21:49 [FFmpeg-devel] [PATCH 1/2] doc/plans: add a file to list approved projects Nicolas George
2022-08-17 21:49 ` Nicolas George [this message]
2022-08-18  6:40   ` [FFmpeg-devel] [PATCH 2/2] doc/plans: add AVWriter Paul B Mahol
2022-08-18 17:23   ` Jean-Baptiste Kempf
2022-08-22 14:55     ` Leo Izen
2022-08-22 14:59       ` Nicolas George
2022-08-18  6:49 ` [FFmpeg-devel] [PATCH 1/2] doc/plans: add a file to list approved projects Anton Khirnov
2022-08-18 17:26 ` Jean-Baptiste Kempf
2022-08-19 16:01   ` Nicolas George
2022-08-19 16:08     ` Jean-Baptiste Kempf
2022-08-22 12:43       ` Nicolas George
2022-08-22 14:42         ` Jean-Baptiste Kempf
2022-08-22 15:01           ` Nicolas George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220817214932.42351-2-george@nsup.org \
    --to=george@nsup.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git