DotNET STAThreadAttribute and PJSUA video support

Дмитрий
Sat, Jan 18, 2014 3:20 PM

Hi all

I compiled the latest version of PJSIP in Visual Studio 2013, all right, has
created a simple application using C++/CLI, with the support of the CLR
(.NET 4.5). In fact, the application is working properly, and works with
everything except the "pjsua video api", namely if I call the function
pjsua_vid_dev_count() function returns 2. Same function in the application
pjsua.exe returns 3, because my computer is connected USB camera. In C# the
same. The entry point in my C++/CLI application:

[STAThreadAttribute]
int main(array<a System::String ^> ^args)

I deleted attribute [STAThreadAttribute] and my application was also find 3
video device that is absolutely correct. In other words "pjsua video api" is
not working because of this attribute.

Digging in FAQ, I found the following article:
http://trac.pjsip.org/repos/wiki/FAQ#no-thread

It is somehow connected? How do I get the correct functioning of the "pjsua
video api" if the attribute STAThreadAttribute
(http://msdn.microsoft.com/ru-ru/library/system.stathreadattribute(v=vs.110)
.aspx) in .NET application at the entry point???

Thanks

Hi all I compiled the latest version of PJSIP in Visual Studio 2013, all right, has created a simple application using C++/CLI, with the support of the CLR (.NET 4.5). In fact, the application is working properly, and works with everything except the "pjsua video api", namely if I call the function pjsua_vid_dev_count() function returns 2. Same function in the application pjsua.exe returns 3, because my computer is connected USB camera. In C# the same. The entry point in my C++/CLI application: [STAThreadAttribute] int main(array<a System::String ^> ^args) I deleted attribute [STAThreadAttribute] and my application was also find 3 video device that is absolutely correct. In other words "pjsua video api" is not working because of this attribute. Digging in FAQ, I found the following article: http://trac.pjsip.org/repos/wiki/FAQ#no-thread It is somehow connected? How do I get the correct functioning of the "pjsua video api" if the attribute STAThreadAttribute (http://msdn.microsoft.com/ru-ru/library/system.stathreadattribute(v=vs.110) .aspx) in .NET application at the entry point??? Thanks