158
Programming
Guide
exit (EXIT_FAILURE);
}
/* Change to the default channel */
int channel = 0;
if (-1 == ioctl (fd, VIDIOC_S_INPUT,
&channel)) {
exit (EXIT_FAILURE);
}
memset (&cropcap, 0, sizeof (cropcap));
cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (0 == ioctl (fd, VIDIOC_CROPCAP,
&cropcap)) {
crop.type =
V4L2_BUF_TYPE_VIDEO_CAPTURE;
crop.c = cropcap.defrect; /* reset to
default */
if (-1 == ioctl (fd, VIDIOC_S_CROP,
&crop)) {
switch (errno) {
case EINVAL:
/* Cropping not supported */
break;
default:
/* Errors ignored. */
break;
}
}
} else {
/* Errors ignored. */
}
memset (&fmt, 0, sizeof (fmt));
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width = 640;
fmt.fmt.pix.height = 240;
fmt.fmt.pix.pixelformat =
V4L2_PIX_FMT_BGR24;
fmt.fmt.pix.field = V4L2_FIELD_ALTERNATE;//
per field (odd and even)
if (-1 == ioctl (fd, VIDIOC_S_FMT, &fmt))
exit (EXIT_FAILURE);
}
Summary of Contents for cRTV-24
Page 4: ......
Page 8: ...List of Tables iv Table 5 2 C C Data Types 83 Table 5 3 Pixel Data 122 ...
Page 10: ......
Page 18: ...8 Introduction ...
Page 34: ...24 Hardware Reference Figure 2 8 STRG Address Jumpers ...
Page 55: ...Installation Guide 45 Figure 3 2 cRTV 24 3U cPCI ...
Page 61: ...Installation Guide 51 ...
Page 62: ...52 Installation Guide ...
Page 64: ...54 Installation Guide The Device Manager should be as follows ...
Page 67: ...Installation Guide 57 ...
Page 68: ...58 Installation Guide 3 When the following window appears please click Con tinue Anyway ...
Page 70: ...60 Installation Guide The Device Manager should be as follows ...
Page 72: ...62 Installation Guide 3 Click the Finish button to finish the installation ...
Page 76: ...66 Installation Guide ...
Page 144: ...134 Function Library ...
Page 174: ...164 Programming Guide ...