The reference guide for Engine_open() states:
"An engine may be opened more than once; each open returns a unique handle that can be used to create codec instances or get status of any underlying server."
 
So, indeed, you can call Engine_open() multiple times.  In fact, when multiple threads are involved, it is encouraged that each thread call Engine_open()... again from the reference guide:
 
"Engine handles must not be concurrently accessed by multiple threads; each thread must either obtain its own handle (via Engine_open()) or explicitly serialize access to a shared handle."
 
Unrelated, a constraint on the current Codec Engine product is that multiple _applications_ (or processes) are _not_ supported.  Multiple threads within the same process are supported, but not multiple processes.  Perhaps that's what you're trying?
 
Another error sometimes made is to open two different engines which have competing "servers".  Recall that, if there are remote codecs configured into an Engine, a DSP-side Server will be loaded.  Only one Server can be loaded onto a DSP at a time.  If an Engine_open() has been called, which required a Server to be loaded on the DSP, and an attempt to open a _different_ engine with a conflicting Server is made, Engine_open() will return an error.
 
As a point of reference, the DVEVM demo applications are multi-threaded, and call Engine_open() multiple times.
 
Chris


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lijun Jiang
Sent: Saturday, October 07, 2006 9:42 PM
To: [email protected]
Subject: Can Open more than one codedec engine at application?

Did anyone try to open more than one codedec Engine at application? If so, what is the condition to do it?
 
I tried to open more than one Engine, the second engine was unable to OPEN, I got error code 3 (Engine_EDSPLOAD).
 
Please help
 
Thanks
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to