Exemple #1
0
        /// <summary>
        /// Queue a work item to be called by a background thread
        /// </summary>
        /// <param name="waitCallback">WaitCallback delegate to be invoked</param>
        /// <param name="parameters">Array of objects to pass as parameters</param>
        internal static void QueueUserWorkItem(RtpEvents.RaiseEvent del, object[] parameters)
        {
            syncWorkItems.Enqueue(new WorkItem(del, parameters));

            if( peakQueueLength < syncWorkItems.Count )
                peakQueueLength = syncWorkItems.Count;
            
            newWorkItem.Set();
        }
Exemple #2
0
        internal void RaiseFrameReceivedEvent(object[] args)
        {
            if (!RtpEvents.FireEvent(FrameReceived, args))
            {
                FrameReceivedEventArgs ea = (FrameReceivedEventArgs)args[1];

                eventLog.WriteEntry("FrameReceivedEvent - " + ea.RtpStream.SSRC,
                                    EventLogEntryType.Warning, (int)RtpEL.ID.FrameReceived);
            }
        }
Exemple #3
0
 private void RtpStreamRemoved(object sender, RtpEvents.RtpStreamEventArgs ea)
 {
     ea.RtpStream.FrameReceived -= new RtpStream.FrameReceivedEventHandler(FrameReceived);
 }
Exemple #4
0
 private void RtpParticipantRemoved(object sender, RtpEvents.RtpParticipantEventArgs ea)
 {
     //ShowMessage(string.Format("{0} has left", ea.RtpParticipant.Name));
 }
Exemple #5
0
 public WorkItem(RtpEvents.RaiseEvent method, object[] parameters)
 {
     this.method = method;
     this.parameters = parameters;
 }
Exemple #6
0
 // CF5 Receive data from network
 private void RtpParticipantAdded(object sender, RtpEvents.RtpParticipantEventArgs ea)
 {
     listBox1.Items.Add(String.Format("{0} has joined", ea.RtpParticipant.Name));
 }
Exemple #7
0
 internal void RaiseDataStoppedEvent(object[] args)
 {
     RtpEvents.FireEvent(DataStopped, args);
 }
Exemple #8
0
 internal void RaiseFirstFrameReceivedEvent(object[] args)
 {
     RtpEvents.FireEvent(FirstFrameReceived, args);
 }
        private void DuplicateCNameDetected (object sender, RtpEvents.DuplicateCNameDetectedEventArgs ea)
        {
            if (sender == rtpSession)
            {
                string msg = string.Format("A duplicate CNAME was detected between {0} and {1}.  Connectivity testing terminating.", 
                    ea.IPAddresses[0].ToString(), ea.IPAddresses[1].ToString());

                eventLog.WriteEntry(msg, EventLogEntryType.Error, 0);
                System.Windows.Forms.MessageBox.Show(msg);

                Dispose();
            }
        }
 private void RtpReceiverReport(object sender, RtpEvents.ReceiverReportEventArgs ea)
 {
     // We'll take a receiver report from any RtpSession
     if(ea.SenderCName != cName)
     {
         if (ea.SourceCName == cName)
         {
             networkSend = true;
         }
     }
 }