PJLIB - Thread Registration Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have a class and I am using PJLIB and PJMEDIA functions inside the public
methods of the class.
I am not creating any threads using pj_thread_create or using native win32
API. I built the class as a static library and using it in another
application(console) to test it.
When I ran the exe, I got a run-time error*:

 Assertion failed: !"Calling pjlib from unknown/external thread. You must "
"regi
ster external threads with pj_thread_register() " "before calling any pjlib
functions."*

I looked up the forums and found out that I had to register the current
thread with PJLIB to be able to use any of its methods.

I wrote this code :

pj_thread_desc rtpdesc;
pj_thread_t *thread;
pj_thread_register("RTPHost",rtpdesc,&thread);

and called it in the application and every method in my class. Still I am
getting the runtime error.

What I could I be doing wrong?
Appreciate your help..

Thanks,
Tarani.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111005/b1e07d31/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux