diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-06 09:24:12 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-06 09:24:12 -0400 |
commit | ae823cbc4543f5849b1629fa6e95253cdf1507be (patch) | |
tree | dbf2ceb99369f2a7ff50501636e59aed949afd1f /src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp | |
parent | Try to ensure that the transient QApplication for user file checks/updates is... (diff) | |
parent | Finished video thumnails for lumina-fm and lumina-fileinfo (diff) | |
download | lumina-ae823cbc4543f5849b1629fa6e95253cdf1507be.tar.gz lumina-ae823cbc4543f5849b1629fa6e95253cdf1507be.tar.bz2 lumina-ae823cbc4543f5849b1629fa6e95253cdf1507be.zip |
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp index 40d2d544..0fb736d3 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp @@ -25,6 +25,7 @@ MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){ SetupConnections(); player = new QMediaPlayer(this, QMediaPlayer::VideoSurface); surface = new LVideoSurface(this); + qDebug() << surface->surfaceFormat(); player->setVideoOutput(surface); player->setMuted(true); connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(setDuration(QMediaPlayer::MediaStatus))); @@ -96,7 +97,11 @@ void MainUI::LoadFile(QString path, QString type){ ui->label_file_size->setText( ui->label_file_size->text()+" ("+QString::number(pix.width())+" x "+QString::number(pix.height())+" px)" ); //qDebug() << " - done with image"; }else if(INFO->isVideo()){ - player->setMedia(QUrl("file://"+INFO->absoluteFilePath())); + timer.start(); + QMediaResource video = QMediaResource(QUrl("file://"+INFO->absoluteFilePath())); + video.setResolution(64,64); + player->setMedia(video); + //player->setMedia(QUrl("file://"+INFO->absoluteFilePath())); player->play(); player->pause(); //Pixmap set when video is loaded in stopVideo @@ -313,6 +318,8 @@ void MainUI::getXdgCommand(QString prev){ void MainUI::stopVideo(QPixmap img) { ui->label_file_icon->setPixmap( img.scaledToHeight(64) ); player->pause(); + qDebug() << timer.elapsed(); + qDebug() << player->media().canonicalResource().resolution(); } void MainUI::setDuration(QMediaPlayer::MediaStatus status) { |