From 133b2b18232f1faa766e725e8e3add904827cfd0 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Sun, 16 Jul 2023 19:15:07 +0200 Subject: [PATCH] mpv support --- kino.cpp | 34 ++++++++++++++++++++++++++++------ kino.h | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/kino.cpp b/kino.cpp index 992de94..1423b84 100644 --- a/kino.cpp +++ b/kino.cpp @@ -49,13 +49,15 @@ Kino::Kino(QWidget* parent, Qt::WindowFlags f): QWidget(parent, f) bar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); bar->setIconSize(QSize(48,48)); QAction*a=mplayaction=bar->addAction(QIcon(":/play-dvd.png"),"&Play",this,SLOT(playMedia())); - a->setToolTip("Play Media: Alt-P\nPlay without full-screen: Alt-Shift-P"); + a->setToolTip("Play Media:\n Alt-P - Xine fullscreen\n Alt-Shift-P - Xine Window\n Alt-V - VLC fullscreen\n Alt-Shift-V - VLC Window\n Alt-M - MPV fullscreen\n Alt-Shift-M - MPV Window"); QMenu*m=new QMenu; a->setMenu(m); a=m->addAction("Play with Xine",this,SLOT(playMedia()),QKeySequence("Alt+P")); a=m->addAction("Play with Xine, no FullScreen",this,[this](){this->playMedia(false);},QKeySequence("Alt+Shift+P")); a=m->addAction("Play with VLC",this,[this](){this->playMedia(true,Player::Vlc);},QKeySequence("Alt+V")); a=m->addAction("Play with VLC, no FullScreen",this,[this](){this->playMedia(false,Player::Vlc);},QKeySequence("Alt+Shift+V")); + a=m->addAction("Play with MPV",this,[this](){this->playMedia(true,Player::Mpv);},QKeySequence("Alt+M")); + a=m->addAction("Play with MPV, no FullScreen",this,[this](){this->playMedia(false,Player::Mpv);},QKeySequence("Alt+Shift+M")); a=meditaction=bar->addAction(QIcon(":/configure.png"),"&Edit Description",this,SLOT(editMedia())); a->setShortcut(QKeySequence("Alt+E")); a->setToolTip("Edit Media Description: Alt-E"); @@ -156,6 +158,17 @@ void Kino::findRoot() // qDebug()<<"Searching for kino.ini in"<