[FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue
Rémi Denis-Courmont
remi at remlab.net
Tue Dec 19 20:48:39 EET 2023
Le tiistaina 19. joulukuuta 2023, 18.58.40 EET Michael Niedermayer a écrit :
> so the idea is that we cannot access any GUI in any code from anything in
> libavformat and probably all other libs, ever
No. The idea is that a command line program cannot use the GUI, and a library
can only use the GUI if the main program is a GUI program.
> no debug with graphical output
> no vissualizuation of anything
> no devices
> no libs that expose anything that would need a GUI for configuration
You can do all those things as long as you assume that the main program is a
GUI program running the Mac-specific UI main loop. AFAICT, you can write a
macOS OpenGL or Metal video output device and a CoreAudio audio output device,
and any GUI program that uses FFmpeg can then use those devices.
Trying to fit this into a generic portable command line tool is not going to
work though. Then SDL adds the extra problem that it probably only works with
its own API driving the main loop, and not just any API layered on top of Mac
GUI frameworks. If so, the only proper way to support it (on Mac) is to make a
dedicated player. Of course, it's also possible to skip support for SDL on
Mac.
Lastly, it has been made clear by the proponents of the muxer that this is but
a convenient trick so that a real muxer can be swapped for a renderer wherever
a muxer is expected. In other words, it is a literal kludge (from the
wiktionary: "Any construction or practice, typically crude yet effective,
designed to solve a problem temporarily or expediently"). That's pretty much
the antithesis of good and sound API design.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the ffmpeg-devel
mailing list