From a3350e2fbb0cfd6d2bd4993570e3ffe8e10a34eb Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Fri, 2 Jan 2026 11:21:48 -0500 Subject: [PATCH] command: add libplacebo-version property Similar to other core library dependencies. --- DOCS/interface-changes/libplacebo-version.txt | 1 + DOCS/man/input.rst | 5 +++++ player/command.c | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 DOCS/interface-changes/libplacebo-version.txt diff --git a/DOCS/interface-changes/libplacebo-version.txt b/DOCS/interface-changes/libplacebo-version.txt new file mode 100644 index 0000000000..d3517b8a8d --- /dev/null +++ b/DOCS/interface-changes/libplacebo-version.txt @@ -0,0 +1 @@ +add `libplacebo-version` property diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 11e224e84b..cba1e31289 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -3960,6 +3960,11 @@ Property list somewhat weird form (apparently "hex BCD"), indicating the release version of the libass library linked to mpv. +``libplacebo-version`` + The contents of the ``PL_VERSION`` macro. This is a string which identifies + the build in some way, either through a release version number, or a git + hash. + ``subrandr-version`` The value of ``sbr_library_version()`` as a string in the format ``..``, indicating the release version of the subrandr diff --git a/player/command.c b/player/command.c index 64ba85b268..de23f1a311 100644 --- a/player/command.c +++ b/player/command.c @@ -3762,6 +3762,12 @@ static int mp_property_libass_version(void *ctx, struct m_property *prop, return m_property_int64_ro(action, arg, ass_library_version()); } +static int mp_property_libplacebo_version(void *ctx, struct m_property *prop, + int action, void *arg) +{ + return m_property_strdup_ro(action, arg, PL_VERSION); +} + static int mp_property_subrandr_version(void *ctx, struct m_property *prop, int action, void *arg) { @@ -4558,6 +4564,7 @@ static const struct m_property mp_properties_base[] = { {"mpv-configuration", mp_property_configuration}, {"ffmpeg-version", mp_property_ffmpeg}, {"libass-version", mp_property_libass_version}, + {"libplacebo-version", mp_property_libplacebo_version}, {"subrandr-version", mp_property_subrandr_version}, {"platform", mp_property_platform},