本文整理汇总了C++中QVideoSurfaceFormat::scanLineDirection方法的典型用法代码示例。如果您正苦于以下问题:C++ QVideoSurfaceFormat::scanLineDirection方法的具体用法?C++ QVideoSurfaceFormat::scanLineDirection怎么用?C++ QVideoSurfaceFormat::scanLineDirection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QVideoSurfaceFormat
的用法示例。
在下文中一共展示了QVideoSurfaceFormat::scanLineDirection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: start
QAbstractVideoSurface::Error QVideoSurfaceRasterPainter::start(const QVideoSurfaceFormat &format)
{
m_frame = QVideoFrame();
m_imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
m_imageSize = format.frameSize();
m_scanLineDirection = format.scanLineDirection();
return format.handleType() == QAbstractVideoBuffer::NoHandle
&& m_imageFormat != QImage::Format_Invalid
&& !m_imageSize.isEmpty()
? QAbstractVideoSurface::NoError
: QAbstractVideoSurface::UnsupportedFormatError;
}
示例2: start
// Overridden from QAbstractVideoSurface
virtual bool start( const QVideoSurfaceFormat &format )
{
m_mutex.lock();
m_flipped = ( format.scanLineDirection() == QVideoSurfaceFormat::BottomToTop );
m_frameFormat = QVideoFrame::imageFormatFromPixelFormat( format.pixelFormat() );
m_viewport = format.viewport();
m_valid = 1;
// We want to unlock it before calling the parent function, which may call present() and deadlock
m_mutex.unlock();
return QAbstractVideoSurface::start( format );
}
示例3: constructNull
void tst_QVideoSurfaceFormat::constructNull()
{
QVideoSurfaceFormat format;
QVERIFY(!format.isValid());
QCOMPARE(format.handleType(), QAbstractVideoBuffer::NoHandle);
QCOMPARE(format.pixelFormat(), QVideoFrame::Format_Invalid);
QCOMPARE(format.frameSize(), QSize());
QCOMPARE(format.frameWidth(), -1);
QCOMPARE(format.frameHeight(), -1);
QCOMPARE(format.viewport(), QRect());
QCOMPARE(format.scanLineDirection(), QVideoSurfaceFormat::TopToBottom);
QCOMPARE(format.frameRate(), 0.0);
QCOMPARE(format.pixelAspectRatio(), QSize(1, 1));
QCOMPARE(format.yCbCrColorSpace(), QVideoSurfaceFormat::YCbCr_Undefined);
}