本文整理汇总了C++中QVideoSurfaceFormat::setFrameSize方法的典型用法代码示例。如果您正苦于以下问题:C++ QVideoSurfaceFormat::setFrameSize方法的具体用法?C++ QVideoSurfaceFormat::setFrameSize怎么用?C++ QVideoSurfaceFormat::setFrameSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QVideoSurfaceFormat
的用法示例。
在下文中一共展示了QVideoSurfaceFormat::setFrameSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sipNoMethod
static PyObject *meth_QVideoSurfaceFormat_setFrameSize(PyObject *sipSelf, PyObject *sipArgs)
{
PyObject *sipParseErr = NULL;
{
const QSize* a0;
QVideoSurfaceFormat *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QVideoSurfaceFormat, &sipCpp, sipType_QSize, &a0))
{
sipCpp->setFrameSize(*a0);
Py_INCREF(Py_None);
return Py_None;
}
}
{
int a0;
int a1;
QVideoSurfaceFormat *sipCpp;
if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QVideoSurfaceFormat, &sipCpp, &a0, &a1))
{
sipCpp->setFrameSize(a0,a1);
Py_INCREF(Py_None);
return Py_None;
}
}
/* Raise an exception if the arguments couldn't be parsed. */
sipNoMethod(sipParseErr, sipName_QVideoSurfaceFormat, sipName_setFrameSize, doc_QVideoSurfaceFormat_setFrameSize);
return NULL;
}
示例2: isValid
/* Test case for api isValid */
void tst_QVideoSurfaceFormat::isValid()
{
/* When both pixel format and framesize is not valid */
QVideoSurfaceFormat format;
QVERIFY(!format.isValid());
/* When framesize is valid and pixel format is not valid */
format.setFrameSize(64,64);
QVERIFY(format.frameSize() == QSize(64,64));
QVERIFY(!format.pixelFormat());
QVERIFY(!format.isValid());
/* When both the pixel format and framesize is valid. */
QVideoSurfaceFormat format1(QSize(32, 32), QVideoFrame::Format_AYUV444);
QVERIFY(format1.isValid());
/* When pixel format is valid and frame size is not valid */
format1.setFrameSize(-1,-1);
QVERIFY(!format1.frameSize().isValid());
QVERIFY(!format1.isValid());
}