mpv.opengl_cb

Undocumented in source.

Members

Aliases

mpv_opengl_cb_get_proc_address_fn
alias mpv_opengl_cb_get_proc_address_fn = void* function(void* fn_ctx, const(char)* name)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
mpv_opengl_cb_update_fn
alias mpv_opengl_cb_update_fn = void function(void* cb_ctx)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

mpv_opengl_cb_draw
int mpv_opengl_cb_draw(mpv_opengl_cb_context* ctx, int fbo, int w, int h)

Render video. Requires that the OpenGL state is initialized.

mpv_opengl_cb_init_gl
int mpv_opengl_cb_init_gl(mpv_opengl_cb_context* ctx, const(char)* exts, mpv_opengl_cb_get_proc_address_fn get_proc_address, void* get_proc_address_ctx)

Initialize the mpv OpenGL state. This retrieves OpenGL function pointers via get_proc_address, and creates OpenGL objects needed by mpv internally. It will also call APIs needed for rendering hardware decoded video in OpenGL, according to the mpv "hwdec" option.

mpv_opengl_cb_render
int mpv_opengl_cb_render(mpv_opengl_cb_context* ctx, int fbo, int[4] vp)

Deprecated. Use mpv_opengl_cb_draw(). This function is equivalent to:

mpv_opengl_cb_report_flip
int mpv_opengl_cb_report_flip(mpv_opengl_cb_context* ctx, long time)

Tell the renderer that a frame was flipped at the given time. This is optional, but can help the player to achieve better timing.

mpv_opengl_cb_set_update_callback
void mpv_opengl_cb_set_update_callback(mpv_opengl_cb_context* ctx, mpv_opengl_cb_update_fn callback, void* callback_ctx)

Set the callback that notifies you when a new video frame is available, or if the video display configuration somehow changed and requires a redraw. Similar to mpv_set_wakeup_callback(), you must not call any mpv API from the callback, and all the other listed restrictions apply (such as not exiting the callback by throwing exceptions).

mpv_opengl_cb_uninit_gl
int mpv_opengl_cb_uninit_gl(mpv_opengl_cb_context* ctx)

Destroy the mpv OpenGL state.

Structs

mpv_opengl_cb_context
struct mpv_opengl_cb_context

Opaque context, returned by mpv_get_sub_api(MPV_SUB_API_OPENGL_CB).

mpv_opengl_cb_drm_params
struct mpv_opengl_cb_drm_params
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
mpv_opengl_cb_window_pos
struct mpv_opengl_cb_window_pos

Overview

Meta