Beruflich Dokumente
Kultur Dokumente
Object Model
Application Conference API
Conference
Venue Participant VideoCapabilitySender VideoCapabilityViewer
Venue Service
DirectShow API
Managed DShow FilterGraphManager
Video Capture Compress Network Render
FilterGraphManager
Network Source Decompress Video Render
Display Venues
Venue Service
DirectShow API
Managed DShow FilterGraphManager
Video Capture Compress Network Render
FilterGraphManager
Network Source Decompress Video Render
Start BarUI
FMain_Load() Attach local objects and event handlers to the Conference object Conference.ctor Conference.Install() Check to see if ConferenceAPI and its depdendencies are properly installed Perform installation if not This allows ConferenceAPI to be used in XCopy Deployment even though ConferenceAPI has COM dependencies that must be registered and state that must be initialized on the client only once like Performance Counters and Event Logs Load A/V Devices & other CapabilitySenders into the Options menu FMain.DisplayVenues() Conference.Venues.get Conference.LocalParticipant.get RtpSession.ctor Set local RtpSession properties, like CName and Name, for this Participant MSR.LST.ConferenceXP.Identity.Identifier() Gets email address from Messenger or creates one from Windows credentials VenueService.GetVenues( Identity.Identifier ) Makes a Web Service call to the Venue Service set in the app.config file to load a list of venues from a central database foreach (Venue in Conference.Venues) Add Venue to Listbox
DirectShow API
Managed DShow FilterGraphManager
Video Capture Compress Network Render
FilterGraphManager
Network Source Decompress Video Render
Rtp API (High Level) Start sending SDES RtcpPackets RtpSender new Participant in Venue announcing
Network
RtpListener
RtpSession RtpStream
RtpListener.ctor()
Continued from previous slide InitializeThreads() RtpListeningThread() Receives incoming Rtp packets from rtpNetworkListener Creates new RtpStream objects as needed Calls RtpStream.newPacket to forward RtpPackets onto the RtpStreams RingBuffer RtcpListeningThread() Receives incoming Rtcp packets from rtcpNetworkListener SDES (Stream Description, describing Rtp traffic) BYE (Stream Leaving, when Rtp traffic is stopping) Others (SR - Sender Report, RR - Receiver Report, APP) Creates new RtpSession objects as needed from SDES Associates RtpStream objects to RtpSession objects from SDES Remove RtpStream and RtpSession objects if BYE MaintenanceThread() Send Rtcp SDES packets for this RtpSession on rtcpNetworkSender Send Rtcp RR packets for this RtpSession on rtcpNetworkSender Remove RtpStream or RtpSession objects if timed out
Venue Service
DirectShow API
Managed DShow FilterGraphManager
Video Capture Compress Network Render
SDES RtcpPacket comes in from a RtpListener somewhere on the network RtpListener RtpSender
RtpSession
Network
RtpStream
If ( RtcpPacket == SDES )
If ( ! RtpSessions.ContainsKey ( SDES.SSRC ) ) { RtpListener.RtpSessionAdded Conference.OnRtpSessionAdded
{ Participant = new Participant( VenueService.GetParticipant ( SDES.CNAME ) ) Conference.ParticipantAdded ( Participant ) FMain.OnParticipantAdded ( Participant ) Add Participant to Form } }
Send Video
Application Conference API
Conference.AutoSend == true After Venue.Join(), Conference calls DefaultVideoCapabilitySender.Play()
VideoCapabilitySender
Venue Service
Conference
Venue Participant VideoCapabilityViewer
FilterGraphManager.ctor() DirectShow API Render filters Add Capture, Compress, and Network Managed DShow NetworkRenderer.ctor() creates an instance FilterGraphManager FilterGraphManager of RtpSender Video Capture Compress Network Render Network Source Decompress Video Render
Video Capture Filters Capture Thread calls RtpSender.Send ( ) 15-30 times a second
RtpSender Network
Send Video
if (Conference.AutoPlay == true ), this is done automatically after entering Venue Conference.DefaultVideoDevice.Play VideoCapabilitySender.Play MDShow.Device.Send DShow.FilterGraphManager.ctor() Add Capture, Compress, NetRenderer filters Capture filter brings own thread NetRenderer creates RtpSender which starts its own Maintenance thread DShow.FGM.Play
RtpSender.MaintenenceThread Get RtpSession information that was set as a static for the process and is shared between RtpListener and all RtpSenders. This contains the CNAME that links the RtpListeners RtpSession to the RtpSenders RtpStreams.
Send SDES in the background which link the RtpStream created by RtpSender to the RtpListeners RtpSession
VenueCapabilityViewer Added
CapabilityViewer icon is rendered over the Participants icon
Application
Conference API
Conference
Venue Conference.CapabilityViewerAdded () Participant VideoCapabilitySender VideoCapabilityViewer
Venue Service
DirectShow API
Managed DShow FilterGraphManager RtpListener.RtpStreamAdded ( FilterGraphManager ) Video Capture Compress Network Render Network Source ( Decompress Video Render Conference.OnRtpStreamAdded ) SDES RtcpPacket comes in from a Rtp API RtpSender somewhere over the network RtpSender Network
(High Level)
RtpSession RtpStream
VideoCapabilityViewer Added
RtpListener.RtcpListenerThread Receives SDES from RtpSender RtpListener.RtpStreamAdded Associates RtpStream to RtpSession
Conference.RtpStreamToCapabilityViewer
Conference.CapabilityViewerAdded FMain.RefreshImages
Play Video
Application Conference API
Conference.AutoPlay == true Conference calls CapabilityViewer.Play() after CapabilityViewerAdded ()
VideoCapabilitySender
Venue Service
Conference
Venue VideoCapabilityViewer.Play () Participant calls MDShow.Play () which calls FilterGraphManager.ctor () VideoCapabilityViewer then NetworkSource.ctor ()
DirectShow API
Managed DShow FilterGraphManager
Video Capture Compress Network Render
FilterGraphManager
Network Source Decompress Video Render
NetworkSources thread calls NetworkSourcesinDShow threa RtpStream.NextFrame a loop and passes the data to the other filters for RtpListener decompressing and rendering
RtpSession RtpStream
Play Video
CapabilityViewer.Play MDShowManager.Play Fgm NetSource rtpStream.Subscribe rtpStream.NextFrame rtpPackets-> NetSource -> Decomp -> Render
Leave Venue
User selects Leave Venue
Venue Service
DirectShow API
Managed DShow Objects are Dispose () ed FilterGraphManager
Video Capture Compress Network Render
FilterGraphManager
Decompress Video Render
Network Source
BYE RtcpPackets are sent for all Rtp API (High Level) originating RtpStreams & RtpSessions RtpSender Network RtpListener
RtpSession RtpStream
Leave Venue
Rtcp BYE for RtpStream & RtpSession
Extras
RtpSender Details
new RtpSender ( ipEndPoint, name, role, mediaType )
rtpSender.Send( byte[] ) RtpSender Diags FEC
RtpListener
new RtpListener ( ipEndPoint) event RtpListener.RtpSessionAdded event RtpListener.RtpStreamAdded byte[] = RtpStream.NextFrame()
RtpStream
RtpFrame RingBuffer
RtpStream
RtpFrame RingBuffer Receive the RtpSession Professors video stream
RtpPacket RtcpPacket
RtpListener
Diags FEC
NetworkListener
System.Net.Sockets
Multicast RTP
What is RTP?
Peer to peer network transport Handles stream & message data Where latency is more important than guaranteed delivery In use: Windows XP RTC, Java Media Framework, Real Networks
How?
Managed code w/ .NET object model DirectShow filters for easy conferencing development
Unicast Optimized
RTP Stream 1 1 2 1 RTP Listener 1 1 RTP Listener 2 3 1 RTP Stream 2 2 1 1 3 1 RTP Stream 3 2 1 3
RTP Listener 3
1
2 2
1
2 2
1
2 2
2 RTP Packets
Multicast Optimized
RTP Stream 1 1 2 Ring Buffer 1 3 1 RTP Stream 2 2 Ring Buffer 2 3 1 RTP Stream 3 2 Ring Buffer 3 3
1 RTP Listener 1 1
RTP Packets