Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let _core.get_ffmpeg_library_versions() return a dict of namedtuples instead of a dict of strings #100

Open
NicolasHug opened this issue Jul 22, 2024 · 0 comments

Comments

@NicolasHug
Copy link
Member

_core.get_ffmpeg_library_versions() returns a dict of strings. As discussed in D58974580, versions are better exposed as namedtuples, like so:

[nav] In [25]: _Version = namedtuple("_Version", ("major", "minor", "micro"))
[ins] In [26]: version = _Version(1, 2, 3)
[ins] In [27]: version
Out[27]: _Version(major=1, minor=2, micro=3)
[ins] In [28]: version < (1, 2, 4)
Out[28]: True
[ins] In [29]: version < (1, 2, 3, 4)
Out[29]: True
[ins] In [30]: version.major
Out[30]: 1

This is the same kind of struct that sys.version_info returns (we can't use their base class, but that doesn't matter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant