Skip to content

Commit

Permalink
videoframe extractor fix and videpreviewwidget fix and feature additions
Browse files Browse the repository at this point in the history
  • Loading branch information
cculianu committed Jul 6, 2017
1 parent 3360595 commit 68d8544
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 89 deletions.
3 changes: 2 additions & 1 deletion qml/QuickVideoPreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ QuickVideoPreview::QuickVideoPreview(QQuickItem *parent) : BaseQuickRenderer(par
{
connect(&m_extractor, SIGNAL(positionChanged()), this, SIGNAL(timestampChanged()));
connect(&m_extractor, SIGNAL(frameExtracted(QtAV::VideoFrame)), SLOT(displayFrame(QtAV::VideoFrame)));
connect(&m_extractor, SIGNAL(error()), SLOT(displayNoFrame()));
connect(&m_extractor, SIGNAL(error(const QString &)), SLOT(displayNoFrame()));
connect(&m_extractor, SIGNAL(aborted(const QString &)), SLOT(displayNoFrame()));
connect(this, SIGNAL(fileChanged()), SLOT(displayNoFrame()));
}

Expand Down
6 changes: 2 additions & 4 deletions src/QtAV/VideoFrameExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ class Q_AV_EXPORT VideoFrameExtractor : public QObject
void setPosition(qint64 value);
qint64 position() const;

virtual bool event(QEvent *e);
Q_SIGNALS:
void frameExtracted(const QtAV::VideoFrame& frame); // parameter: VideoFrame, bool changed?
void sourceChanged();
void asyncChanged();
void error(); // clear preview image in a slot
void error(const QString &errorMessage); ///< emitted with a helpful error message -- connect to this to show empty image in preview widget
void aborted(const QString &abortMessage); ///< emitted when aborting the current preview -- if user requested a new preview this usually gets emitted. connect to this to show empty preview
void autoExtractChanged();
/*!
* \brief positionChanged
Expand All @@ -81,8 +81,6 @@ class Q_AV_EXPORT VideoFrameExtractor : public QObject
void positionChanged();
void precisionChanged();

void aboutToExtract(qint64 pos);

public Q_SLOTS:
/*!
* \brief extract
Expand Down
Loading

0 comments on commit 68d8544

Please sign in to comment.