aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
authorq5sys <jt@ixsystems.com>2017-10-03 15:25:46 -0400
committerq5sys <jt@ixsystems.com>2017-10-03 15:25:46 -0400
commit2f6d29bf06e77b45daa742a5c6c65a5ed0624dab (patch)
tree0a73751c1afc18b5697c812fd87ffba701d24cd2 /src-qt5/desktop-utils
parentAdjust the border on the simple scrollbar style, and update the pkg-plist. (diff)
downloadlumina-2f6d29bf06e77b45daa742a5c6c65a5ed0624dab.tar.gz
lumina-2f6d29bf06e77b45daa742a5c6c65a5ed0624dab.tar.bz2
lumina-2f6d29bf06e77b45daa742a5c6c65a5ed0624dab.zip
Revert "rework video thumbnail code"
This reverts commit a3092fb02a1905345e1311b2e64f4796acdb9f34.
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/vidnail.cpp33
-rw-r--r--src-qt5/desktop-utils/lumina-fm/widgets/vidnail.h25
2 files changed, 0 insertions, 58 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.cpp
deleted file mode 100644
index ee7fb9e3..00000000
--- a/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "vidnail.h"
-vidnail::vidnail(QWidget *parent) : QMainWindow(parent), mplayer(parent, QMediaPlayer::VideoSurface){ //there is no UI, so not sure how to alter the constructor
-}
-
-vidnail::~vidnail()
-{
-
-vidnail::grabvideothumbnail(){
- vsurface = new QAbstractVideoSurface();
- mplayer.setVideoOutput(vsurface);
- mplayer.setMedia($file); // video file to get thumbnail of
- imageCaptured = QPixmap();
- mplayer.setPosition(2000); // time in milliseconds
- mplayer.setMuted(true); // just to make sure no sound is emited
- mplayer.play();
-
- currentFrame = frame;
- const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
- const QSize size = format.frameSize();
-
- this->imageFormat = imageFormat;
- QAbstractVideoSurface::start(format);
- QImage image( currentFrame.bits(), currentFrame.width(), currentFrame.height(), currentFrame.bytesPerLine(), imageFormat);
- imageCaptured = QPixmap::fromImage(image.copy(image.rect()));
-
-// Now do scaling with regular thumbnail process to make proper size
-
- mplayer.stop();
- vsurface.stop();
-}
-
-
-
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.h b/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.h
deleted file mode 100644
index ad565749..00000000
--- a/src-qt5/desktop-utils/lumina-fm/widgets/vidnail.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef VIDNAIL_H
-#define VIDNAIL_H
-
-#include <QMediaPlayer>
-#include <QtMultimediaWidgets>
-#include "videowidgetsurface.h"
-#include <QPixmap>
-#include <QAbstractVideoSurface>
-#include <QImage>
-#include <QRect>
-#include <QVideoFrame>
-
-public:
-
- void grabvideothumbnail();
-
-private:
-
- QAbstractVideoSurface *vsurface;
- QImage::Format imageFormat;
- QPixmap imageCaptured;
-
-
-#endif // VIDNAIL_H
-
bgstack15