VideoView.cc 549 o
#include "VideoView.hh"
#include "MpvContainer.hh"
#include "MpvControls.hh"
using namespace Vivy;
VideoView::VideoView(QWidget *parent) noexcept
: QWidget(parent)
, mpv(new MpvContainer(this))
{
auto *centralLayout = new QVBoxLayout(this);
centralLayout->addWidget(mpv, 1);
centralLayout->addWidget(new MpvControls(mpv, this));
setLayout(centralLayout);
}
void
VideoView::loadFile(const QString &filename) noexcept
{
mpv->loadFile(filename);
}
void
VideoView::forceStopPlayback() noexcept
{
mpv->mpvPause();
}