当前位置: 首页>>代码示例>>C++>>正文


C++ QVideoSurfaceFormat::handleType方法代码示例

本文整理汇总了C++中QVideoSurfaceFormat::handleType方法的典型用法代码示例。如果您正苦于以下问题:C++ QVideoSurfaceFormat::handleType方法的具体用法?C++ QVideoSurfaceFormat::handleType怎么用?C++ QVideoSurfaceFormat::handleType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QVideoSurfaceFormat的用法示例。


在下文中一共展示了QVideoSurfaceFormat::handleType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: start

bool VideoSurface_ForQQuickItem::start(const QVideoSurfaceFormat& format)
{
    if (!supportedPixelFormats(format.handleType()).contains(format.pixelFormat())) {
        qDebug() << format.handleType() << " " << format.pixelFormat() << " - format is not supported.";
        return false;
    }
    return QAbstractVideoSurface::start(format);
}
开发者ID:Barbakas,项目名称:Augmented-Reality-on-Qt,代码行数:8,代码来源:ARCameraQml.cpp

示例2: isFormatSupported

bool QVideoSurfaceRasterPainter::isFormatSupported(
        const QVideoSurfaceFormat &format, QVideoSurfaceFormat *) const
{
    return format.handleType() == QAbstractVideoBuffer::NoHandle
            && m_imagePixelFormats.contains(format.pixelFormat())
            && !format.frameSize().isEmpty();
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: isFormatSupported

bool VideoWidgetSurface::isFormatSupported(const QVideoSurfaceFormat &format, QVideoSurfaceFormat *similar) const
{
    Q_UNUSED(similar);

    const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
    const QSize size = format.frameSize();

    return imageFormat != QImage::Format_Invalid && !size.isEmpty() && format.handleType() == QAbstractVideoBuffer::NoHandle;
}
开发者ID:yumechua,项目名称:ivp,代码行数:9,代码来源:videowidgetsurface.cpp

示例4: 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;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例5: foreach

QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
{
    dbg.nospace() << "QVideoSurfaceFormat(" << f.pixelFormat();
    dbg.nospace() << ", " << f.frameSize();
    dbg.nospace() << ", viewport=" << f.viewport();
    dbg.nospace() << ", pixelAspectRatio=" << f.pixelAspectRatio();
    dbg.nospace() << ", handleType=" << f.handleType();
    dbg.nospace() << ", yCbCrColorSpace=" << f.yCbCrColorSpace();
    dbg.nospace() << ")";

    foreach(const QByteArray& propertyName, f.propertyNames())
        dbg << "\n    " << propertyName.data() << " = " << f.property(propertyName.data());

    return dbg.space();
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:15,代码来源:qvideosurfaceformat.cpp

示例6: 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);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例7: isFormatSupported

bool QAbstractVideoSurface::isFormatSupported(const QVideoSurfaceFormat &format) const
{
    return supportedPixelFormats(format.handleType()).contains(format.pixelFormat());
}
开发者ID:wpbest,项目名称:copperspice,代码行数:4,代码来源:qabstractvideosurface.cpp


注:本文中的QVideoSurfaceFormat::handleType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。