-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
_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]: 1This is the same kind of struct that sys.version_info returns (we can't use their base class, but that doesn't matter).
Also, we're relying on av_version_info() to get the major FFmpeg version, but that's not recommended :
This string has no fixed format and can change any time. It should never be parsed by code.
Metadata
Metadata
Assignees
Labels
No labels