Hi,
I am debugging an openMax demo about capture frames from a camera using omx 5.02.00.15.
The program process is like below.
start →
capture_init[allocate memory, buffer , pipe semp init, connect components, set components to idle] →
enter a key →
start capture [ threads created,set components to execute ] →
enter a key →
stop capture [stop threads, set components to idle, free memories ...]
→ exit
If there is no video source input (camera is power off),
the program will stop in [stop capture] part.
I found the program stopped at semp_pend,
and the capture component cannot switch state from execute to idle.
Why?
-----------------------------------------------
/* change state to idle so that buffers processing would stop */
eError =
OMX_SendCommand (pAppData->pCapHandle, OMX_CommandStateSet,
OMX_StateIdle, NULL);
if (eError != OMX_ErrorNone)
{
wprintf (L"Error from SendCommand-Idle State set :%s \n",
IL_ClientErrorToStr (eError));
return -1;
}
DBG (L" set capture state idle \n ");
semp_pend (pAppData->capILComp->done_sem);
-----------------------------------------------
I want to program close down successfully, even there is no video source input.
How to modify the program?
Regards,
Lei