Наследование: RtcpSender.IRtpSession, RtcpListener.IRtpSession, RtpSender.IRtpSession, RtpListener.IRtpSession, IDisposable
Пример #1
0
        public virtual void JoinSession(RtpSession session, string participantName)
        {
            fSession = session;

            // Must hook up events before creating sender so we know when the
            // ChannelType stream is added.
            HookRtpEvents();

            CreateRtpSender(participantName);

        }
Пример #2
0
        public SpaceControlChannel(SessionManager sessManager, string participantName, MetaSpace aSpace)
        {
            fSessionManager = sessManager;
            fParticipantName = participantName;
            fSharedSpace = aSpace;
            fSession = fSessionManager.Session;

            fChunkDecoder = new SpaceCommandDecoder();
            fChunkDecoder.AddSpaceController(aSpace);

            AddChannels();
        }
Пример #3
0
        public GraphicsChannel(RtpSession aSession, string participantName, IGraphPort localRenderer)
        {
            fSession = aSession;
            fParticipantName = participantName;

            fRenderer = localRenderer;

            fChunkDecoder = new GraphPortChunkDecoder();
            fChunkDecoder.AddGraphPort(fRenderer);

            HookRtpEvents();
            JoinSession();
        }
Пример #4
0
        public MultiSession(string uniqueSessionName)
        {
            fUniqueSessionName = uniqueSessionName;

            // Step 1
            HookRtpEvents();

            // Step 2
            RtpParticipant participant = new RtpParticipant(fUniqueSessionName, fUniqueSessionName);
            fRtpSession = new RtpSession(gSessionEndPoint, participant, true, true);

            // Wait for channels to be added
        }
Пример #5
0
        public virtual void JoinSession(RtpSession session, string participantName)
        {
            fSession = session;
            fParticipantName = participantName;

            // Must hook up events before creating sender so we know when the
            // ChannelType stream is added.
            HookRtpEvents();


            // Add the channel for graphics commands
            fRtpSender = fSession.CreateRtpSender(fParticipantName, ChannelType, null);
            //fRtpSender = fSession.CreateRtpSenderFec(fParticipantName, PayloadType.xApplication2, null, 0, 200);
            //fRtpSender.DelayBetweenPackets = 0;

        }
Пример #6
0
        ConferenceSession(IPEndPoint endPoint, string uniqueName, string friendlyName, bool rtpTraffic, bool receiveData, IPEndPoint reflector)
            : base()
        {
            fModel = new ShowItModel(this);


            // Step 1
            fLocalParticipant = new RtpParticipant(uniqueName, friendlyName);

            if (null == reflector)
                Session = new RtpSession(endPoint, fLocalParticipant, true, true);
            else
                Session = new RtpSession(endPoint, fLocalParticipant, true, true, reflector);

            HookRtpEvents();


            // After everything is setup, initialize the session, which will
            // start the network messages flowing.
            Session.Initialize();

        
            // Create the three channels that are used in the conference
            fDesktopChannel = CreateChannel(PayloadType.xApplication2);
            fDesktopChannel.FrameReceivedEvent += new RtpStream.FrameReceivedEventHandler(ReceiveDesktopFrame);
            
            fAudioChannel = CreateChannel(PayloadType.xApplication3);
            fAudioChannel.FrameReceivedEvent += new RtpStream.FrameReceivedEventHandler(ReceiveAudioFrame);
            
            fVideoChannel = CreateChannel(PayloadType.xApplication4);
            fVideoChannel.FrameReceivedEvent += new RtpStream.FrameReceivedEventHandler(ReceiveVideoFrame);

            // Wait until the channels are ready
            // to send before proceeding
            do
            {
                Thread.Sleep(10);
            } while (!fDesktopChannel.IsReadyToSend && !fAudioChannel.IsReadyToSend && !fVideoChannel.IsReadyToSend);

        }
Пример #7
0
 public HiddenSocketExceptionEventArgs( RtpSession session, System.Net.Sockets.SocketException ex )
 {
     Session = session;
     Exception = ex;
 }
Пример #8
0
 protected virtual void JoinRtpSession(string ID, string name)
 {
     fSessionParticipant = new RtpParticipant(ID, name);
     fSession = new RtpSession(gSessionEndPoint, fSessionParticipant, true, true);
 }
Пример #9
0
 protected virtual void LeaveRtpSession()
 {
     if (fSession != null)
     {
         // Clean up all outstanding objects owned by the RtpSession
         fSession.Dispose();
         fSession = null;
     }
 }
Пример #10
0
 protected virtual void JoinRtpSession(string name)
 {
     RtpParticipant participant = new RtpParticipant(name, name);
     rtpSession = new RtpSession(gSessionEndPoint, participant, true, true);
 }
Пример #11
0
        public RtpListener(RtpSession rtpSession)
        {
            this.rtpSession = rtpSession;

            returnBufferHandler = new ReturnBufferHandler(ReturnBuffer);
            getBufferHandler = new GetBufferHandler(GetBuffer);

            InitializeBufferPool();
            InitializeNetwork();
            InitializeThreads();
        }