1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-27 22:00:23 +00:00

command: expose underlying pixfmt for hwdec

This commit is contained in:
sfan5 2020-10-16 11:06:37 +02:00
parent b8104a013d
commit 3d9d041a11
2 changed files with 7 additions and 0 deletions

View File

@ -2299,6 +2299,10 @@ Property list
The pixel format as string. This uses the same names as used in other The pixel format as string. This uses the same names as used in other
places of mpv. places of mpv.
``video-params/hw-pixelformat``
The underlying pixel format as string. This is relevant for some cases
of hardware decoding and unavailable otherwise.
``video-params/average-bpp`` ``video-params/average-bpp``
Average bits-per-pixel as integer. Subsampled planar formats use a Average bits-per-pixel as integer. Subsampled planar formats use a
different resolution, which is the reason this value can sometimes be different resolution, which is the reason this value can sometimes be
@ -2357,6 +2361,7 @@ Property list
MPV_FORMAT_NODE_MAP MPV_FORMAT_NODE_MAP
"pixelformat" MPV_FORMAT_STRING "pixelformat" MPV_FORMAT_STRING
"hw-pixelformat" MPV_FORMAT_STRING
"w" MPV_FORMAT_INT64 "w" MPV_FORMAT_INT64
"h" MPV_FORMAT_INT64 "h" MPV_FORMAT_INT64
"dw" MPV_FORMAT_INT64 "dw" MPV_FORMAT_INT64

View File

@ -2195,6 +2195,8 @@ static int property_imgparams(struct mp_image_params p, int action, void *arg)
struct m_sub_property props[] = { struct m_sub_property props[] = {
{"pixelformat", SUB_PROP_STR(mp_imgfmt_to_name(p.imgfmt))}, {"pixelformat", SUB_PROP_STR(mp_imgfmt_to_name(p.imgfmt))},
{"hw-pixelformat", SUB_PROP_STR(mp_imgfmt_to_name(p.hw_subfmt)),
.unavailable = !p.hw_subfmt},
{"average-bpp", SUB_PROP_INT(bpp), {"average-bpp", SUB_PROP_INT(bpp),
.unavailable = !bpp}, .unavailable = !bpp},
{"w", SUB_PROP_INT(p.w)}, {"w", SUB_PROP_INT(p.w)},