毫无疑问mpv也支持事件订阅,通过mpv_observe_property函数将需要订阅的属性事件更改加入事件订阅队列,这个函数有四个参数,第一个参数指mpv对象(通过mpv_create产生的),第二个参数指用户数据..., "dwidth", MPV_FORMAT_INT64, &dwidth);
mpv_get_property(mpvPlayer, "dheight", MPV_FORMAT_INT64...*mpvPlayer)
{
mpv_observe_property(mpvPlayer, 0, "duration", MPV_FORMAT_DOUBLE);
mpv_observe_property...(mpvPlayer, 0, "time-pos", MPV_FORMAT_DOUBLE);
mpv_observe_property(mpvPlayer, 0, "track-list", MPV_FORMAT_NODE...);
mpv_observe_property(mpvPlayer, 0, "chapter-list", MPV_FORMAT_NODE);
}