USB摄像头——v4l2打开设备、获取设备支持的格式【以t113-s3为例】( 二 )

< 0){perror("获取失败");break;}printf("index=%d\n",v4fmt.index);printf("flags=%d\n",v4fmt.flags);printf("description=%s\n",v4fmt.description);unsigned char *p =(unsigned char *) &v4fmt.pixelformat;printf("pixelformat=%c%c%c%c\n",p[0],p[1],p[2],p[3]);printf("reserved=%d\n",v4fmt.reserved[0]);}//关闭设备close(fd);return 0;}