Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] The case for a good string API
Date: Wed, 15 Jun 2022 22:56:49 +0200
Message-ID: <20220615205649.GD11679@mariano> (raw)
In-Reply-To: <YcNOeV/V+0exLm/w@phare.normalesup.org>

On date Wednesday 2021-12-22 17:12:41 +0100, Nicolas George wrote:
> Hi.
> 
> I will try again proposing a good string API for the project. But this
> time, instead of showing the implementation code, I will ask about the
> principle.
> 
> So, please, read the argument, and give your opinion on the principle.
> If we agree on the principle, we can discuss the code then.
[...]
> * What string API we should use
> 
> We have AVBprint, but the API is ugly, and it only brings a few of the
> benefits I promised. I have a proposal: AVWriter.
> 
> I posted it last spring, here is an introduction on how to use it (with
> the implementation in the same thread):
> 
> https://ffmpeg.org/pipermail/ffmpeg-devel/2021-April/279383.html
> 
> 
> * Conclusion
> 
> Well, I am convinced, but what about you?
> 
> 1. Do you think FFmpeg needs a good string API? If not, please explain
> why?
> 
> 2. Assuming we agree ‘yes’ on the previous question, do you think
> AVWriter is a good candidate? If not, what else would you propose?

Hi, and sorry for the long delay (I'll comment soon about the AVWriter
API).

Before jumping to the discussion, probably it's good to think a bit
about the bprint.h API and its limitations (the ones which come to mind
are: no errors in case of truncation, and possible inefficiency due to
the realloc). So while it covers the case for small strings (and it's
not that bad IMO from the API point of view), probably it's underkill
for data serialization.

Do you have more in mind about its limitations?

Also, is the new API supposed to be a replacement for AVBprint or is
it supposed to live in parallel with it (to serve different purposes)?
_______________________________________________
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-06-15 20:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 16:12 Nicolas George
2022-06-15 20:56 ` Stefano Sabatini [this message]
2022-06-16 15:47   ` Nicolas George
2022-06-16 23:01     ` Stefano Sabatini
2022-06-17 14:57       ` Nicolas George
2022-08-15 19:15         ` Michael Niedermayer

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=20220615205649.GD11679@mariano \
    --to=stefasab@gmail.com \
    --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