mirror of https://github.com/mpv-player/mpv
client: remove legacy API that is unused now
this API was introduced inc5e4538
solely for the use with cocoa-cb and was not public. with the port to the new API in760d471
it is now unused and can safely be removed.
This commit is contained in:
parent
ae2972557f
commit
a76eecdc2c
|
@ -1836,39 +1836,12 @@ int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context *ctx)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void mp_client_set_control_callback(struct mpv_opengl_cb_context *ctx,
|
||||
mpv_opengl_cb_control_fn callback,
|
||||
void *callback_ctx)
|
||||
{
|
||||
if (ctx->client_api->render_context) {
|
||||
mp_render_context_set_control_callback(ctx->client_api->render_context,
|
||||
callback, callback_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
void mp_client_set_icc_profile(struct mpv_opengl_cb_context *ctx, bstr icc_data)
|
||||
{
|
||||
if (!ctx->client_api->render_context)
|
||||
return;
|
||||
mpv_render_param param = {MPV_RENDER_PARAM_ICC_PROFILE,
|
||||
&(mpv_byte_array){icc_data.start, icc_data.len}};
|
||||
mpv_render_context_set_parameter(ctx->client_api->render_context, param);
|
||||
}
|
||||
|
||||
void mp_client_set_ambient_lux(struct mpv_opengl_cb_context *ctx, int lux)
|
||||
{
|
||||
if (!ctx->client_api->render_context)
|
||||
return;
|
||||
mpv_render_param param = {MPV_RENDER_PARAM_AMBIENT_LIGHT, &(int){lux}};
|
||||
mpv_render_context_set_parameter(ctx->client_api->render_context, param);
|
||||
}
|
||||
|
||||
int mpv_opengl_cb_render(mpv_opengl_cb_context *ctx, int fbo, int vp[4])
|
||||
{
|
||||
return mpv_opengl_cb_draw(ctx, fbo, vp[2], vp[3]);
|
||||
}
|
||||
|
||||
void *mp_get_sub_api2(mpv_handle *ctx, mpv_sub_api sub_api, bool lock)
|
||||
void *mpv_get_sub_api(mpv_handle *ctx, mpv_sub_api sub_api)
|
||||
{
|
||||
if (!ctx->mpctx->initialized)
|
||||
return NULL;
|
||||
|
@ -1882,11 +1855,6 @@ void *mp_get_sub_api2(mpv_handle *ctx, mpv_sub_api sub_api, bool lock)
|
|||
return res;
|
||||
}
|
||||
|
||||
void *mpv_get_sub_api(mpv_handle *ctx, mpv_sub_api sub_api)
|
||||
{
|
||||
return mp_get_sub_api2(ctx, sub_api, true);
|
||||
}
|
||||
|
||||
// stream_cb
|
||||
|
||||
struct mp_custom_protocol {
|
||||
|
|
|
@ -37,7 +37,6 @@ struct mp_log *mp_client_get_log(struct mpv_handle *ctx);
|
|||
struct mpv_global *mp_client_get_global(struct mpv_handle *ctx);
|
||||
struct MPContext *mp_client_get_core(struct mpv_handle *ctx);
|
||||
struct MPContext *mp_client_api_get_core(struct mp_client_api *api);
|
||||
void *mp_get_sub_api2(mpv_handle *ctx, mpv_sub_api sub_api, bool lock);
|
||||
|
||||
// m_option.c
|
||||
void *node_get_alloc(struct mpv_node *node);
|
||||
|
@ -54,14 +53,4 @@ void kill_video(struct mp_client_api *client_api);
|
|||
bool mp_streamcb_lookup(struct mpv_global *g, const char *protocol,
|
||||
void **out_user_data, mpv_stream_cb_open_ro_fn *out_fn);
|
||||
|
||||
// Legacy.
|
||||
typedef int (*mpv_opengl_cb_control_fn)(void *cb_ctx, int *events,
|
||||
uint32_t request, void *data);
|
||||
struct mpv_opengl_cb_context;
|
||||
void mp_client_set_control_callback(struct mpv_opengl_cb_context *ctx,
|
||||
mpv_opengl_cb_control_fn callback,
|
||||
void *callback_ctx);
|
||||
void mp_client_set_icc_profile(struct mpv_opengl_cb_context *ctx, bstr icc_data);
|
||||
void mp_client_set_ambient_lux(struct mpv_opengl_cb_context *ctx, int lux);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue