mirror of https://github.com/mpv-player/mpv
f033481551
The underlying intention of this code is to make changing --videotoolbox-format at runtime work. For this reason, the format can't just be statically setup, but must be read from the option at runtime. This means the format is not fixed anymore, and we have to make sure the renderer is property reinitialized if the format changes. There is currently no way to trigger reinit on this level, which is why the mp_image_params.hw_subfmt field was introduced. One sketchy thing remains: normally, the renderer is supposed to be involved with VO format negotiation, which would ensure that the VO can take the format at all. Since the hw_subfmt is not part of this format negotiation, it's implied the get_vt_fmt() callback only returns formats supported by the renderer. This is not necessarily clear because vo_opengl checks this with converted_imgfmt separately. None of this matters in practice though, because we know all formats are always supported. (This still requires somehow triggering decoder reinit to make the change effective.) |
||
---|---|---|
.. | ||
d3d.c | ||
d3d.h | ||
d3d11va.c | ||
dec_video.c | ||
dec_video.h | ||
dxva2.c | ||
lavc.h | ||
mediacodec.c | ||
rpi.c | ||
vaapi.c | ||
vd.h | ||
vd_lavc.c | ||
vdpau.c | ||
videotoolbox.c |