From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue
Date: Mon, 18 Dec 2023 20:58:39 +0100
Message-ID: <20231218195839.GX6420@pb2> (raw)
In-Reply-To: <170292082501.8914.10077474434835822133@lain.khirnov.net>
[-- Attachment #1.1: Type: text/plain, Size: 3019 bytes --]
On Mon, Dec 18, 2023 at 06:33:45PM +0100, Anton Khirnov wrote:
> Quoting Stefano Sabatini (2023-12-16 16:18:07)
> > On date Thursday 2023-12-14 10:35:56 +0100, Nicolas George wrote:
> > > Anton Khirnov (12023-12-14):
> > [...]
> > > > I have to strongly disagree. This is neither practically workable,
> > > > nor a good goal to aim at.
> > >
> > > And I strongly agree with Stefano. Having the tools just thin wrappers
> > > around the libraries is the only way to ensure the libraries are
> > > maximally useful for other applications. Otherwise, useful code will
> > > only reside in the tools and be only available through a clumsy
> > > command-line interface.
> > >
> > > > This mindset IMO inevitably leads to (among
> > > > other problems):
> >
> > > > * endless scope creep
> >
> > Scope creep is a general tendency in software, as it tends to grow
> > with more functionality and use cases in mind (FFmpeg itself started
> > as an MPEG decoder). OTOH there is good and bad scope creep, it is bad
> > if the functionality goes beyond the original design and core use
> > case, or if the extension is not carefully designed and suffers from
> > assumptions which limit how the software can be used. For example,
> > making constraints about where the main thread can be executed.
> >
> > (Unrelated note: I greatly appreciate Anton's threaded architecture
> > endeavor, and I'm fine with the idea that something can result broken
> > as a consequence of a major redesign, but I also think we should fix
> > what can be fixed rather than just dismiss that as "not useful".
>
> The entire question here is whether SDL muxing is useful enough to
> warrant massive hacks in ffmpeg CLI.
I think the first question is, does this actually need
"massive hacks in ffmpeg CLI" ?
If you ignore the recommandition that SDL should be run from the main
thread then iam not sure what change would be needed in ffmpeg CLI at all.
If you do want to run it in the main thread, well theres the option
for the muxer to launch a seperate process by some way internally.
then it has its own main thread (not great but its a clean solution)
teh 2nd question is, is SDL the only thing requireing "main thread" or
some "single thread" or other limitation ?
does any other decoder, encoder, muxer, demuxer, filter ... use an
external lib thats not fully thread safe ? or has funny limitations ?
The last option would maybe be to run some sort of AVExecutor on the
main thread and allow things like muxers to que operations on it.
The muxers would totally unchanged be running on a random thread
but que some operation on the main thread if an external lib, driver or
other needs it.
Naively that feels relatively clean to me
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
[-- 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:[~2023-12-18 19:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 17:27 Zhao Zhili
2023-12-12 18:04 ` Nicolas George
2023-12-13 4:19 ` Zhao Zhili
2023-12-13 17:30 ` [FFmpeg-devel] Mailinglist conduct [was: [RFC] fftools/ffmpeg and libavdevice/sdl issue] Ronald S. Bultje
2023-12-13 9:08 ` [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue Anton Khirnov
2023-12-13 9:31 ` Zhao Zhili
2023-12-13 10:06 ` Anton Khirnov
2023-12-13 10:37 ` Zhao Zhili
2023-12-13 10:45 ` Nicolas George
2023-12-13 10:49 ` Anton Khirnov
2023-12-13 9:44 ` Nicolas George
2023-12-14 0:47 ` Stefano Sabatini
2023-12-14 7:48 ` Anton Khirnov
2023-12-14 9:35 ` Nicolas George
2023-12-16 15:18 ` Stefano Sabatini
2023-12-18 17:33 ` Anton Khirnov
2023-12-18 19:58 ` Michael Niedermayer [this message]
2023-12-18 20:02 ` Nicolas George
2023-12-19 7:23 ` Rémi Denis-Courmont
2023-12-19 9:29 ` Nicolas George
2023-12-19 10:43 ` Rémi Denis-Courmont
2023-12-19 12:51 ` Nicolas George
2023-12-19 14:47 ` Rémi Denis-Courmont
2023-12-19 16:58 ` Michael Niedermayer
2023-12-19 18:48 ` Rémi Denis-Courmont
2023-12-19 18:55 ` Nicolas George
2023-12-19 19:36 ` Michael Niedermayer
2023-12-15 12:37 ` Alexander Strasser via ffmpeg-devel
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=20231218195839.GX6420@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