This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need a test app VPSS alpha blending



I am trying to create a quick application using the code fragments found in the TI814x VPSS User guide to figure out and test the alpha blending features of the TI814x. My overall goal is to alpha blend graphics over my video so we can control have graphical control features (play, pause, stop, etc.).

Using:

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("Croma value read is %d\n", fmt.fmt.win.chromakey);

I want to create an executable application to get the chromakey. So far I have:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/videodev2.h>
#include <linux/fb.h>
#include <fcntl.h>
#include<errno.h>

int main()
{
    int fd = open ("/dev/fb0", O_RDWR);

    struct v4l2_format fmt;
    fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY;
    int ret = ioctl(fd, VIDIOC_G_FMT, &fmt);
    if (ret < 0) {
        perror("VIDIOC_G_FMT\n");
        close(fd);
        exit(0);
    }
    printf("Croma value read is %d\n", fmt.fmt.win.chromakey);

    close (fd);
    return 0;
}

It builds and runs but I get:

root@touchlink-00183269cc27:~# ./fbtest
ti81xxfb ti81xxfb: Unknown ioctl 0xc0cc5604
VIDIOC_G_FMT
: Bad address

What do I need to do to get the chromakey value?