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))); connect(&m_extractor, SIGNAL(error()), SLOT(displayNoFrame())); connect(this, SIGNAL(fileChanged()), SLOT(displayNoFrame())); }
QuickVideoPreview::QuickVideoPreview(QQuickItem *parent) : #if CONFIG_FBO_ITEM QuickFBORenderer(parent) #else QQuickItemRenderer(parent) #endif { 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(this, SIGNAL(fileChanged()), SLOT(displayNoFrame())); } void QuickVideoPreview::setTimestamp(int value) { m_extractor.setPosition((qint64)value); }