To walk:
支持触摸
To mindee:
我用QT4 buildin的Camera 去修改。
里面有两段程序代码用来找出 QVideoSurface 跟 Camera 两个有support match 的format 来做为共同的format
m_surface = new QVideoSurface(this, m_cameraFormats );
FormatSet surface_formats = m_surface->supportedFormats().toSet();
--------------------------------
m_cameraFormats : 我的camera support 的format, 为YUYV 跟MPEG
surface_formats: QVideoSurface 回传回来 有support 的format,
每次回传回来都是这五个RGB565,ARGB32,RGB32,BGRA32,BRRA24
m_surface = new QVideoSurface(this, QVideoFormatList()<< QVideoFrame::Format_RGB565);
也是只回传这五个。
深入源码找,
QVideoOutputFactory *factory = qobject_cast<QVideoOutputFactory*>(instance);
if ( factory )
d->videoOutputs << factory;
怀疑是否这是是从驱动方面抓回来有support的format