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.

saLoopBack & graphic overlay

Hi Everyone,

I'm working with the EZSDK (5.04.00.11) on the EVM-8168. My goal is to get a graphic application like the Matrix_GUI to be overlaid with transparency on top of the video displayed by the saLoopBack example in the EZSDK.

When I tried to run saLoopBack with the graphic plane turned on, I got a messed up display. I think the reason is because saLoopBack uses a buffer allocated by /dev/fb0 which is shared with the Matrix_GUI program. Am I correct?

Therefore, I tried to modify saLoopBack to allocate a different memory region. I did that by replacing the following call in setupBuffers()

buffer_addr[0] = (unsigned char *)mmap(0,
buffersize * MAX_BUFFER,
(PROT_READ | PROT_WRITE),
MAP_SHARED, fbdev_fd, 0);

by this call

buffer_addr[0] = (char*)malloc(buffersize *  MAX_BUFFER);

However, at run time, I got the following errors:

VPSS_FVID2: contrl event 0x5 timeout
VPSS_FVID2: contrl event 0x10020003 timeout
ti81xxvin ti81xxvin: ti81xxvin_vps_create failed
ti81xxvin ti81xxvin: Vps create failed
VIDIOC_DQBUF
: Invalid argument
VPSS_FVID2: contrl event 0x10040018 timeout
VPSS_DCTRL: failed to get node input status
VPSS_FVID2: contrl event 0x10040018 timeout
VPSS_DCTRL: failed to get node input status
VPSS_VIDEO: Remove Video0 Edges failed

The buffer used in saLoopBack is of type V4L2_MEMORY_USERPTR. I should be able to queue application-allocated memory, right? What am I missing?

Thanks a lot,

Binh