• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting a SourceDescription to a SendStream  RSS feed

 
Sofia Brenes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing a voiceChat client using RTPManagers.
I'm trying to send some additional information with a sendStream once I've created it, information that may change dinamically so I can't set it on the SourceDescription list when initializing a session, so I'm trying to do the following:
try {
_sendStream = _rtpMgr.createSendStream (_dataOutput, 0);
SourceDescription[] sourceList = new SourceDescription[1];
sourceList[0] = new SourceDescription
(SourceDescription.SOURCE_DESC_NOTE, "myInfo", 1, false);
_sendStream.setSourceDescription (sourceList);
_sendStream.start();
}
catch (Exception xcp) {
xcp.printStackTrace();
}
Right after I call start() on the sendStream, I print out its sourceDescriptors and there is the additional information I put in it.
Now, on the server, I have the listener for the NewReceiveStreamEvent, and I get the ReceiveStream for that corresponding SendStream I just created, but when I get the SourceDescriptions from it, my information is gone.
I don't know if the problem is that I created this SourceDescription on a SendStream object and now this is a ReceiveStreamObject. Also I don't know if this information is being sent through the control port or control part of the RTP protocol which I'm not familiar with, so:
1. If anybody knows how to correctly set a sourceDescription on the SendStream and read these data on the ReceiveStream
or
2. If this data is being sent on the control part of RTP, which is the way to access it, or the listener?
Thanks all for your help.
Sofia
 
Sofia Brenes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to add something to make things clearer, when I say I get the SourceDescriptions from the ReceiveStream in the server, I get them from the SenderReport that came on the ReceiveStream, which according to the documentation is where RTCP packets should be sent, but the information I added is not there either.
 
Sofia Brenes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the problem solution,
When you set a SourceDescription to a SendStream or to a Participant, this will not change the SourceDescription that comes with any event's SendStream or Participant, this will always remain as the value you set in the initialization method, or the default values if none were specified. A RemoteListener needs to be registered, and then listen for the SenderReportEvent, and on this event you will find the SourceDescription on the Report object. It might not always come on the first report, but rather in the 3rd or 4th sometimes. But eventually it'll be there.
End of thread.
Sofia
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!