void VideoPlayer::on_mpv_events() { while(mpv) { mpv_event *event = mpv_wait_event(mpv, 0); if(event->event_id == MPV_EVENT_NONE) break; handle_mpv_event(event); } }
void MpvWidget::on_mpv_events() { // Process all events, until the event queue is empty. while (mpv) { mpv_event *event = mpv_wait_event(mpv, 0); if (event->event_id == MPV_EVENT_NONE) { break; } handle_mpv_event(event); } }
bool MainWindow::event(QEvent *event) { // QEvent::User is sent by wakeup(). if (event->type() == QEvent::User) { // Process all events, until the event queue is empty. while (mpv) { mpv_event *event = mpv_wait_event(mpv, 0); if (event->event_id == MPV_EVENT_NONE) break; handle_mpv_event(event); } return true; } return QMainWindow::event(event); }