private void OnNewRtpParticipant(object sender, RtpEvents.RtpParticipantEventArgs ea) { if (this.rtpSession != sender) { return; } RtpParticipant participant = ea.RtpParticipant; Trace.WriteLine("New participant: " + participant.CName); // we want to ignore ourselves if (participant.CName != Constants.PersistenceCName) { // Make sure this isn't someone who briefly lost connectivity. if (!participants.ContainsKey(participant.CName)) { string newPartName = participant.Name; if (newPartName == null || newPartName == String.Empty) { newPartName = participant.CName; } int participantID = DBHelper.CreateParticipant( conferenceID, participant.CName, newPartName); participants.Add(participant.CName, new ParticipantWrapper(participant, participantID)); } foreach (uint ssrc in participant.SSRCs) { OnNewRtpStream(sender, new RtpEvents.RtpStreamEventArgs(rtpSession.Streams[ssrc])); } } }
private void RtpParticipantRemoved(object sender, RtpEvents.RtpParticipantEventArgs ea) { //ShowMessage(string.Format("{0} has left", ea.RtpParticipant.Name)); }
// CF5 Receive data from network private void RtpParticipantAdded(object sender, RtpEvents.RtpParticipantEventArgs ea) { listBox1.Items.Add(String.Format("{0} has joined", ea.RtpParticipant.Name)); }
// CF5 Receive data from network private void RtpParticipantAdded(object sender, RtpEvents.RtpParticipantEventArgs ea) { ShowMessage(string.Format("{0} has joined the chat session.", ea.RtpParticipant.Name)); }
private void RtpParticipantAdded(object sender, RtpEvents.RtpParticipantEventArgs ea) { }
void RtpEvents_RtpParticipantAdded(object sender, RtpEvents.RtpParticipantEventArgs ea) { Console.Out.WriteLine("Participant added {0}", ea.RtpParticipant.SSRC); Console.Out.WriteLine(""); }
void RtpEvents_RtpParticipantDataChanged(object sender, RtpEvents.RtpParticipantEventArgs ea) { Console.Out.WriteLine("Participant data changed: {0}", ea.RtpParticipant.SSRC); //Console.Out.WriteLine("Participant changed: " + ea.RtpParticipant.ToString()); Console.Out.WriteLine(""); }
void RtpEvents_RtpParticipantRemoved(object sender, RtpEvents.RtpParticipantEventArgs ea) { Console.Out.WriteLine("Participant removed\n"); }
void RtpEvents_RtpParticipantTimeout(object sender, RtpEvents.RtpParticipantEventArgs ea) { Console.Out.WriteLine("Participant timeout\n"); }
private void RtpParticipantRemoved(object sender, RtpEvents.RtpParticipantEventArgs ea) { ShowMessage(string.Format(CultureInfo.CurrentCulture, Strings.HasLeftTheChatSession, ea.RtpParticipant.Name)); }
private void OnNewRtpParticipant(object sender, RtpEvents.RtpParticipantEventArgs ea) { try { RtpParticipant participant = ea.RtpParticipant; eventLog.WriteEntry("OnNewRtpParticipant: " + participant.CName, EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); if (this.rtpSession != sender) { eventLog.WriteEntry("OnNewRtpParticipant: this.rtpSession and sender don't match.", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); if (this.rtpSession == null) { //Note this can happen because participants are added during the rtpSession constructor!! eventLog.WriteEntry("OnNewRtpParticipant: this.rtpSession is null.", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); } if (sender == null) { eventLog.WriteEntry("OnNewRtpParticipant: sender is null.", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); } //return; } //eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, "New participant: {0}", participant.CName)); // we want to ignore ourselves if (participant.CName != Constants.PersistenceCName) { // Make sure this isn't someone who briefly lost connectivity. if (!participants.ContainsKey(participant.CName)) { string newPartName = participant.Name; if (newPartName == null || newPartName == String.Empty) { newPartName = participant.CName; } int participantID = DBHelper.CreateParticipant( conferenceID, participant.CName, newPartName); participants.Add(participant.CName, new ParticipantWrapper(participant, participantID)); eventLog.WriteEntry("OnNewRtpParticipant completed participant Add.", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); } else { eventLog.WriteEntry("OnNewRtpParticipant already in participants hashtable ", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); } foreach (uint ssrc in participant.SSRCs) { if (this.rtpSession == null) { eventLog.WriteEntry("OnNewRtpParticipant: Failed to add streams because this.rtpSession is null.", EventLogEntryType.Warning, ArchiveServiceEventLog.ID.Warning); } else { OnNewRtpStream(this.rtpSession, new RtpEvents.RtpStreamEventArgs(rtpSession.Streams[ssrc])); } } } else { eventLog.WriteEntry("OnNewRtpParticipant ignoring ourself. ", EventLogEntryType.Information, ArchiveServiceEventLog.ID.Information); } } catch (Exception e) { eventLog.WriteEntry("OnNewRtpParticipant exception: " + e.ToString(), EventLogEntryType.Warning, ArchiveServiceEventLog.ID.Warning); } }