BP
Benny Prijono
Sat, Nov 17, 2007 1:47 AM
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
Hi Roland,
yeah, this is an old recommendation. It might work as well, but now you
don't have to modify any source. Setting project type to DLL and declaring
macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...) whose
functions you want to use is enough. Resulting DLL works fine.
Cheers
Vali
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 2:48 PM
Subject: Re: [pjsip] Building pjsua as DLL
May I ask that again?
Regards
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 9:20 AM
Subject: Re: [pjsip] Building pjsua as DLL
Hello guys,
I've found a rather old recommendation from Benny in my notes about how to
build a DLL, which I used a year ago or so in order to build DLLs:
<snip>
Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
this snippet:
#if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllexport) T
define PJ_DEF(T) PJ_DECL(T)
#elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllimport) T
define PJ_DEF(T) PJ_DECL(T)
#endif
Next, add PJ_EXPORTING=1 macro in the DLL project settings.
Build the project, and you'll get the DLL.
I haven't tried loading the DLL myself, but if you have any problems,
then perhaps you need to implement DllMain() function.
cheers,
-benny
</snip>
Because I already handed over the project to a colleague, who reported
problems to rebuild the DLLs using one of the latest SVN revs: Is the
recommendation above still OK, or did it change? If yes, how is the way to
build a DLL now?
Kind regards
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 4:51 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for testing it, Vali. I've committed the change in SVN.
cheers,
-benny
Tomás Valenta wrote:
Thank you, it does work! And it is smart. I could not find this because
Intellisense keep telling me that the source is C++ (__cplusplus defined;
I was playing only with this branch of macros) but it is compiled as ANSI
C.
Strange.
Cheers
Vali
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Wednesday, November 14, 2007 4:45 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for the info. Can I ask for a favor to try out these patch?
What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
#ifdef __cplusplus
define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
#else
define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
#endif
Does this work for your DLL?
If it does, I would prefer this approach since the empty
PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
Symbian, which IIRC expects the export specification in the
definition rather than in declaration).
cheers,
-benny
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
> Hi Roland,
> yeah, this is an old recommendation. It might work as well, but now you
> don't have to modify any source. Setting project type to DLL and declaring
> macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...) whose
> functions you want to use is enough. Resulting DLL works fine.
> Cheers
> Vali
>
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 2:48 PM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> May I ask that again?
>
> Regards
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 9:20 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> Hello guys,
>
> I've found a rather old recommendation from Benny in my notes about how to
> build a DLL, which I used a year ago or so in order to build DLLs:
>
> <snip>
>
>
> Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
>
> this snippet:
>
>
>
> #if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllexport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllimport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #endif
>
>
>
> Next, add PJ_EXPORTING=1 macro in the DLL project settings.
>
>
>
> Build the project, and you'll get the DLL.
>
>
>
> I haven't tried loading the DLL myself, but if you have any problems,
>
> then perhaps you need to implement DllMain() function.
>
>
>
> cheers,
>
> -benny
>
>
>
>
>
> </snip>
>
> Because I already handed over the project to a colleague, who reported
> problems to rebuild the DLLs using one of the latest SVN revs: Is the
> recommendation above still OK, or did it change? If yes, how is the way to
> build a DLL now?
>
> Kind regards
>
>
>
> ----- Original Message -----
> From: "Benny Prijono" <bennylp@pjsip.org>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 4:51 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
>
> Thanks for testing it, Vali. I've committed the change in SVN.
>
> cheers,
> -benny
>
> Tomás Valenta wrote:
>> Thank you, it does work! And it is smart. I could not find this because
>> Intellisense keep telling me that the source is C++ (__cplusplus defined;
>> I was playing only with this branch of macros) but it is compiled as ANSI
>> C.
>> Strange.
>> Cheers
>> Vali
>>
>>
>> ----- Original Message -----
>> From: "Benny Prijono" <bennylp@pjsip.org>
>> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
>> Sent: Wednesday, November 14, 2007 4:45 AM
>> Subject: Re: [pjsip] Building pjsua as DLL
>>
>>
>> Thanks for the info. Can I ask for a favor to try out these patch?
>>
>> What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
>> the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
>>
>> #ifdef __cplusplus
>> # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
>> #else
>> # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
>> #endif
>>
>> Does this work for your DLL?
>>
>> If it does, I would prefer this approach since the empty
>> PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
>> Symbian, which IIRC expects the export specification in the
>> definition rather than in declaration).
>>
>> cheers,
>> -benny
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
--
Benny Prijono
http://www.pjsip.org
RK
Roland Klabunde
Sat, Nov 17, 2007 9:50 AM
Thank you Tomás and Benny and have a nice weekend.
Regards
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Saturday, November 17, 2007 2:47 AM
Subject: Re: [pjsip] Building pjsua as DLL
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
Hi Roland,
yeah, this is an old recommendation. It might work as well, but now you
don't have to modify any source. Setting project type to DLL and declaring
macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...)
whose
functions you want to use is enough. Resulting DLL works fine.
Cheers
Vali
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 2:48 PM
Subject: Re: [pjsip] Building pjsua as DLL
May I ask that again?
Regards
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 9:20 AM
Subject: Re: [pjsip] Building pjsua as DLL
Hello guys,
I've found a rather old recommendation from Benny in my notes about how to
build a DLL, which I used a year ago or so in order to build DLLs:
<snip>
Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
this snippet:
#if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllexport) T
define PJ_DEF(T) PJ_DECL(T)
#elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllimport) T
define PJ_DEF(T) PJ_DECL(T)
#endif
Next, add PJ_EXPORTING=1 macro in the DLL project settings.
Build the project, and you'll get the DLL.
I haven't tried loading the DLL myself, but if you have any problems,
then perhaps you need to implement DllMain() function.
cheers,
-benny
</snip>
Because I already handed over the project to a colleague, who reported
problems to rebuild the DLLs using one of the latest SVN revs: Is the
recommendation above still OK, or did it change? If yes, how is the way to
build a DLL now?
Kind regards
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 4:51 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for testing it, Vali. I've committed the change in SVN.
cheers,
-benny
Tomás Valenta wrote:
Thank you, it does work! And it is smart. I could not find this because
Intellisense keep telling me that the source is C++ (__cplusplus defined;
I was playing only with this branch of macros) but it is compiled as ANSI
C.
Strange.
Cheers
Vali
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Wednesday, November 14, 2007 4:45 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for the info. Can I ask for a favor to try out these patch?
What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
#ifdef __cplusplus
define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
#else
define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
#endif
Does this work for your DLL?
If it does, I would prefer this approach since the empty
PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
Symbian, which IIRC expects the export specification in the
definition rather than in declaration).
cheers,
-benny
Thank you Tomás and Benny and have a nice weekend.
Regards
----- Original Message -----
From: "Benny Prijono" <bennylp@pjsip.org>
To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
Sent: Saturday, November 17, 2007 2:47 AM
Subject: Re: [pjsip] Building pjsua as DLL
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
> Hi Roland,
> yeah, this is an old recommendation. It might work as well, but now you
> don't have to modify any source. Setting project type to DLL and declaring
> macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...)
> whose
> functions you want to use is enough. Resulting DLL works fine.
> Cheers
> Vali
>
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 2:48 PM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> May I ask that again?
>
> Regards
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 9:20 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> Hello guys,
>
> I've found a rather old recommendation from Benny in my notes about how to
> build a DLL, which I used a year ago or so in order to build DLLs:
>
> <snip>
>
>
> Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
>
> this snippet:
>
>
>
> #if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllexport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllimport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #endif
>
>
>
> Next, add PJ_EXPORTING=1 macro in the DLL project settings.
>
>
>
> Build the project, and you'll get the DLL.
>
>
>
> I haven't tried loading the DLL myself, but if you have any problems,
>
> then perhaps you need to implement DllMain() function.
>
>
>
> cheers,
>
> -benny
>
>
>
>
>
> </snip>
>
> Because I already handed over the project to a colleague, who reported
> problems to rebuild the DLLs using one of the latest SVN revs: Is the
> recommendation above still OK, or did it change? If yes, how is the way to
> build a DLL now?
>
> Kind regards
>
>
>
> ----- Original Message -----
> From: "Benny Prijono" <bennylp@pjsip.org>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 4:51 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
>
> Thanks for testing it, Vali. I've committed the change in SVN.
>
> cheers,
> -benny
>
> Tomás Valenta wrote:
>> Thank you, it does work! And it is smart. I could not find this because
>> Intellisense keep telling me that the source is C++ (__cplusplus defined;
>> I was playing only with this branch of macros) but it is compiled as ANSI
>> C.
>> Strange.
>> Cheers
>> Vali
>>
>>
>> ----- Original Message -----
>> From: "Benny Prijono" <bennylp@pjsip.org>
>> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
>> Sent: Wednesday, November 14, 2007 4:45 AM
>> Subject: Re: [pjsip] Building pjsua as DLL
>>
>>
>> Thanks for the info. Can I ask for a favor to try out these patch?
>>
>> What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
>> the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
>>
>> #ifdef __cplusplus
>> # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
>> #else
>> # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
>> #endif
>>
>> Does this work for your DLL?
>>
>> If it does, I would prefer this approach since the empty
>> PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
>> Symbian, which IIRC expects the export specification in the
>> definition rather than in declaration).
>>
>> cheers,
>> -benny
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
--
Benny Prijono
http://www.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
JA
jorge.amador@withus.pt
Mon, Nov 19, 2007 3:52 PM
Hi Benny,
I generate a frequency and now I want to stream de PCM with this
frequency in a call. I would like to know which approach do you
recommend for doing this. Thanks, and best regards,
Jorge Amador.
Hi Benny,
I generate a frequency and now I want to stream de PCM with this
frequency in a call. I would like to know which approach do you
recommend for doing this. Thanks, and best regards,
Jorge Amador.
P
programmer
Tue, Nov 20, 2007 4:31 PM
Hi Benny..
a couple of months ago I spent
a lot of time trying to build the
windows pjmedia.dll file;
it should be very useful to put
these istructions and steps
in a chapter of the your documentation.
Thanks so much for your work!
cheers, andrea
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Saturday, November 17, 2007 10:50 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thank you Tomás and Benny and have a nice weekend.
Regards
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Saturday, November 17, 2007 2:47 AM
Subject: Re: [pjsip] Building pjsua as DLL
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
Hi Roland,
yeah, this is an old recommendation. It might work as well, but now you
don't have to modify any source. Setting project type to DLL and declaring
macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...)
whose
functions you want to use is enough. Resulting DLL works fine.
Cheers
Vali
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 2:48 PM
Subject: Re: [pjsip] Building pjsua as DLL
May I ask that again?
Regards
----- Original Message -----
From: "Roland Klabunde" roland.klabunde@freenet.de
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 9:20 AM
Subject: Re: [pjsip] Building pjsua as DLL
Hello guys,
I've found a rather old recommendation from Benny in my notes about how to
build a DLL, which I used a year ago or so in order to build DLLs:
<snip>
Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
this snippet:
#if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllexport) T
define PJ_DEF(T) PJ_DECL(T)
#elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
undef PJ_DECL
undef PJ_DEF
define PJ_DECL(T) __declspec(dllimport) T
define PJ_DEF(T) PJ_DECL(T)
#endif
Next, add PJ_EXPORTING=1 macro in the DLL project settings.
Build the project, and you'll get the DLL.
I haven't tried loading the DLL myself, but if you have any problems,
then perhaps you need to implement DllMain() function.
cheers,
-benny
</snip>
Because I already handed over the project to a colleague, who reported
problems to rebuild the DLLs using one of the latest SVN revs: Is the
recommendation above still OK, or did it change? If yes, how is the way to
build a DLL now?
Kind regards
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Friday, November 16, 2007 4:51 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for testing it, Vali. I've committed the change in SVN.
cheers,
-benny
Tomás Valenta wrote:
Thank you, it does work! And it is smart. I could not find this because
Intellisense keep telling me that the source is C++ (__cplusplus defined;
I was playing only with this branch of macros) but it is compiled as ANSI
C.
Strange.
Cheers
Vali
----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Wednesday, November 14, 2007 4:45 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thanks for the info. Can I ask for a favor to try out these patch?
What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
#ifdef __cplusplus
define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
#else
define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
#endif
Does this work for your DLL?
If it does, I would prefer this approach since the empty
PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
Symbian, which IIRC expects the export specification in the
definition rather than in declaration).
cheers,
-benny
Hi Benny..
a couple of months ago I spent
a lot of time trying to build the
windows pjmedia.dll file;
it should be very useful to put
these istructions and steps
in a chapter of the your documentation.
Thanks so much for your work!
cheers, andrea
----- Original Message -----
From: "Roland Klabunde" <roland.klabunde@freenet.de>
To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
Sent: Saturday, November 17, 2007 10:50 AM
Subject: Re: [pjsip] Building pjsua as DLL
Thank you Tomás and Benny and have a nice weekend.
Regards
----- Original Message -----
From: "Benny Prijono" <bennylp@pjsip.org>
To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
Sent: Saturday, November 17, 2007 2:47 AM
Subject: Re: [pjsip] Building pjsua as DLL
Yes, that's correct. Thanks for clarifying this.
In addition, if you're linking your application with the DLL version
of the libraries, and if you have C or C++ application, you need to
declare PJ_DLL macro (and not PJ_EXPORTING) in your application's
project, to activate __declspec(dllimport) specifier in PJ's
declarations.
cheers,
-benny
Tomás Valenta wrote:
> Hi Roland,
> yeah, this is an old recommendation. It might work as well, but now you
> don't have to modify any source. Setting project type to DLL and declaring
> macros PJ_DLL and PJ_EXPORTING at projects (i.e. pjlib, pjmedia, ...)
> whose
> functions you want to use is enough. Resulting DLL works fine.
> Cheers
> Vali
>
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 2:48 PM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> May I ask that again?
>
> Regards
>
> ----- Original Message -----
> From: "Roland Klabunde" <roland.klabunde@freenet.de>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 9:20 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
> Hello guys,
>
> I've found a rather old recommendation from Benny in my notes about how to
> build a DLL, which I used a year ago or so in order to build DLLs:
>
> <snip>
>
>
> Next, you'd need to modify pjsua.h. Just below PJ_BEGIN_DECL line, add
>
> this snippet:
>
>
>
> #if defined(PJ_EXPORTING) && PJ_EXPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllexport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #elif defined(PJ_IMPORTING) && PJ_IMPORTING!=0
>
> # undef PJ_DECL
>
> # undef PJ_DEF
>
> # define PJ_DECL(T) __declspec(dllimport) T
>
> # define PJ_DEF(T) PJ_DECL(T)
>
> #endif
>
>
>
> Next, add PJ_EXPORTING=1 macro in the DLL project settings.
>
>
>
> Build the project, and you'll get the DLL.
>
>
>
> I haven't tried loading the DLL myself, but if you have any problems,
>
> then perhaps you need to implement DllMain() function.
>
>
>
> cheers,
>
> -benny
>
>
>
>
>
> </snip>
>
> Because I already handed over the project to a colleague, who reported
> problems to rebuild the DLLs using one of the latest SVN revs: Is the
> recommendation above still OK, or did it change? If yes, how is the way to
> build a DLL now?
>
> Kind regards
>
>
>
> ----- Original Message -----
> From: "Benny Prijono" <bennylp@pjsip.org>
> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
> Sent: Friday, November 16, 2007 4:51 AM
> Subject: Re: [pjsip] Building pjsua as DLL
>
>
>
> Thanks for testing it, Vali. I've committed the change in SVN.
>
> cheers,
> -benny
>
> Tomás Valenta wrote:
>> Thank you, it does work! And it is smart. I could not find this because
>> Intellisense keep telling me that the source is C++ (__cplusplus defined;
>> I was playing only with this branch of macros) but it is compiled as ANSI
>> C.
>> Strange.
>> Cheers
>> Vali
>>
>>
>> ----- Original Message -----
>> From: "Benny Prijono" <bennylp@pjsip.org>
>> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org>
>> Sent: Wednesday, November 14, 2007 4:45 AM
>> Subject: Re: [pjsip] Building pjsua as DLL
>>
>>
>> Thanks for the info. Can I ask for a favor to try out these patch?
>>
>> What if instead of commenting out PJ_EXPORT_DEF_SPECIFIER, we change
>> the PJ_DECL_NO_RETURN declaration in pj/config.h to something like this:
>>
>> #ifdef __cplusplus
>> # define PJ_DECL_NO_RETURN(type) PJ_DECL(type) PJ_NORETURN
>> #else
>> # define PJ_DECL_NO_RETURN(type) PJ_NORETURN PJ_DECL(type)
>> #endif
>>
>> Does this work for your DLL?
>>
>> If it does, I would prefer this approach since the empty
>> PJ_EXPORT_DEF_SPECIFIER may not work for other platforms (such as
>> Symbian, which IIRC expects the export specification in the
>> definition rather than in declaration).
>>
>> cheers,
>> -benny
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
--
Benny Prijono
http://www.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Thu, Nov 22, 2007 11:59 AM
Hi Benny..
a couple of months ago I spent
a lot of time trying to build the
windows pjmedia.dll file;
it should be very useful to put
these istructions and steps
in a chapter of the your documentation.
Thanks so much for your work!
cheers, andrea
programmer wrote:
> Hi Benny..
>
> a couple of months ago I spent
> a lot of time trying to build the
> windows pjmedia.dll file;
> it should be very useful to put
> these istructions and steps
> in a chapter of the your documentation.
Just added this in the FAQ: http://www.pjsip.org/trac/wiki/FAQ#dll
Thanks for the suggestion!
cheers,
-benny
> Thanks so much for your work!
>
> cheers, andrea
JA
jorge.amador@withus.pt
Wed, Dec 5, 2007 2:47 PM
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP
addresses. The IP address to which my pjsip app sends RTP packets and
the IP address from which my pjsip app receives RTP packets during the
media stream are different. The question is: if I want to create
dynamic routes for a second IP address in cases like this where can I
get this information (IP address),
Best regards,
Jorge Amador
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP
addresses. The IP address to which my pjsip app sends RTP packets and
the IP address from which my pjsip app receives RTP packets during the
media stream are different. The question is: if I want to create
dynamic routes for a second IP address in cases like this where can I
get this information (IP address),
Best regards,
Jorge Amador
JA
jorge.amador@withus.pt
Fri, Dec 7, 2007 10:41 AM
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP addresses.
The IP address to which my pjsip app sends RTP packets and the IP
address from which my pjsip app receives RTP packets during the media
stream are different. The question is: if I want to create dynamic
routes for a second IP address in cases like this where can I get this
information (IP address),
Best regards,
Jorge Amador
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP addresses.
The IP address to which my pjsip app sends RTP packets and the IP
address from which my pjsip app receives RTP packets during the media
stream are different. The question is: if I want to create dynamic
routes for a second IP address in cases like this where can I get this
information (IP address),
Best regards,
Jorge Amador
BP
Benny Prijono
Sun, Dec 9, 2007 1:38 PM
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP addresses.
The IP address to which my pjsip app sends RTP packets and the IP
address from which my pjsip app receives RTP packets during the media
stream are different. The question is: if I want to create dynamic
routes for a second IP address in cases like this where can I get this
information (IP address),
I thought I've replied to your mail on 3 Nov? But anyway here's my
answer again.
If you want to support receiving RTP from different address than the
sendto() address, first of all you'll need to put
PJMEDIA_UDP_NO_SRC_ADDR_CHECKING flag when creating the UDP media
transports.
As to where to get the information about the secondary address,
currently this information is not accessible outside the transport,
so you'll need to create a transport API to access this (feel free
to send a patch!).
cheers,
-benny
jorge.amador@withus.pt wrote:
> Hi everyone,
>
> I have used Ethereal to sniff the packets in the wire during a call
> with pjsip and I've noticed that there were two different IP addresses.
> The IP address to which my pjsip app sends RTP packets and the IP
> address from which my pjsip app receives RTP packets during the media
> stream are different. The question is: if I want to create dynamic
> routes for a second IP address in cases like this where can I get this
> information (IP address),
I thought I've replied to your mail on 3 Nov? But anyway here's my
answer again.
If you want to support receiving RTP from different address than the
sendto() address, first of all you'll need to put
PJMEDIA_UDP_NO_SRC_ADDR_CHECKING flag when creating the UDP media
transports.
As to where to get the information about the secondary address,
currently this information is not accessible outside the transport,
so you'll need to create a transport API to access this (feel free
to send a patch!).
cheers,
-benny
> Best regards,
>
> Jorge Amador
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
--
Benny Prijono
http://www.pjsip.org
JA
jorge.amador@withus.pt
Wed, Dec 12, 2007 3:20 PM
Hi Benny,
I probably missed your response from November 3rd, I'm sorry. But
thanks for the hint anyway. Now I have a different problem when I try
to register to a server. I get the following message:
SIP/2.0 401 Unauthorized
...
User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu
WWW-Authenticate: digest realm="sapo.pt", qop="auth",
nonce="475fff9401615d41eeb3848f8e1dab0a62652c25f7fe9240510f75440529019e1fa8f5ef06ba70e97d9e81b89859f19c68957abe", opaque="", stale=false,
algorithm=md5
Content-Length: 0
--end msg--
pjsua-i686-pc-linux-gnu: ../src/pjsip/sip_auth_client.c:135:
pjsip_auth_create_digest: Assertion `cred_info->data.slen == 32' failed.
and then the app crashes. Any hint about this? Thanks and best regards,
Jorge Amador
Quoting Benny Prijono bennylp@pjsip.org:
Hi everyone,
I have used Ethereal to sniff the packets in the wire during a call
with pjsip and I've noticed that there were two different IP addresses.
The IP address to which my pjsip app sends RTP packets and the IP
address from which my pjsip app receives RTP packets during the media
stream are different. The question is: if I want to create dynamic
routes for a second IP address in cases like this where can I get this
information (IP address),
I thought I've replied to your mail on 3 Nov? But anyway here's my
answer again.
If you want to support receiving RTP from different address than the
sendto() address, first of all you'll need to put
PJMEDIA_UDP_NO_SRC_ADDR_CHECKING flag when creating the UDP media
transports.
As to where to get the information about the secondary address,
currently this information is not accessible outside the transport,
so you'll need to create a transport API to access this (feel free
to send a patch!).
cheers,
-benny
Hi Benny,
I probably missed your response from November 3rd, I'm sorry. But
thanks for the hint anyway. Now I have a different problem when I try
to register to a server. I get the following message:
SIP/2.0 401 Unauthorized
...
User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu
WWW-Authenticate: digest realm="sapo.pt", qop="auth",
nonce="475fff9401615d41eeb3848f8e1dab0a62652c25f7fe9240510f75440529019e1fa8f5ef06ba70e97d9e81b89859f19c68957abe", opaque="", stale=false,
algorithm=md5
Content-Length: 0
--end msg--
pjsua-i686-pc-linux-gnu: ../src/pjsip/sip_auth_client.c:135:
pjsip_auth_create_digest: Assertion `cred_info->data.slen == 32' failed.
and then the app crashes. Any hint about this? Thanks and best regards,
Jorge Amador
Quoting Benny Prijono <bennylp@pjsip.org>:
> jorge.amador@withus.pt wrote:
>> Hi everyone,
>>
>> I have used Ethereal to sniff the packets in the wire during a call
>> with pjsip and I've noticed that there were two different IP addresses.
>> The IP address to which my pjsip app sends RTP packets and the IP
>> address from which my pjsip app receives RTP packets during the media
>> stream are different. The question is: if I want to create dynamic
>> routes for a second IP address in cases like this where can I get this
>> information (IP address),
>
> I thought I've replied to your mail on 3 Nov? But anyway here's my
> answer again.
>
> If you want to support receiving RTP from different address than the
> sendto() address, first of all you'll need to put
> PJMEDIA_UDP_NO_SRC_ADDR_CHECKING flag when creating the UDP media
> transports.
>
> As to where to get the information about the secondary address,
> currently this information is not accessible outside the transport,
> so you'll need to create a transport API to access this (feel free
> to send a patch!).
>
> cheers,
> -benny
>
>
>> Best regards,
>>
>> Jorge Amador
>>
>>
>>
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>>
>> pjsip mailing list
>> pjsip@lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
> --
> Benny Prijono
> http://www.pjsip.org
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip@lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
BP
Benny Prijono
Wed, Dec 12, 2007 5:16 PM
Hi Benny,
I probably missed your response from November 3rd, I'm sorry. But thanks
for the hint anyway. Now I have a different problem when I try to
register to a server. I get the following message:
SIP/2.0 401 Unauthorized
...
User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu
WWW-Authenticate: digest realm="sapo.pt", qop="auth",
nonce="475fff9401615d41eeb3848f8e1dab0a62652c25f7fe9240510f75440529019e1fa8f5ef06ba70e97d9e81b89859f19c68957abe",
opaque="", stale=false, algorithm=md5
Content-Length: 0
--end msg--
pjsua-i686-pc-linux-gnu: ../src/pjsip/sip_auth_client.c:135:
pjsip_auth_create_digest: Assertion `cred_info->data.slen == 32' failed.
and then the app crashes. Any hint about this? Thanks and best regards,
You need to initialize the credential's data_type to
PJSIP_CRED_DATA_PLAIN_PASSWD, for example:
cred.realm = ...
cred.scheme = pj_str("Digest");
cred.username = ...
cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
cred.data = "your plain text password";
If you specify data_type=PJSIP_CRED_DATA_DIGEST, then pjsip expects
the "data" field to contain HA1, which is MD5 hash of {username ":"
realm ":" password}, and which length is always 32 characters (hence
the assertion).
cheers,
-benny
jorge.amador@withus.pt wrote:
> Hi Benny,
>
> I probably missed your response from November 3rd, I'm sorry. But thanks
> for the hint anyway. Now I have a different problem when I try to
> register to a server. I get the following message:
>
> SIP/2.0 401 Unauthorized
> ...
> User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu
> WWW-Authenticate: digest realm="sapo.pt", qop="auth",
> nonce="475fff9401615d41eeb3848f8e1dab0a62652c25f7fe9240510f75440529019e1fa8f5ef06ba70e97d9e81b89859f19c68957abe",
> opaque="", stale=false, algorithm=md5
> Content-Length: 0
>
>
> --end msg--
> pjsua-i686-pc-linux-gnu: ../src/pjsip/sip_auth_client.c:135:
> pjsip_auth_create_digest: Assertion `cred_info->data.slen == 32' failed.
>
>
> and then the app crashes. Any hint about this? Thanks and best regards,
You need to initialize the credential's data_type to
PJSIP_CRED_DATA_PLAIN_PASSWD, for example:
cred.realm = ...
cred.scheme = pj_str("Digest");
cred.username = ...
cred.data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
cred.data = "your plain text password";
If you specify data_type=PJSIP_CRED_DATA_DIGEST, then pjsip expects
the "data" field to contain HA1, which is MD5 hash of {username ":"
realm ":" password}, and which length is always 32 characters (hence
the assertion).
cheers,
-benny
> Jorge Amador