This thread is a sort of continuation and rebirth of this one which is unresolved as of now:
http://e2e.ti.com/support/dsp/integra_dsparm/f/625/p/121270/449518.aspx
I used the decode_display demo that was provided here along with some corrections provided here and here to create a working decode and display application for a single video using a single decoder at 1080p60.
I then converted the application to work with 2 separate videos and decode them simultaneously by:
- - fixing a bug that I found (change memset(pAppDataPtr, 0x00, sizeof(IL_Client)); to memset(pAppDataPtr, 0x00, sizeof(IL_Client)); in IL_ClientInit() )
- - altering IL_ClientSetDisplayParams() to set nDrvInstID differently so that the first video could be outputted to HDMI and the second to analogue DAC.
- - using 2 separate instances of an IL_Client struct - one for each video
- - splitting the Decode_Display_Example() function into 2 parts. The first part is run sequentially for each video as a normal unthreaded function in order to set up the OMX components, connect them, and set them to IDLE state. The second part is a thread (one thread is run concurrently for each video clip) which changes the state of each set of components to execute and then sleeps for 30 seconds in order to allow each video to be decoded and displayed on their respective video displays.
In practise I have never had both videos being decoded in parallel, let alone managed to progress both sets of components beyond the IDLE state.
Here is a summary of what happened when I tested the new application (I've just checked this again on my EVM).
- The first time the non-threaded "normal" function is called (for the first video clip) completes fine with its final step of setting the display state to IDLE. The second time it's called (for the second video clip) hangs at the first ever semp_pend(pAppData->decILComp->done_sem)call just before the "state IDLE" printf.
- Forcefully slowing the execution of the function down with sleep() statements causes the non-threaded function to fail (with the second video) at an earlier stage than above: after the first ever call of the OMX_AllocateBuffer(). It hangs after the first call and the second call blocks and never completes.
- This suggests one of the OMX framework threads operating in the background (presumably from setting up the first video OMX chain) is causing an issue.
- I have tried using gdbserver on the target with gdb on the host to debug the application however I find it hangs in the platform_init() call and doesn't return control to gdb. (I edited ti-ezsdk_dm816x-evm_5_01_01_80\omx_05_01_01_80\packages\makerules\rules_a8_extend.mk to change the "-O2" to "-g" and rebuilt the OMX framework).
Hope this clears up the current state of where I've got to with the dual decode display application. Any help obviously would be extremely gratefully appreciated.
Thanks,
Ralph