diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-10-25 19:02:16 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-10-25 19:02:25 -0400 |
commit | 76f587abe521794a71604532224b9cf7103ae50e (patch) | |
tree | dc69ad66b29a56c43bd287554b19ff986335f5b9 /src-qt5/core/libLumina/LVideoSurface.cpp | |
parent | Added the QML Video screensaver (diff) | |
download | lumina-76f587abe521794a71604532224b9cf7103ae50e.tar.gz lumina-76f587abe521794a71604532224b9cf7103ae50e.tar.bz2 lumina-76f587abe521794a71604532224b9cf7103ae50e.zip |
Removed debug outputs
Diffstat (limited to 'src-qt5/core/libLumina/LVideoSurface.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LVideoSurface.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src-qt5/core/libLumina/LVideoSurface.cpp b/src-qt5/core/libLumina/LVideoSurface.cpp index e3e87667..3aaa81f0 100644 --- a/src-qt5/core/libLumina/LVideoSurface.cpp +++ b/src-qt5/core/libLumina/LVideoSurface.cpp @@ -7,17 +7,17 @@ LVideoSurface::LVideoSurface(QObject *parent) : QAbstractVideoSurface(parent) { } bool LVideoSurface::present(const QVideoFrame &frame) { - //qDebug() << surfaceFormat().pixelFormat() << frame.pixelFormat() << surfaceFormat().frameSize() << frame.size(); + //qDebug() << surfaceFormat().frameSize() << frame.size(); if(!frameImage.isNull() && !entered) { emit frameReceived(frameImage); return true; } if(frame.isValid()) { - //qDebug() << "Recording Frame" << frame.pixelFormat(); + //qDebug() << "Recording Frame"; + //qDebug() << surfaceFormat().frameSize() << frame.size(); QVideoFrame icon(frame); icon.map(QAbstractVideoBuffer::ReadOnly); - //qDebug() << icon.width() << icon.height(); QImage img(icon.bits(), icon.width(), icon.height(), icon.bytesPerLine(), QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat())); if((frameImage.isNull() && !entered) or entered) @@ -48,10 +48,13 @@ bool LVideoSurface::start(const QVideoSurfaceFormat &format) { const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat()); const QSize size = format.frameSize(); - if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) { + //QVideoSurfaceFormat newFormat = format; + //Shrink the frames passed through the format to a smaller, thumbnail appropriate size and increase the frame rate + //newFormat.setFrameSize(258,258); + //newFormat.setFrameRate(90); + + if (imageFormat != QImage::Format_Invalid && !size.isEmpty()) QAbstractVideoSurface::start(format); - return true; - } else { - return false; - } + + return (imageFormat != QImage::Format_Invalid && !size.isEmpty()); } |