Greetings:
To evaluate the quality of the system as I mentioned before, I try to combine the code from DM365 DVSDK and Leopard together. But I met some problem. Here are some details.
I migrate the image capture part in the Leopard code to instead of the input part of the dvsdk code. And the code running normally. The message on the console window is as below:
Q_BUF Done
Queing buffer:1
Q_BUF Done
Queing buffer:2
Q_BUF Done
Queing buffer:3
Q_BUF Done
STREAMON Done
But when I tried to communicate between the main thread and the capture thread, EDMAK Error happens. And the corresponding code is as below:
fifoRet = Fifo_get(envp->hInFifo, &hDstBuf);
if (fifoRet < 0) {
ERR("Failed to get buffer from video thread\n");
cleanup(THREAD_FAILURE);
}
/* Did the video thread flush the fifo? */
if (fifoRet == Dmai_EFLUSH) {
cleanup(THREAD_SUCCESS);
}
After the invoke of Fifo_get(); the function returns Dmai_EFLUSH. Then EDMAK Error happend. The message on the console window is :
EDMAK Error: dma_ioctl: REQUESTDMA failed: -22
EDMA Error: EDMA_IOCREQUESTDMA error
Error: Failed to create video encoder: h264enc
I haven't change any code about thread communication but just used another way to capture image from the mt9p031 sensor.
And the edmak.ko is insmoded correctly.
Thanks for advice !
Best Regards;