Ejemplo n.º 1
0
        private void handleFrameReceived(object sender, MSR.LST.Net.Rtp.RtpStream.FrameReceivedEventArgs ea)
        {
            BufferChunk chunk  = ea.Frame;
            string      source = ea.RtpStream.Properties.CName;

            try {
                using (MemoryStream ms = new MemoryStream(chunk.Buffer)) {
                    object msg = this.m_bf.Deserialize(ms);
                    if (msg is UW.ClassroomPresenter.Network.Messages.Message)
                    {
                        NetworkEvent newEvent = new NetworkMessageEvent((Message)msg, DateTime.Now.Ticks, source);
                        this.m_archiver.AppendEvent(newEvent);
                        EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                        ead(this, newEvent);
                    }
                    else if (msg is UW.ClassroomPresenter.Network.Chunking.Chunk)
                    {
                        NetworkEvent newEvent = new NetworkChunkEvent((UW.ClassroomPresenter.Network.Chunking.Chunk)msg, DateTime.Now.Ticks, source);
                        this.m_archiver.AppendEvent(newEvent);
                        EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                        ead(this, newEvent);
                    }
                    else if (msg is UW.ClassroomPresenter.Network.RTP.RtpNackMessage)
                    {
                        NetworkEvent newEvent = new NetworkNACKMessageEvent((UW.ClassroomPresenter.Network.RTP.RtpNackMessage)msg, DateTime.Now.Ticks, source);
                        this.m_archiver.AppendEvent(newEvent);
                        EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                        ead(this, newEvent);
                    }
                }
            } catch (Exception e) {
                Debug.WriteLine("EXCEPTION : " + e.ToString() + " : " + e.StackTrace);
            }
        }
Ejemplo n.º 2
0
 private void handleFrameReceived(object sender, MSR.LST.Net.Rtp.RtpStream.FrameReceivedEventArgs ea)
 {
     BufferChunk chunk = ea.Frame;
     string source = ea.RtpStream.Properties.CName;
     try {
         using (MemoryStream ms = new MemoryStream(chunk.Buffer)) {
             object msg = this.m_bf.Deserialize(ms);
             if (msg is UW.ClassroomPresenter.Network.Messages.Message) {
                 NetworkEvent newEvent = new NetworkMessageEvent((Message)msg, DateTime.Now.Ticks, source);
                 this.m_archiver.AppendEvent(newEvent);
                 EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                 ead(this, newEvent);
             } else if (msg is UW.ClassroomPresenter.Network.Chunking.Chunk) {
                 NetworkEvent newEvent = new NetworkChunkEvent((UW.ClassroomPresenter.Network.Chunking.Chunk)msg, DateTime.Now.Ticks, source);
                 this.m_archiver.AppendEvent(newEvent);
                 EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                 ead(this, newEvent);
             } else if (msg is UW.ClassroomPresenter.Network.RTP.RtpNackMessage) {
                 NetworkEvent newEvent = new NetworkNACKMessageEvent((UW.ClassroomPresenter.Network.RTP.RtpNackMessage)msg, DateTime.Now.Ticks, source);
                 this.m_archiver.AppendEvent(newEvent);
                 EventArchivedDelegate ead = new EventArchivedDelegate(this.EventArchived);
                 ead(this, newEvent);
             }
         }
     } catch (Exception e) {
         Debug.WriteLine("EXCEPTION : " + e.ToString() + " : " + e.StackTrace);
     }
 }