摄像头的驱动已经添加进内核了,插入usb摄像头的时候提示
[root@EmbedSky /]# usb 1-1.4: USB disconnect, address 3
usb 1-1.4: new high speed USB device using s5p-ehci and address 4
uvcvideo: Found UVC 1.00 device USB2.0 Camera (1e4e:0102)
uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
input: USB2.0 Camera as /devices/platform/s5p-ehci/usb1/1-1/1-1.4/1-1.4:1.0/input/input7
这就证明了摄像头的驱动是行的。
找到问题所在了,只要把tqcamera.cpp的312行的
format = QImage::Format_RGB16;
修改为
format = QImage::Format_RGB888;
修改后如下:
#ifdef TQ210
if (g_strDevName.contains("video", Qt::CaseInsensitive))
#else
if (g_strDevName.contains("camera",
Qt::CaseInsensitive))
#endif
{
format = QImage::Format_RGB888;