Display Driver
Usage
86
Platform Support Products
Version 02.01.01.08
ret = ioctl (fd, VIDIOC_G_FBUF, &framebuffer);
if (ret < 0) {
perror ("VIDIOC_G_FBUF");
exit(1);
}
if(framebuffer.capability & V4L2_FBUF_CAP_CHROMAKEY) {
framebuffer.flags &= ~V4L2_FBUF_FLAG_CHROMAKEY;
ret = ioctl (fd, VIDIOC_S_FBUF, &framebuffer);
if (ret < 0) {
perror ("VIDIOC_S_FBUF");
exit(1);
}
}
Below program listing shows how to set the chromakey value. Please note that
chroma key value should be set before enabling the chroma keying. Overlay
manager should not be changed between the setting up of chroma key and
enabling the chroma keying.
struct v4l2_format fmt;
u8 chromakey = 0xF800; /* Red color RGB565 format */
fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
ret = ioctl(fd, VIDIOC_G_FMT, &fmt);
if (ret < 0) {
perror("VIDIOC_G_FMT\n");
close(fd);
exit(0);
}
fmt.fmt.win.chromakey = chromakey;
ret = ioctl(fd, VIDIOC_S_FMT, &fmt);
if (ret < 0) {
perror("VIDIOC_G_FMT\n");
close(fd);
exit(0);
}
Below example shows how to get the chromakey value.
struct v4l2_format fmt;
fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
ret = ioctl(fd, VIDIOC_G_FMT, &fmt);
if (ret < 0) {
perror("VIDIOC_G_FMT\n");
close(fd);
exit(0);
}
printf("Global alpha value read is %d\n", fmt.fmt.win.chromakey);
Summary of Contents for OMAP35 Series
Page 1: ...OMAP35x EVM Linux PSP User Guide 02 01 01 08 Published 22 May 2009 ...
Page 2: ...2 Platform Support Products Version 02 01 01 08 ...
Page 4: ...OMAP35x EVM Linux PSP 2 Platform Support Products Version 02 01 01 08 ...
Page 12: ...Version 02 01 01 08 Platform Support Products x ...
Page 16: ...Version 02 01 01 08 Platform Support Products xiv ...
Page 22: ...Version 02 01 01 08 Platform Support Products xx ...
Page 30: ...Version 02 01 01 08 Platform Support Products 8 ...
Page 58: ...Version 02 01 01 08 Platform Support Products 36 ...
Page 138: ...Version 02 01 01 08 Platform Support Products 116 ...
Page 158: ...Resizer Driver Data Structures 136 Platform Support Products Version 02 01 01 08 ...
Page 164: ...Version 02 01 01 08 Platform Support Products 142 ...
Page 170: ...Version 02 01 01 08 Platform Support Products 148 ...
Page 202: ...Version 02 01 01 08 Platform Support Products 180 ...