// CF2 Create participant, join session // CF3 Retrieve RtpSender private void JoinRtpSession(string name) { try { Hashtable payloadPara = new Hashtable(); payloadPara.Add("Width", ImgWidth); payloadPara.Add("Height", ImgHeight); payloadPara.Add("Quality", Quality); rtpSession = new RtpSession(ep, new RtpParticipant(name, name), true, true); rtpSender = rtpSession.CreateRtpSender(name, PayloadType.JPEG, null, payloadPara); } catch (Exception ex) { Console.WriteLine(ex.Message); //MessageBox.Show("Please make sure that you are connceted with the network so " + ex.Message); } }
// CF2 Create participant, join session // CF3 Retrieve RtpSender private void JoinRtpSession(string name) { try { Hashtable payloadPara = new Hashtable(); payloadPara.Add("Width", Width); payloadPara.Add("Height", Height); payloadPara.Add("Quality", Quality); rtpSession = new RtpSession(ep, new RtpParticipant(name, name), true, true); rtpSender = rtpSession.CreateRtpSender(name, PayloadType.JPEG, null, payloadPara); } catch (Exception err) { logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace); } }
private void InitializeNetwork() { RtpEvents.ReceiverReport += new RtpEvents.ReceiverReportEventHandler(RtpReceiverReport); RtpEvents.DuplicateCNameDetected += new RtpEvents.DuplicateCNameDetectedEventHandler(DuplicateCNameDetected); // Create participant rtpParticipant = new RtpParticipant(cName, name); rtpParticipant.SetTool(true); // Create session with Participant and Rtp data rtpSession = new RtpSession(new IPEndPoint(IPAddress.Parse(ipAddress), port), rtpParticipant, true, true); // Create RtpSender rtpSender = rtpSession.CreateRtpSender(HostName, PayloadType.PipecleanerSignal, null, null); }