Hi,
I 'm developing a DVR system. The recording process runs 5 H264 CIF encoder in 5 threads. The decoder process runs 1 H264 decoder.
While record process is running , two decoder process may be running at the same time since we want to support 2 channel playback.
Both encoder anddecoder process call loopbackCombo.x64P through LAD.
It's ok to run the first decoder process . But if I run the second decoder, it complains failed to open video decoder with CE_DEBUG=2 output at the following,
Would any one give me some hints? Thanks
(DVSDK 1.30 with Codec Engine updated to 2.10, LSP 1.2, DM6446 EVM)
//================================================================
@0,022,655us: [+0 T:0x40018578] ti.sdo.ce.osal.Sem - Sem_create> count: 0
@0,022,931us: [+0 T:0x40018578] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x1b6668]
@0,023,114us: [+0 T:0x40018578] ti.sdo.ce.osal.Sem - Sem_create> count: 0
@0,023,302us: [+0 T:0x40018578] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x1b6680]
@0,023,515us: [+0 T:0x40018578] OT - Thread_create> Enter (fxn=0x4012fb6c, attrs=0x0)
@0,024,303us: [+0 T:0x40018578] OT - Thread_create> Exit (task=0x1b66b8)
@0,024,792us: [+0 T:0x40018578] ti.sdo.ce.alg - ALG_init> Enter
@0,024,980us: [+0 T:0x40018578] ti.sdo.ce.alg - ALG_init> Exit
@0,025,347us: [+6 T:0x40018578] CE - Engine_init> CE debugging on (CE_DEBUG=2; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
@0,025,704us: [+0 T:0x40018578] CS - Server_init()
@0,025,864us: [+0 T:0x40018578] CS - Server_init> Global_useLinkArbiter = 1
@0,035,934us: [+0 T:0x41288b60] CE - Engine_open> Enter('encodedecode', 0x0, 0x412881f4)
@0,036,329us: [+0 T:0x41288b60] CE - rserverOpen('loopbackCombo.x64P'), count = 0
@0,036,553us: [+0 T:0x41288b60] OP - Processor_create> Enter(imageName='loopbackCombo.x64P', linkCfg='CE_default', attrs=0x41288178)
@0,036,785us: [+0 T:0x41288b60] OP - doCmd> Enter (cmdId=1, proc=0x1b69c8)
@0,036,976us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x1b6668]
@0,037,279us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x1b6668]
@0,037,523us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x1b6680] timeout[0xffffffff]
@0,037,952us: [+1 T:0x40a88b60] OP - daemon> thread created.
@0,038,179us: [+0 T:0x40a88b60] OP - getCmd_d> Enter (proc=0x40a885a4)
@0,038,333us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x1b6668] timeout[0xffffffff]
@0,038,506us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x1b6668] status[0]
@0,038,671us: [+0 T:0x40a88b60] OP - getCmd_d> Exit (result=1)
@0,038,808us: [+0 T:0x40a88b60] OP - Processor_create_d> Enter(proc=0x1b69c8)
@0,043,515us: [+2 T:0x40a88b60] OP - Processor_create_d> LAD_connect status = 0, handle = 2
@0,043,740us: [+2 T:0x40a88b60] OP - Processor_create_d> Loading loopbackCombo.x64P on DSP, linkConfigName= CE_default ...
@0,045,617us: [+2 T:0x40a88b60] OP - Processor_create_d> LAD_startupDsp status = 4
PROC_attach(): calling DRV_INITIALIZE(0x0)...
@0,049,653us: [+2 T:0x40a88b60] OP - Processor_create_d> return (1)
@0,049,857us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x1b6680]
@0,051,653us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x1b6680] status[0]
@0,051,932us: [+0 T:0x41288b60] OP - doCmd> Exit (result=1)
@0,052,082us: [+0 T:0x41288b60] OP - Processor_create> return (0x1b69c8)
@0,052,231us: [+0 T:0x41288b60] CE - rserverOpen('loopbackCombo.x64P'): 0x40160e9c done.
@0,061,131us: [+0 T:0x41288b60] CE - checkServer(0x1b6998)
@0,061,730us: [+0 T:0x41288b60] CE - rmsInit> RMS initialized(0x1b6998); CE_DEBUG on, setting DSP trace mask to *+01234567,CR=67,ti.sdo.fc.dman3-2,ti.sdo.fc.dskt2-2,GT_prefix=1235,GT_time=3
@0,062,052us: [+0 T:0x41288b60] CE - Engine_setTrace> Enter(engine=0x1b6998, mask='*+01234567,CR=67,ti.sdo.fc.dman3-2,ti.sdo.fc.dskt2-2,GT_prefix=1235,GT_time=3')
@0,062,290us: [+0 T:0x41288b60] CE - Engine_setTrace> return(14)
@0,062,487us: [+0 T:0x41288b60] CE - Engine_open> return(1796504)
@0,062,709us: [+0 T:0x41288b60] ti.sdo.ce.video.VIDDEC - VIDDEC_create> Enter (engine=0x1b6998, name='viddec', params=0x1628c8)
@0,062,978us: [+0 T:0x41288b60] CV - VISA_create(0x1b6998, 'viddec', 0x1628c8, 0x836, 'ti.sdo.ce.video.IVIDDEC')
@0,063,246us: [+0 T:0x41288b60] CV - VISA_create2(0x1b6998, 'viddec', 0x1628c8, 0x1c, 0x836, 'ti.sdo.ce.video.IVIDDEC')
@0,063,619us: [+0 T:0x41288b60] CE - Engine_createNode(0x1b6998, 'viddec', 836, 0x1628c8, 0x1c, 0x41288178)
@0,063,834us: [+0 T:0x41288b60] CE - Engine> allocNode Enter(engine=0x1b6998, impId='viddec')
@0,064,044us: [+0 T:0x41288b60] CE - Engine> allocNode(). Calling Comm_create(gppfromnode_1266_1, 0x1b6e70, NULL)
@0,065,607us: [+6 T:0x41288b60] CE - Engine_createNode> Remote node creation FAILED (0x80008008).
@0,065,837us: [+2 T:0x41288b60] CE - Engine_createNode> Returning 0x0
@0,066,063us: [+2 T:0x41288b60] CV - VISA_create> FAILED to create remote codec (0xe).
@0,066,278us: [+0 T:0x41288b60] CV - VISA_delete(0x1b6e30)
@0,407,443us: [+5 T:0x41288b60] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
@0,407,761us: [+0 T:0x41288b60] ti.sdo.ce.video.VIDDEC - VIDDEC_create> return (0x0)
[dm644xh264 @ 0x12bdd0]Error in creating viddec decoder
@0,408,202us: [+0 T:0x41288b60] CE - Engine_close(0x1b6998)
@0,409,018us: [+0 T:0x41288b60] CE - rserverClose(0x40160e9c), count = 1
@0,409,256us: [+0 T:0x41288b60] OP - Processor_delete> Enter(proc=0x1b69c8)
@0,409,423us: [+0 T:0x41288b60] OP - doCmd> Enter (cmdId=2, proc=0x1b69c8)
@0,409,569us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x1b6668]
@0,409,731us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x1b6668]
@0,409,884us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x1b6680] timeout[0xffffffff]
@0,410,208us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x1b6680]
@0,410,404us: [+0 T:0x40a88b60] OP - getCmd_d> Enter (proc=0x40a885a4)
@0,410,560us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x1b6668] timeout[0xffffffff]
@0,410,793us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x1b6668] status[0]
@0,410,973us: [+0 T:0x40a88b60] OP - getCmd_d> Exit (result=2)
@0,411,139us: [+0 T:0x40a88b60] OP - Processor_delete_d> Enter (proc=0x1b69c8)
@0,411,333us: [+2 T:0x40a88b60] OP - Processor_delete_d> Closing pool...
@0,412,031us: [+2 T:0x40a88b60] OP - Processor_delete_d> Detaching before LAD_releaseDsp...
@0,419,045us: [+2 T:0x40a88b60] OP - Processor_delete_d> Releasing DSP via LAD_releaseDsp...
@0,423,724us: [+2 T:0x40a88b60] OP - Processor_delete_d> Disconnecting from LAD...
@0,431,538us: [+0 T:0x40a88b60] OP - Processor_delete_d> return
@0,431,741us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Entered Sem_post> sem[0x1b6680]
@0,431,963us: [+0 T:0x41288b60] ti.sdo.ce.osal.Sem - Leaving Sem_pend> sem[0x1b6680] status[0]
@0,432,233us: [+0 T:0x41288b60] OP - doCmd> Exit (result=1)
@0,432,383us: [+1 T:0x41288b60] OP - Processor_delete(0x1b69c8) freeing object ...
@0,432,546us: [+0 T:0x41288b60] OP - Processor_delete> return.
@0,432,682us: [+0 T:0x41288b60] CE - rserverClose(0x40160e9c) done.
[dm644xh264 @ 0x12bdd0]open Codec_Engine encodedecode failed
@0,433,277us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Leaving Sem_post> sem[0x1b6680]
@0,433,491us: [+0 T:0x40a88b60] OP - getCmd_d> Enter (proc=0x40a885a4)
@0,433,649us: [+0 T:0x40a88b60] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x1b6668] timeout[0xffffffff]
Could not open codec.
VDecoder init failed :(
//========================================================================================
Update: I did more tests and found:
1. Encoder process open 2 encoders, the 2 decoder process can run at the same time.
2. Encoder process open 3 or more encoders , only one decoder process can run at the same time.
3. If no encoder is opened, up to 3 decoder process can run at the same time