[FFmpeg-devel] Splitting or merging libraries (was: Status and Plans for Subtitle Filters)
Hendrik Leppkes
h.leppkes at gmail.com
Tue Mar 3 11:23:02 EET 2020
On Tue, Mar 3, 2020 at 2:19 AM Vittorio Giovara
<vittorio.giovara at gmail.com> wrote:
>
> Whether you like it or not, there is value in designing separate tools and
> implementing separate tools and libraries for different use cases: even
> though the ffmpeg suite of library is closed together because they pertain
> the same subject (multimedia) it makes a lot of sense to keep them separate
> and try to identify portions of code that could work well enough in a
> library separated from the rest.
Certain generic functionality may benefit from that, like, there is no
reason a bitreader or IO couldn't be separate if we really wanted to.
On the other end of the spectrum however, the most offending parts
right now are very specific codec-internals which are needed both in
avcodec and avformat, because proper (de)muxing will often require
very technical details about a codec thats usually only found in
decoders. There is a concrete overlap here on very detailed technical
functionality. One could argue that we should just make it public as
well, but really, does anyone really want the reality of dozens if not
hundreds of public API calls and tables that only server extremely
niche requirements, but would end up cemented in API for a long time,
with very questionable use to the API user?
Maybe the question isn't if everything should be one large library, or
multiple libraries, but how exactly the split exists. Right now, we
have a mostly vertical split between libraries, based on perceived
functionality boundaries. In some cases this works fine. swscale and
swresample for example would not really benefit from being merged with
anything else. In other cases, its putting a strain on things, ie.
avformat and avcodec, which tend to share a bit more and have a hard
dependency on one another. avutil is the only part that exists as a
"horizontal" split to a degree, bundling some base functionality
shared between libraries.
One approach for the future would be to perhaps merge avformat and
avcodec, but instead improve horizontal seperation. Get more low-level
reusable code cleaned up and into avutil or a new library.
- Hendrik
More information about the ffmpeg-devel
mailing list