Vincent,
That is somewhat similar, but it is doing everything in the library
which is dynamically loaded. ceruntime_init, engine_open, *_create.
That process does work fine for me.
I am trying to do ceruntime_init/engine_open/memory allocation/memory
management in 1 dynamically loaded library which returns a struct
containing the engine handle, and memory allocation/free routines.
Then, in another dynamically loaded library, initialize individual
algorithms from that engine -- audio/video/image decoding algorithms.
These functions call the algorithm create function which allocates
memory (Memory_alloc()) and segfaults.
I've simply extended the function pointers in my core structure to do
the create in the core library and return the algorithm handle to the
decode plugin. Then calling process/control from that level works
fine. I would certainly prefer to not be calling back through callbacks
to do Create however. If this is possible.
Is this even a segmentation issue because of the dynamic loading?
Wan, Vincent wrote:
Hi Brian,
If you haven't already done so, I suggest you take a look at the example
codec_engine_2_10_01\examples\ti\sdo\ce\examples\apps\video_copy\dualcpu_separateconfig_dll.
It does something similar to what you are trying to accomplish, ie., wrap CE
into a DLL. This might give you a clue as to what the problem is.
Best regards,
Vincent
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Rhodes
Sent: Thursday, June 19, 2008 12:02 AM
To: Kamoolkar, Mugdha
Cc: [email protected]
Subject: Re: building dsplink
Thanks for responding. I am trying to compile dsplink 1.50 and I am
using codec engine 2.10. The error is with the type for 'current'. I
dug around for that, but could not find where it was actually located.
What I am actually trying to do is load an Engine from a library which
loads dynamic libraries which are initialized with the engine handle.
These libraries then use the individual algorithms. However
VIDDEC_create just causes the program to exit when called from one of
the libraries which I dlopen. If I call VIDDEC_create from the main
library (where CERuntime_init() is called from) then everything works
correctly. dsplink is unrelated to my problem, however I was concerned
that I could not rebuild it.
#0 0x4520fec8 in Memory_alloc ()
from /usr/local/LEO_SDK.1.0/media_plugins/decode_video_c64x.plug
#1 0x4520b1b8 in VISA_create2 (engine=0x42478,
name=0x452295b8 "mpeg2_dec", params=0x0, paramsSize=0, msgSize=836,
type=0x4522a704 "ti.sdo.ce.video.IVIDDEC") at visa.c:380
#2 0x4520ac70 in VISA_create (engine=0x42478, name=0x452295b8 "mpeg2_dec",
params=0x0, msgSize=836, type=0x4522a704 "ti.sdo.ce.video.IVIDDEC")
at visa.c:239
#3 0x45204f40 in VIDDEC_create (engine=0x42478,
name=0x452295b8 "mpeg2_dec", params=0x0) at viddec.c:61
#4 0x45203aac in c64x_video_init ()
from /usr/local/LEO_SDK.1.0/media_plugins/decode_video_c64x.plug
will link with codecs.iv_mpeg2_dec:lib/iv_mpeg2dec.a64P
will link with ti.sdo.ce.video:lib/debug/video.a470MV
will link with ti.sdo.ce:lib/ce_debug.a470MV
will link with ti.sdo.ce.ipc.dsplink:lib/ipc_dsplink_6446_debug.a470MV
will link with ti.sdo.ce.osal.linux:lib/osal_linux_470.a470MV
will link with ti.sdo.ce.alg:lib/Algorithm_noOS.a470MV;lib/alg.a470MV
will link with ti.sdo.ce.ipc:lib/ipc.a470MV
will link with ti.sdo.fc.dman3:dman3Cfg.a470MV
will link with ti.sdo.fc.acpy3:acpy3.a470MV
will link with ti.sdo.ce.utils.xdm:lib/debug/XdmUtils.a470MV
will link with ti.sdo.utils.trace:lib/gt.a470MV
will link with
dsplink.gpp:export/BIN/Linux/Davinci/DM6446/DEBUG/dsplink.lib
will link with ti.sdo.linuxutils.cmem:lib/cmem.a
The main application where VIDDEC_create() works, links the same
libraries. I am guessing that this fails because the engine is created
in the main application and the dynamically loaded libraries do know
what memory segment to use for the algorithm creation?
Kamoolkar, Mugdha wrote:
Brian,
You may have an incompatible version of Linux kernel. DSPLink versions prior to
DSPLink 1.50 did not inherently support linux kernel versions 2.6.18 onwards.
If you need to build DSPLink on a linux kernel version 2.6.18+, you'll need to
either:
1. Use DSPLink 1.50 (but note that you need the compatible Codec Engine version
for this)
http://wiki.davincidsp.com/index.php?title=Codec_Engine_Roadmap
2. Use the patch from Kevin on the older version of DSPLink, that adds support
for Linux kernel versions 2.6.18 onwards into DSPLink
http://www.mail-archive.com/[email protected]/msg03002.html
Regards,
Mugdha
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Rhodes
Sent: Wednesday, June 18, 2008 9:29 PM
To: [email protected]
Subject: building dsplink
prcs.c: In function `PRCS_Create':
prcs.c:185: error: dereferencing pointer to incomplete type
prcs.c:186: error: dereferencing pointer to incomplete type
prcs.c:188: error: dereferencing pointer to incomplete type
185 (*prcsObj)->handleToThread = (Pvoid) current->pid ;
186 (*prcsObj)->handleToProcess = (Pvoid) current->mm ;
187 (*prcsObj)->priorityOfThread = 0 ;
188 (*prcsObj)->priorityOfProcess = current->prio ;
What am I missing?
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source