Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Vivy
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
Vivy
Validations
2b154981
Vérifiée
Valider
2b154981
rédigé
Il y a 3 ans
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
MPV: Try to create the MPV context if trying to play and the MPV context is not create
parent
e29ec472
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
1 requête de fusion
!26
MPV: Fix the MPV controls
Pipeline
#2502
réussi
Il y a 3 ans
Étape : build
Modifications
1
Pipelines
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/UI/DocumentViews/MpvContainer.cc
+8
-0
8 ajouts, 0 suppression
src/UI/DocumentViews/MpvContainer.cc
avec
8 ajouts
et
0 suppression
src/UI/DocumentViews/MpvContainer.cc
+
8
−
0
Voir le fichier @
2b154981
...
@@ -7,6 +7,12 @@ using namespace std::string_literals;
...
@@ -7,6 +7,12 @@ using namespace std::string_literals;
if ((ptr) == nullptr) \
if ((ptr) == nullptr) \
return
return
#define TRY_CREATE_MPV(ptr) \
if ((ptr) == nullptr) { \
logInfo() << "Asked to play MPV but context not created, try to create it"; \
reCreateMpvContext(); \
}
void
void
MpvContainer
::
mpvEventWakeUpCB
(
void
*
user
)
noexcept
MpvContainer
::
mpvEventWakeUpCB
(
void
*
user
)
noexcept
{
{
...
@@ -297,6 +303,7 @@ MpvContainer::printMpvError(int rc) const noexcept
...
@@ -297,6 +303,7 @@ MpvContainer::printMpvError(int rc) const noexcept
void
void
MpvContainer
::
mpvPlay
()
noexcept
MpvContainer
::
mpvPlay
()
noexcept
{
{
TRY_CREATE_MPV
(
mpv
);
RETURN_IF_NULLPTR
(
mpv
);
RETURN_IF_NULLPTR
(
mpv
);
if
(
isPlaybackPaused
)
if
(
isPlaybackPaused
)
mpvTogglePlayback
();
mpvTogglePlayback
();
...
@@ -313,6 +320,7 @@ MpvContainer::mpvPause() noexcept
...
@@ -313,6 +320,7 @@ MpvContainer::mpvPause() noexcept
void
void
MpvContainer
::
mpvTogglePlayback
()
noexcept
MpvContainer
::
mpvTogglePlayback
()
noexcept
{
{
TRY_CREATE_MPV
(
mpv
);
RETURN_IF_NULLPTR
(
mpv
);
RETURN_IF_NULLPTR
(
mpv
);
logDebug
()
<<
"MPV: Toggling the playback"
;
logDebug
()
<<
"MPV: Toggling the playback"
;
asyncCommand
(
AsyncCmdType
::
TogglePlayback
,
{
"cycle"
,
"pause"
,
"up"
,
nullptr
});
asyncCommand
(
AsyncCmdType
::
TogglePlayback
,
{
"cycle"
,
"pause"
,
"up"
,
nullptr
});
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter