private void LeaveRtpSession() { if (rtpSession != null) { // Clean up all outstanding objects owned by the RtpSession rtpSession.Dispose(); rtpSession = null; } }
private void LeaveRtpSession() { try { if (rtpSession != null) { // Clean up all outstanding objects owned by the RtpSession rtpSession.Dispose(); rtpSession = null; rtpSender = null; } } catch (Exception err) { logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace); } }
// CF2 Create participant, join session // CF3 Retrieve RtpSender private void JoinRtpSession(string name) { try { rtpSession = new RtpSession(ep, new RtpParticipant(name, name), true, true); Console.WriteLine("JoinedRtpSession"); } catch (Exception ex) { Console.WriteLine("JoinedRtpSession Error : " + ex.Message); //MessageBox.Show("Please make sure that you are connceted with the network so " + ex.Message); } }
public RtpListener(RtpSession rtpSession) { this.rtpSession = rtpSession; returnBufferHandler = new ReturnBufferHandler(ReturnBuffer); getBufferHandler = new GetBufferHandler(GetBuffer); InitializeBufferPool(); InitializePerformanceCounters(); InitializeNetwork(); InitializeThreads(); }
// 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); } }
// CF2 Create participant, join session // CF3 Retrieve RtpSender private void JoinRtpSession(string name) { try { rtpSession = new RtpSession(ep, new RtpParticipant(name, name), true, true); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
// 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); } }
public void Dispose() { lock(classLock) { try { disposed = true; // Unhook events RtpEvents.ReceiverReport -= new RtpEvents.ReceiverReportEventHandler(RtpReceiverReport); RtpEvents.DuplicateCNameDetected -= new RtpEvents.DuplicateCNameDetectedEventHandler(DuplicateCNameDetected); if(updateThread != null) { updateThread.Dispose(); updateThread = null; } if(rtpSession != null) { rtpSession.Dispose(); rtpSession = null; rtpSender = null; } } catch(Exception e) { eventLog.WriteEntry("Error disposing ConnectivityDetector. \n" + e.ToString(), EventLogEntryType.Error, 0); } } }
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); }
public HiddenSocketExceptionEventArgs( RtpSession session, System.Net.Sockets.SocketException ex ) { Session = session; Exception = ex; }