From: Timo Rothenpieler <timo@rothenpieler.org> To: ffmpeg-devel@ffmpeg.org Cc: Nicolas George <george@nsup.org> Subject: Re: [FFmpeg-devel] [RFC] avdevice/lavfi: output wrapped AVFrames Date: Sun, 3 Jul 2022 15:40:51 +0200 Message-ID: <83fdaa4a-e5f3-2520-9cad-0c2a4b75e71a@rothenpieler.org> (raw) In-Reply-To: <YsGXSobpFvAQrKSO@phare.normalesup.org> On 03.07.2022 15:19, Nicolas George wrote: > Timo Rothenpieler (12022-06-29): >> The lavfi avdevice as it is right now can't output "special frames" >> like hardware frames. >> This patch makes the lavfi avdevice output wrapped AVFrames instead >> of copying the actual data, greatly simplifying it in the process. > > Thanks for the patch. I am not familiar with the hardware frame > infrastructure, but this patch makes the whole code much simpler, and > assumedly more efficient to boot. That makes it worth it for that reason > alone. Make sure to take a look at the non-RFC version of this patch I sent. It sadly is a bit more complex again, since wrapped avframes only work for video frames after all. But copying audio data is not nearly as heavy weight as copying whole video frames. Plus, there are no hardware-audio-frames. > If it also allows to use hardware frames, even in a limited or fragile > way, it is a bonus. I do not see how anybody could object. > >> I am not at all sure if this has some unexpected consequences. >> It works just fine with ffmpeg.c, but it might be an ABI break for >> potential library consumers? > > I think the case can be made for both positions: on one hand, an > application should not assume a demuxer will output any kind of frame > and should be ready for wrapped AVFrame; on the other hand, devices are > special and somebody who uses a specific device on purpose may make > assumptions on its behavior. > > I think this case is fringe enough that we can accept the break, at > least if the device only outputs normal frames by default, not hardware > frames. Yeah, I'm also leaning in that direction. And full proper implementation won't care what kind of packets come out of it. Plus I can't really think of any API consumer that'd possibly implement a lavfi.c based device and then also hardcodes the assumption what kind of packets it outputs. So once the issue Michael discovered is ironed out, I'd be inclined to apply it, after some more testing. _______________________________________________ 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".
prev parent reply other threads:[~2022-07-03 13:41 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-29 19:52 Timo Rothenpieler 2022-06-30 8:46 ` Anton Khirnov 2022-06-30 9:50 ` Timo Rothenpieler 2022-07-02 17:26 ` Nicolas George 2022-07-02 20:06 ` Timo Rothenpieler 2022-07-03 13:19 ` Nicolas George 2022-07-03 13:40 ` Timo Rothenpieler [this message]
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=83fdaa4a-e5f3-2520-9cad-0c2a4b75e71a@rothenpieler.org \ --to=timo@rothenpieler.org \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=george@nsup.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