When use struct v4l2_capability to get out card name in bttv the
output of card name is truncated to 32 characters.
I use this code to get card name:

    char *v4l2_get_name(char *device)
    {
        struct v4l2_capability caps;

        if ((fd = open(device, O_RDONLY)) < 0)
            goto err;

        if (ioctl(fd, VIDIOC_QUERYCAP, &caps) < 0) {
            perror("VIDIOC_QUERYCAP");
            goto err;
        }
        close(fd);

        return strndup((char *)caps.card, sizeof(caps.card));

    err:
        if (fd >= 0)
            close(dev->fd);
        fd = -1;

        return NULL;
    }

print truncated card name output (example for card=165):

    BT878 video (Kworld V-Stream XP

instade of full card name:

    Kworld V-Stream Xpert TV PVR878

I here same way to get full card name?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to