Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 95627b91 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

UI: Set some options for mpv

parent 658abf03
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Video playback with mpv
...@@ -24,6 +24,8 @@ MpvContainer::MpvContainer(QWidget *parent) ...@@ -24,6 +24,8 @@ MpvContainer::MpvContainer(QWidget *parent)
quint64 wid = winId(); quint64 wid = winId();
mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &wid); mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &wid);
mpv_set_option_string(mpv, "no-config", "yes");
mpv_set_option_string(mpv, "sid", "no");
mpv_set_option_string(mpv, "input-default-bindings", "no"); mpv_set_option_string(mpv, "input-default-bindings", "no");
mpv_set_option_string(mpv, "input-vo-keyboard", "no"); mpv_set_option_string(mpv, "input-vo-keyboard", "no");
mpv_request_log_messages(mpv, "info"); mpv_request_log_messages(mpv, "info");
...@@ -191,14 +193,17 @@ MpvContainer::handleMpvEventCommandReply(const AsyncCmdType type) noexcept ...@@ -191,14 +193,17 @@ MpvContainer::handleMpvEventCommandReply(const AsyncCmdType type) noexcept
case AsyncCmdType::UnloadAss: case AsyncCmdType::UnloadAss:
rc = mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid); rc = mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid);
qDebug() << "Unloaded Ass, rc =" << rc << "and sid =" << sid; qDebug() << "Unloaded Ass, rc =" << rc << "and sid =" << sid;
if (rc != MPV_ERROR_SUCCESS) if (rc != MPV_ERROR_SUCCESS) {
printMpvError(rc);
sid = -1; sid = -1;
else } else {
unloadAssFile(); unloadAssFile();
}
break; break;
case AsyncCmdType::LoadFile: case AsyncCmdType::LoadFile:
qDebug() << "MPV - CMD: File loaded by mpv"; mpv_get_property(mpv, "sid", MPV_FORMAT_INT64, &sid);
qDebug() << "MPV - CMD: File loaded by mpv, sid =" << sid;
isPlaybackPaused = false; isPlaybackPaused = false;
mpvPause(); mpvPause();
unloadAssFile(); unloadAssFile();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter