mirror of https://github.com/mpv-player/mpv
video/out: remove unused colorspace reporting
Rarely used and essentially useless. The only VO for which this was implemented correctly and for which this did anything was vo_xv, but you shouldn't use vo_xv anyway (plus it support BT.601 only, plus a vendor specific extension for BT.709, whose presence this function essentially reported - use xvinfo instead).
This commit is contained in:
parent
27715b7dd1
commit
8f0f73e591
|
@ -94,11 +94,6 @@ enum mp_voctrl {
|
|||
// names for displays the window is on
|
||||
VOCTRL_GET_DISPLAY_NAMES,
|
||||
|
||||
// The VO is supposed to set "known" fields, and leave the others
|
||||
// untouched or set to 0.
|
||||
// imgfmt/w/h/d_w/d_h can be omitted for convenience.
|
||||
VOCTRL_GET_COLORSPACE, // struct mp_image_params*
|
||||
|
||||
// Retrieve window contents. (Normal screenshots use vo_get_current_frame().)
|
||||
VOCTRL_SCREENSHOT_WIN, // struct mp_image**
|
||||
|
||||
|
|
|
@ -1263,15 +1263,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
case VOCTRL_REDRAW_FRAME:
|
||||
d3d_draw_frame(priv);
|
||||
return VO_TRUE;
|
||||
case VOCTRL_GET_COLORSPACE: {
|
||||
struct mp_image_params *p = data;
|
||||
if (priv->use_shaders) { // no idea what the heck D3D YUV uses
|
||||
p->colorspace = priv->params.colorspace;
|
||||
p->colorlevels = priv->params.colorlevels;
|
||||
p->outputlevels = priv->params.outputlevels;
|
||||
}
|
||||
return VO_TRUE;
|
||||
}
|
||||
case VOCTRL_SET_EQUALIZER: {
|
||||
if (!priv->use_shaders)
|
||||
break;
|
||||
|
|
|
@ -54,8 +54,6 @@ struct priv {
|
|||
AVRational worst_time_base;
|
||||
int worst_time_base_is_stream;
|
||||
|
||||
struct mp_image_params real_colorspace;
|
||||
|
||||
bool shutdown;
|
||||
};
|
||||
|
||||
|
@ -167,11 +165,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
|||
if (encode_lavc_open_codec(vo->encode_lavc_ctx, vc->stream) < 0)
|
||||
goto error;
|
||||
|
||||
vc->real_colorspace.colorspace =
|
||||
encode_lavc_get_csp(vo->encode_lavc_ctx, vc->stream);
|
||||
vc->real_colorspace.colorlevels =
|
||||
encode_lavc_get_csp_levels(vo->encode_lavc_ctx, vc->stream);
|
||||
|
||||
vc->buffer_size = 6 * width * height + 200;
|
||||
if (vc->buffer_size < FF_MIN_BUFFER_SIZE)
|
||||
vc->buffer_size = FF_MIN_BUFFER_SIZE;
|
||||
|
@ -516,17 +509,7 @@ static void flip_page(struct vo *vo)
|
|||
|
||||
static int control(struct vo *vo, uint32_t request, void *data)
|
||||
{
|
||||
struct priv *vc = vo->priv;
|
||||
int r = VO_NOTIMPL;
|
||||
pthread_mutex_lock(&vo->encode_lavc_ctx->lock);
|
||||
switch (request) {
|
||||
case VOCTRL_GET_COLORSPACE:
|
||||
*(struct mp_image_params *)data = vc->real_colorspace;
|
||||
r = 1;
|
||||
break;
|
||||
}
|
||||
pthread_mutex_unlock(&vo->encode_lavc_ctx->lock);
|
||||
return r;
|
||||
return VO_NOTIMPL;
|
||||
}
|
||||
|
||||
const struct vo_driver video_out_lavc = {
|
||||
|
|
|
@ -366,11 +366,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
vo->want_redraw = true;
|
||||
return r ? VO_TRUE : VO_NOTIMPL;
|
||||
}
|
||||
case VOCTRL_GET_COLORSPACE:
|
||||
mpgl_lock(p->glctx);
|
||||
gl_video_get_colorspace(p->renderer, data);
|
||||
mpgl_unlock(p->glctx);
|
||||
return VO_TRUE;
|
||||
case VOCTRL_SCREENSHOT_WIN:
|
||||
mpgl_lock(p->glctx);
|
||||
*(struct mp_image **)data = glGetWindowScreenshot(p->gl);
|
||||
|
|
|
@ -540,12 +540,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
*arg = &p->hwdec_info;
|
||||
return true;
|
||||
}
|
||||
case VOCTRL_GET_COLORSPACE: {
|
||||
struct mp_image_params *params = data;
|
||||
if (va_get_colorspace_flag(p->image_params.colorspace))
|
||||
params->colorspace = p->image_params.colorspace;
|
||||
return true;
|
||||
}
|
||||
case VOCTRL_SET_EQUALIZER: {
|
||||
struct voctrl_set_equalizer_args *eq = data;
|
||||
return set_equalizer(p, eq->name, eq->value);
|
||||
|
|
|
@ -1014,15 +1014,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
struct voctrl_get_equalizer_args *args = data;
|
||||
return get_equalizer(vo, args->name, args->valueptr);
|
||||
}
|
||||
case VOCTRL_GET_COLORSPACE: {
|
||||
struct mp_image_params *params = data;
|
||||
if (vo->params && !vc->rgb_mode) {
|
||||
params->colorspace = vo->params->colorspace;
|
||||
params->colorlevels = vo->params->colorlevels;
|
||||
params->outputlevels = vo->params->outputlevels;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case VOCTRL_REDRAW_FRAME:
|
||||
if (status_ok(vo))
|
||||
video_to_output_surface(vo);
|
||||
|
|
|
@ -821,12 +821,6 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
|||
struct voctrl_get_equalizer_args *args = data;
|
||||
return xv_get_eq(vo, ctx->xv_port, args->name, args->valueptr);
|
||||
}
|
||||
case VOCTRL_GET_COLORSPACE: {
|
||||
struct mp_image_params *params = data;
|
||||
read_xv_csp(vo);
|
||||
params->colorspace = ctx->cached_csp;
|
||||
return true;
|
||||
}
|
||||
case VOCTRL_REDRAW_FRAME:
|
||||
draw_image(vo, ctx->original_image);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue