#include "mpvwidget.h"
MpvWidget::MpvWidget()
{
init();
}
MpvWidget::~MpvWidget()
{
mpv_opengl_cb_uninit_gl(context);
}
static void* on_frame_ready(void *ctx, const char *name)
{
void *res;
return res;
}
void MpvWidget::init()
{
if(mpv_opengl_cb_init_gl(context,NULL,on_frame_ready,NULL)<0)
{
throw std::runtime_error("[MpvWidget] cb init gl failed.");
}
}