From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [RFC][PATCH 1/4] avutil/frame: add an internal field to store the size of AVFrame
Date: Sun, 13 Feb 2022 13:08:46 +0100
Message-ID: <20220213120846.GE2829255@pb2> (raw)
In-Reply-To: <42e8b38e-60da-cbbb-85ea-94f3ce73b49a@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2059 bytes --]
On Sat, Feb 12, 2022 at 09:16:36AM -0300, James Almer wrote:
> On 2/12/2022 9:08 AM, Michael Niedermayer wrote:
> > On Fri, Feb 11, 2022 at 09:12:58PM -0300, James Almer wrote:
> > > This is unfortunately needed to remove (or reduce the awfulness) of certain
> > > modules violating the AVFrame API and using sizeof(AVFrame).
> > > With this, the sizeof(AVFrame) value of the libavutil loaded at runtime can be
> > > used instead of the compile time value of whatever library included frame.h
> > >
> > > Signed-off-by: James Almer <jamrial@gmail.com>
> > > ---
> > > This is sucks, but at least less so than the current situation.
> > >
> > > I don't see wrapped_avframe going away anytime soon, so something must be done,
> > > and last time i tried to change how the packets are generated my approach was
> > > shut down, so here's another attempt.
> >
> > iam probably missing something but if the goal is to wrap AVFrame in some
> > other structure as a array or buffer
> > without the sizeof(AVFrame) cant the wraping/unwraping code be put in
> > libavutil ?
>
> How would that fix the situation of setting AVPacket.size to sizeof(AVFrame)
> and AVPacket.data to an structure that big + padding bytes in packets
> returned to the caller?
If you had a function which turned a AVFrame into a AVBufferRef
pkt->data = buf->data;
pkt->size = buf->size;
If done carefully, this might work even independant of how that function
does it, by reference, copy or full serialization
If that direction would be pursued (possibly later), the wraping function
could have a flag that switches between zero copy reference and
full serialization of AVFrames which could be passed accross a network
or stored on disk and used later/elsewhere
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
next prev parent reply other threads:[~2022-02-13 12:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 0:12 James Almer
2022-02-12 0:12 ` [FFmpeg-devel] [PATCH 2/4] avcodec/wrapped_avframe: don't allocate an AVFrame twice James Almer
2022-02-12 0:13 ` [FFmpeg-devel] [PATCH 3/4] avcodec/wrapped_avframe: stop hardcoding sizeof(AVFrame) James Almer
2022-02-12 0:13 ` [FFmpeg-devel] [PATCH 4/4] avformat/vapoursynth: " James Almer
2022-02-12 5:29 ` [FFmpeg-devel] [RFC][PATCH 1/4] avutil/frame: add an internal field to store the size of AVFrame Andreas Rheinhardt
2022-02-12 11:46 ` James Almer
2022-02-12 6:45 ` Andreas Rheinhardt
2022-02-12 11:58 ` James Almer
2022-02-12 12:08 ` Michael Niedermayer
2022-02-12 12:16 ` James Almer
2022-02-13 12:08 ` Michael Niedermayer [this message]
2022-02-12 12:25 ` Paul B Mahol
2022-02-12 12:28 ` James Almer
2022-02-12 12:32 ` Paul B Mahol
2022-02-12 12:33 ` James Almer
2022-02-12 12:38 ` Paul B Mahol
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=20220213120846.GE2829255@pb2 \
--to=michael@niedermayer.cc \
--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