mirror of https://github.com/mpv-player/mpv
command: remove 2 deprecated properties
They were delcared to be removed in mpv 0.20.0, and the next release will be 0.21.0.
This commit is contained in:
parent
e4e1dc3c79
commit
192a7344d9
|
@ -32,6 +32,7 @@ Interface changes
|
|||
- "fps" -> "container-fps"
|
||||
- "idle" -> "idle-active"
|
||||
the old names are deprecated
|
||||
- remove deprecated "hwdec-active" and "hwdec-detected" properties
|
||||
--- mpv 0.20.0 ---
|
||||
- add --image-display-duration option - this also means that image duration
|
||||
is not influenced by --mf-fps anymore in the general case (this is an
|
||||
|
|
|
@ -1331,24 +1331,6 @@ Property list
|
|||
multiple interop drivers for the same hardware decoder, depending on
|
||||
platform and VO.
|
||||
|
||||
``hwdec-active``
|
||||
Deprecated. To be removed in mpv 0.20.0. Use ``hwdec-current`` instead.
|
||||
|
||||
Return ``yes`` or ``no``, depending on whether any type of hardware decoding
|
||||
is actually in use.
|
||||
|
||||
``hwdec-detected``
|
||||
Deprecated. To be removed in mpv 0.20.0.
|
||||
|
||||
If hardware decoding is active, this returns the hardware decoder in use.
|
||||
Otherwise, it returns either ``no``, or if applicable, the currently loaded
|
||||
hardware decoding API. This is known only once the VO has opened (and
|
||||
possibly later). With some VOs (like ``opengl``), this is never known in
|
||||
advance, but only when the decoder attempted to create the hw decoder
|
||||
successfully. Also, hw decoders with ``-copy`` suffix will return ``no``
|
||||
while no video is being decoded. All this reflects how detecting hw decoders
|
||||
are detected and used internally in mpv.
|
||||
|
||||
``video-format``
|
||||
Video format as string.
|
||||
|
||||
|
|
|
@ -2284,54 +2284,6 @@ static int mp_property_hwdec_interop(void *ctx, struct m_property *prop,
|
|||
return m_property_strdup_ro(action, arg, name);
|
||||
}
|
||||
|
||||
static int mp_property_hwdec_active(void *ctx, struct m_property *prop,
|
||||
int action, void *arg)
|
||||
{
|
||||
MPContext *mpctx = ctx;
|
||||
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
|
||||
struct dec_video *vd = track ? track->d_video : NULL;
|
||||
bool active = false;
|
||||
if (vd) {
|
||||
int current = 0;
|
||||
video_vd_control(vd, VDCTRL_GET_HWDEC, ¤t);
|
||||
active = current > 0;
|
||||
}
|
||||
return m_property_flag_ro(action, arg, active);
|
||||
}
|
||||
|
||||
static int mp_property_detected_hwdec(void *ctx, struct m_property *prop,
|
||||
int action, void *arg)
|
||||
{
|
||||
MPContext *mpctx = ctx;
|
||||
struct track *track = mpctx->current_track[0][STREAM_VIDEO];
|
||||
struct dec_video *vd = track ? track->d_video : NULL;
|
||||
|
||||
switch (action) {
|
||||
case M_PROPERTY_GET_TYPE: {
|
||||
// Abuse another hwdec option to resolve the value names
|
||||
struct m_property dummy = {.name = "hwdec"};
|
||||
return mp_property_generic_option(mpctx, &dummy, action, arg);
|
||||
}
|
||||
case M_PROPERTY_GET: {
|
||||
int current = 0;
|
||||
if (vd)
|
||||
video_vd_control(vd, VDCTRL_GET_HWDEC, ¤t);
|
||||
|
||||
if (current <= 0 && vd && vd->hwdec_devs) {
|
||||
struct mp_hwdec_ctx *hwctx = hwdec_devices_get_first(vd->hwdec_devs);
|
||||
if (hwctx)
|
||||
current = hwctx->type;
|
||||
}
|
||||
|
||||
// In case of the "-copy" ones, which are "detected" every time the
|
||||
// decoder is opened, return "no" if no decoding is active.
|
||||
*(int *)arg = current > 0 ? current : 0;
|
||||
return M_PROPERTY_OK;
|
||||
}
|
||||
}
|
||||
return M_PROPERTY_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static int mp_property_deinterlace(void *ctx, struct m_property *prop,
|
||||
int action, void *arg)
|
||||
{
|
||||
|
@ -3858,10 +3810,8 @@ static const struct m_property mp_properties_base[] = {
|
|||
{"vid", mp_property_video},
|
||||
{"program", mp_property_program},
|
||||
{"hwdec", mp_property_hwdec},
|
||||
{"hwdec-active", mp_property_hwdec_active},
|
||||
{"hwdec-current", mp_property_hwdec_current},
|
||||
{"hwdec-interop", mp_property_hwdec_interop},
|
||||
{"hwdec-detected", mp_property_detected_hwdec},
|
||||
|
||||
{"estimated-frame-count", mp_property_frame_count},
|
||||
{"estimated-frame-number", mp_property_frame_number},
|
||||
|
|
Loading…
Reference in New Issue