private void InitializeNetwork()
{
if( receiveData )
{
if(participant != null && rtpTraffic)
{
rtpListener = new RtpListener(this);
}
// RtcpListener can create streams. A stream needs a valid RtpListener in order to
// return used packets, so start this object/thread after RtpListener.
rtcpListener = new RtcpListener(this);
}
if(participant != null)
{
// Set the participant's IP address
//participant.IPAddress = Utility.GetLocalMulticastInterface();
participant.IPAddress = Utility.GetLocalRoutingInterface(multicastEP.Address, (ushort)multicastEP.Port);
// Get an ssrc for the local participant
uint ssrc = NextSSRC();
AddParticipant(ssrc, participant);
AddSsrcToIp(ssrc, participant.IPAddress);
rtcpSender = new RtcpSender(this);
}
}