/* 下面解释上面这个数据结构中包含的数据结构,这些结构的定义都在中。 */ /* * struct video_capability */ /* name[32] Canonical name for this interface */ /* type Type of interface */ /* channels Number of radio/tv channels if appropriate */ /* audios Number of audio devices if appropriate */ /* maxwidth Maximum capture width in pixels */ /* maxheight Maximum capture height in pixels */ /* minwidth Minimum capture width in pixels */ /* minheight Minimum capture height in pixels */
/* 在程序中,通过ioctl函数的VIDIOCGCAP控制命令读写设备通道已获取这个结构,有关ioctl的使用,比较复杂,这里就不说了。下面列出获取这一数据结构的代码: */ int v4lgetcapability(v4ldevice *vd) { if(ioctl(vd->fd, VIDIOCGCAP, &(vd->capability)) < 0) { v4lperror("v4lopen:VIDIOCGCAP"); return -1; } return 0; } /* * struct video_picture */ /* brightness Picture brightness */ /* hue Picture hue (colour only) */ /* colour Picture colour (colour only) */ /* contrast Picture contrast */ /* whiteness The whiteness (greyscale only) */ /* depth The capture depth (may need to match the frame buffer depth) */ /* palette Reports the palette that should be used for this image */
/* 这个数据结构主要定义了图像的属性,诸如亮度,对比度,等等。这一结构的获取通过ioctl发出VIDIOCGPICT控制命令获取。 */ /* * struct video_mbuf */ /* size The number of bytes to map */ /* frames The number of frames */ /* offsets The offset of each frame */
文章评论(0条评论)
登录后参与讨论