MINDMAKERS Forum
Welcome, Guest. Please login or register.
September 08, 2010, 02:21:18 PM

Login with username, password and session length
Search:     Advanced search
NB: Spam bots are becoming smarter every day - we had to turn off regular registration. To become member, please send email to Kris Thorisson ([kris'_lastname] att ru dott is).
337 Posts in 99 Topics by 99 Members
Latest Member: peterwit
* Home Help Search Login Register
+  MINDMAKERS Forum
|-+  Projects
| |-+  Psyclone (Moderator: cmlabs)
| | |-+  Using Mediastreams (Psyclone 1.0.5)
« previous next »
Pages: [1] Print
Author Topic: Using Mediastreams (Psyclone 1.0.5)  (Read 3723 times)
manu_tang
Newbie
*
Posts: 7


View Profile WWW Email
« on: March 20, 2006, 05:08:45 PM »

Hi guys

I am trying to use the Mediastreams.
Psyclone version 1.0.5

I had a look at the example but all my modules are external. All my modules register to Psyclone using code, in contrast to using PsySpec:
addTrigger(...) and so on.

I tried to use the function waitForSteamConnection(...) but it returns 0.
I also tried the function getSteamConnection(...) but no luck there neither

This is a part of my PsySpec:
<whiteboard name="EART.WB.Viseme" maxcount="1000">
  <description>My Whiteboard</description>
  <streams>
    <stream name="EART.Viseme.Flow" maxsize="10" />
  </streams>
</whiteboard>

and I use the following function:
waitForSteamConnection("EART.Viseme.Flow",50000)
but it always returns 0

Could you let me know what I am doing wrong?

Cheers.

Emmanuel
Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #1 on: March 20, 2006, 06:34:57 PM »

If you want to use streams you should know that they are easiest to use if you either a) register your modules in the PsySpec or b) you use the same XML to send the full registration from your external module code. If you use this method, you can specify in the registration which streams you are interested in and this will be connected for you automatically and all you need to do is follow the instructions in the tutorial.

I would highly recommend that you instead of using addTrigger() use sendRegistration() with the full XML - see the examples JavaReader/CppReader. And I would also recommend that you upgrade to 1.0.6 from

   http://www.mindmakers.org/projects/Psyclone

If you choose not to, you will have to manually connect to the streams, like in the good old days. This is a bit more work and not compatible with using contexts and phases, but doable for simple modules.

This is the code to connect manually to a stream (in Java, C++ is almost identical):

    String stream = "My.Full.Stream.Name";
    TCPLocation loc = plug.resolve(stream);
    if ((loc == null) || (!loc.isValid())) {
      return false;
    }

    MediaConnection mediaCon = new MediaConnection(myName, loc);
    if (!mediaCon.init()) {
      mediaCon.destroy();
      mediaCon = null;
      return false;
    }

Regardless, do consider upgrading to 1.0.6, as both the code and the manual/tutorial is much improved.


Best,

Thor
Logged
manu_tang
Newbie
*
Posts: 7


View Profile WWW Email
« Reply #2 on: March 21, 2006, 11:44:08 AM »

Hi Thor,

Thank you for your fast answer.

I got a problem to update from version 1.0.5 to 1.0.6

I use:
Windows XP
VC++ v6
cppair1.0.6.pbl.win32net03
psyclone1.0.6.nc.shareware.win32net03

and I thought that I will just need to change the paths of the include files and library files, which I done
but I cant get rid off the following errors:

--------------------Configuration: MuslceFaceModule - Win32 Release--------------------
Linking...
AIR.lib(Messenger.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(OSCommand.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(BitmapUpdate.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(NetMessageProtocol.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
AIR.lib(Communicator.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(DataSample.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(JFile.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(JSocket.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(TimerManager.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(Object.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(HTML.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(JThread.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(Bitmap.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z)
CoreLibrary.lib(JTime.obj) : error LNK2001: unresolved external symbol __alldvrm
AIR.lib(Communicator.obj) : error LNK2001: unresolved external symbol __ftol2
AIR.lib(CppAIRPlug.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(JThread.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(Bitmap.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(Parameter.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(MediaStream.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(JTime.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(Color.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(MathClasses.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(NetworkConnection.obj) : error LNK2001: unresolved external symbol __ftol2
CoreLibrary.lib(BitmapUpdate.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(NetMessageProtocol.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
AIR.lib(Communicator.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
AIR.lib(Messenger.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(MediaServer.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(JSocket.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(TimerManager.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(OSCommand.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(Bitmap.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(DataSample.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(JFile.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(Network.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(JString.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(NetworkConnection.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(HTML.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(JThread.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z)
CoreLibrary.lib(JString.obj) : error LNK2001: unresolved external symbol __imp___vscprintf
MuslceFaceModule.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

MuslceFaceModule.exe - 42 error(s), 0 warning(s)
----------------------------------------------------------------------------------------------------------------------------

Do you have any idea what is going on?

Cheers.

Manu
Logged
thorlist
Jr. Member
**
Posts: 51


thorlist
View Profile WWW Email
« Reply #3 on: March 21, 2006, 11:51:18 AM »

I think that you are either missing a library in the linking or you may be ignoring a library which is needed. The easiest will be to open both your VS solution and the example solution that comes with 1.0.6 and look though the linker sections to see if either a library is missing or excluded from yours. Worst case scenario you could just copy over your project files into the example project and see if that works.

Also, I have often seen that the order of the library files in the linker sections matter...

If you still cannot get it to link, I will be happy to take a look at it if you zip up your project and files and send them to me...

Best,

Thor

Logged
manu_tang
Newbie
*
Posts: 7


View Profile WWW Email
« Reply #4 on: March 21, 2006, 12:32:09 PM »

Hi Thor,

I tried but I did not find any thing wrong Sad

I can't open the examples because I am on VC++ v6, so I can't use the projects provided with Psyclone (cppair1.0.6.pbl.win32net03).

It would be great if you could have a quick look at my code.
I cant attach the zip file because it is too big so I made a link:

http://www.cs.bath.ac.uk/~cspeart/compilation_Psy1.0.zip

Cheers.

Manu
Logged
manu_tang
Newbie
*
Posts: 7


View Profile WWW Email
« Reply #5 on: November 05, 2006, 11:43:54 PM »

Hi Thor,

I think that there is a problem with Psyclone 1.0.6 and with modules that use Media Stream.

If there is no network connection (no network cable connected) but the local network is active, the modules that use Media Stream can't connect to the stream (waitForStreamConnection() returns NULL). To solve the problem the network connection just needs to be desactivated.

Am I the only one have this problem?

Cheers.

Emmanuel
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!