Skip to content

Commit

Permalink
fix qt5.7 build wang-bin#717
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Sep 16, 2016
1 parent 568f8c7 commit bc46ae4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
12 changes: 4 additions & 8 deletions qml/QmlAV/QuickVideoPreview.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,16 @@
#define QTAV_QUICKVIDEOPREVIEW_H

#include <QtAV/VideoFrameExtractor.h>
#define CONFIG_FBO_ITEM (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
#if CONFIG_FBO_ITEM
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
#include <QmlAV/QuickFBORenderer.h>
typedef QuickFBORenderer BaseQuickRenderer;
#else
#include <QmlAV/QQuickItemRenderer.h>
typedef QQuickItemRenderer BaseQuickRenderer;
#endif
namespace QtAV {

class QuickVideoPreview
#if CONFIG_FBO_ITEM
: public QuickFBORenderer
#else
: public QQuickItemRenderer
#endif
class QuickVideoPreview : public BaseQuickRenderer
{
Q_OBJECT
// position conflicts with QQuickItem.position
Expand Down
7 changes: 1 addition & 6 deletions qml/QuickVideoPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,7 @@

namespace QtAV {

QuickVideoPreview::QuickVideoPreview(QQuickItem *parent) :
#if CONFIG_FBO_ITEM
QuickFBORenderer(parent)
#else
QQuickItemRenderer(parent)
#endif
QuickVideoPreview::QuickVideoPreview(QQuickItem *parent) : BaseQuickRenderer(parent)
{
connect(&m_extractor, SIGNAL(positionChanged()), this, SIGNAL(timestampChanged()));
connect(&m_extractor, SIGNAL(frameExtracted(QtAV::VideoFrame)), SLOT(displayFrame(QtAV::VideoFrame)));
Expand Down

0 comments on commit bc46ae4

Please sign in to comment.