Hello, I'm trying to combine the VAS plugin with the siprtpex (which sends only plain text) to make something like a chat program with voice enabled. But the thing is there is plenty of asynchrnous functions that get called at no specific time and each requires data from another, Here is my scenario
There is the application, VAS server, and RTP server processes running.
Upon start, VAS server calls BufferEmptied (with data to consume) and BufferFilled (to accept data to playback),each of which is asynchronous. BufferEmptied and BufferFilled should be called to make the server call BufferEmptied and BufferFilled over and over again.
on the rtp side, RtpPacketReceived is called whenever a packet comes.
I call RtpSendPacket to send a rtp packet.
This is kind of convoluted scenario for a non-expert but i hope somebody has gone through this before.
one of the major problems I face is when to start the VAS server, If i start it just before the rtp sessionis establish sometime FillBuffer is called bufore the first packet arrives.
Also EmptyBuffer is called sometimes before it is time to send packets.
I tried to use message queue but there may be and overflow or underflow and use bloking may hang the program.
Note also that siprtpex uses an active object to send data at regular interval which is no the case for EmptyBuffer which gets called much more frequently.
Thanks in advance