Programming Guide
157
Close device
Close the device with close () if you no longer use this device.
Close ( fd);
IO control
IO control is a technology communication with driver. V4L sets up
many standard IO controls which control video parameters to or
get information from driver. Here we give you an example of sim-
ple settings.
void init_device (void)
{
struct v4l2_capability cap;
struct v4l2_cropcap cropcap;
struct v4l2_crop crop;
struct v4l2_format fmt
v4l2_std_id std = V4L2_STD_NTSC_M;
if (-1 == ioctl (fd, VIDIOC_QUERYCAP, &cap))
{
if (EINVAL == errno) {
fprintf (stderr, "%s is no V4L2
device\n", dev_name);
exit (EXIT_FAILURE);
} else {
exit (EXIT_FAILURE);
}
}
if (!(cap.capabilities &
V4L2_CAP_VIDEO_CAPTURE)) {
fprintf (stderr, "%s is no video
capture device\n", dev_name);
exit (EXIT_FAILURE);
}
if (!(cap.capabilities &
V4L2_CAP_STREAMING)) {
fprintf (stderr, "%s does not support
streaming i/o\n", dev_name);
exit (EXIT_FAILURE);
}
/* Select video input, video standard and
tune here. */
if (-1 == ioctl (fd, VIDIOC_S_STD, &std)) {
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 ...