/*! Set the video surface native \a resolution. This function can be called by implementors of this interface to specify to frame producers what the native resolution of this surface is. */ void QAbstractVideoSurface::setNativeResolution(const QSize &resolution) { Q_D(QAbstractVideoSurface); if (d->nativeResolution != resolution) { d->nativeResolution = resolution; emit nativeResolutionChanged(resolution); } }
/*! Set the video surface native \a resolution. \since 1.1 */ void QAbstractVideoSurface::setNativeResolution(const QSize &resolution) { const QSize nativeResolution = property("_q_nativeResolution").toSize(); if (nativeResolution != resolution) { setProperty("_q_nativeResolution", resolution); emit nativeResolutionChanged(resolution); } }
/*! \since 1.2 */ bool QEglImageTextureSurface::start(const QVideoSurfaceFormat &format) { #ifdef DEBUG_OMAPFB_SURFACE qDebug() << Q_FUNC_INFO << format; #endif m_fallbackSurfaceActive = false; if (format.handleType() != EGLImageTextureHandle) { qWarning() << Q_FUNC_INFO << "Non EGLImageTextureHandle based format requested, fallback to QPainterVideoSurface"; connect(m_fallbackSurface, SIGNAL(activeChanged(bool)), this, SIGNAL(activeChanged(bool))); connect(m_fallbackSurface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)), this, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat))); connect(m_fallbackSurface, SIGNAL(supportedFormatsChanged()), this, SIGNAL(supportedFormatsChanged())); connect(m_fallbackSurface, SIGNAL(nativeResolutionChanged(QSize)), this, SIGNAL(nativeResolutionChanged(QSize))); connect(m_fallbackSurface, SIGNAL(frameChanged()), this, SIGNAL(frameChanged())); if (m_fallbackSurface->start(format)) { m_fallbackSurfaceActive = true; QAbstractVideoSurface::start(format); } else { qWarning() << Q_FUNC_INFO << "failed to start video surface:" << m_fallbackSurface->error(); setError(m_fallbackSurface->error()); disconnect(m_fallbackSurface, SIGNAL(activeChanged(bool)), this, SIGNAL(activeChanged(bool))); disconnect(m_fallbackSurface, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat)), this, SIGNAL(surfaceFormatChanged(QVideoSurfaceFormat))); disconnect(m_fallbackSurface, SIGNAL(supportedFormatsChanged()), this, SIGNAL(supportedFormatsChanged())); disconnect(m_fallbackSurface, SIGNAL(nativeResolutionChanged(QSize)), this, SIGNAL(nativeResolutionChanged(QSize))); disconnect(m_fallbackSurface, SIGNAL(frameChanged()), this, SIGNAL(frameChanged())); } return m_fallbackSurfaceActive; }