[FFmpeg-devel] [PATCH v3 0/3] introduce public AVIOContext::bytes_{read, written}

Jan Ekström jeebjp at gmail.com
Sun Oct 24 13:10:33 EEST 2021

On Mon, Oct 18, 2021 at 3:47 PM Jan Ekström <jeebjp at gmail.com> wrote:
> Changes compared to v2:
> * Written was actually written_size, so it did not take into account any
>   writes after a seek-back. Thus an initial attempt at implementing
>   bytes_written was made.
> After a brief discussion with Michael on IRC, this seems to be the idea of a
> path forward that was agreed upon.
> 1. AVIOContext::written was supposed to be a private field [1], so move the
>    value utilized internally to FFIOContext, and set the AVIOContext value
>    from there.
> 2. Deprecate AVIOContext::written.
> 3. Introduce public AVIOContext::bytes_{read,written} statistics fields.
> I was not sure whether deprecation or straight-out removal was the right thing
> to do - since while the field was meant to be internal it was not marked as
> such in FFmpeg's merged state of the struct (which is why it did not get
> cleaned up into FFIOContext earlier) - but in order to not get stuck on that,
> I am now posting this with the full deprecation changes. This way (hopefully)
> this change will get more eyeballs and if someone thinks this could just be
> removed the patches can be changed to do that instead.
> [1] http://git.videolan.org/?p=ffmpeg.git;a=commit;h=3f75e5116b900f1428aa13041fc7d6301bf1988a

Thanks for the comments, applied the set as

with one minor change, "point of truth" -> "source of truth" in the
first commit.


More information about the ffmpeg-devel mailing list