Ejemplo n.º 1
0
        /// <summary>
        /// Создает новый объект, реализующий взаимодействие с помощью RTCP пакетов
        /// </summary>
        /// <param name="localRtcpPort">Порт, на который будут приходить RTCP пакеты на локальной машине</param>
        /// <param name="sfreq">Частота дескретизации кодека для видео 90000, для аудио 8000</param>
        public RtcpReporter(int localRtcpPort, int sampleRate)
        {
            udpClient      = new UnicastUdpClient(localRtcpPort);
            remoteEndPoint = new IPEndPoint(IPAddress.Any, Port);

            rtcpHandler = new RtcpPacketHandler();

            udpClient.UdpPacketRecived += udpClient_ReceivedUdpPacket;

            rtcpHandler.CreatedRtcpSenderReport      += rtcpHandler_CreatedRtcpSenderReport;
            rtcpHandler.CreatedRtcpSourceDescription += rtcpHandler_CreatedRtcpSourceDescription;

            Port            = localRtcpPort;
            sampleFrequency = sampleRate;

            //udpSender = new UdpClient();
            //udpSender.Client.Bind(remoteEndPoint);
        }
Ejemplo n.º 2
0
        public RTSPChannel(RTSPChannelParameters parameters)
        {
            Parameters = parameters;

            unicastUdpClient = new UnicastUdpClient(Parameters.RTPPort);
            rtpPacketHandler = new RtpPacketHandler(parameters.SSRT);

            unicastUdpClient.UdpPacketRecived += rtpPacketHandler.HandleRtpPacket;
            payloadHandler = PayloadHandlerFactory.Create(Parameters.Codec);

            rtpPacketHandler.RtpPacketRecieved += payloadHandler.HandleRtpPacket;
            payloadHandler.FrameReceived       += PayloadHandler_FrameRecived;

            rtcpReporter = new RtcpReporter(Parameters.RTCPPort, Parameters.SampleRate);

            rtpPacketHandler.RtpPacketRecieved += rtcpReporter.HandleRtpPacket;
            rtcpReporter.RtpTimeReporting      += videoRtcpClient_OnRtpTimeReporting;

            rtcpReporter.SessionTimeCorrecting += videoRtcpClient_OnRtpTimeCorrecting;
        }
Ejemplo n.º 3
0
        public RTSPChannel(RTSPChannelParameters parameters)
        {
            Parameters = parameters;

            unicastUdpClient = new UnicastUdpClient(Parameters.RTPPort);
            rtpPacketHandler = new RtpPacketHandler(parameters.SSRT);

            unicastUdpClient.UdpPacketRecived += rtpPacketHandler.HandleRtpPacket;
            payloadHandler = PayloadHandlerFactory.Create(Parameters.Codec);

            rtpPacketHandler.RtpPacketRecieved += payloadHandler.HandleRtpPacket;
            payloadHandler.FrameReceived += PayloadHandler_FrameRecived;

            rtcpReporter = new RtcpReporter(Parameters.RTCPPort, Parameters.SampleRate);

            rtpPacketHandler.RtpPacketRecieved += rtcpReporter.HandleRtpPacket;
            rtcpReporter.RtpTimeReporting += videoRtcpClient_OnRtpTimeReporting;

            rtcpReporter.SessionTimeCorrecting += videoRtcpClient_OnRtpTimeCorrecting;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Создает новый объект, реализующий взаимодействие с помощью RTCP пакетов
        /// </summary>
        /// <param name="localRtcpPort">Порт, на который будут приходить RTCP пакеты на локальной машине</param>
        /// <param name="sfreq">Частота дескретизации кодека для видео 90000, для аудио 8000</param>
        public RtcpReporter(int localRtcpPort, int sampleRate)
        {
            udpClient = new UnicastUdpClient(localRtcpPort);
            remoteEndPoint = new IPEndPoint(IPAddress.Any, Port);

            rtcpHandler = new RtcpPacketHandler();

            udpClient.UdpPacketRecived += udpClient_ReceivedUdpPacket;

            rtcpHandler.CreatedRtcpSenderReport += rtcpHandler_CreatedRtcpSenderReport;
            rtcpHandler.CreatedRtcpSourceDescription += rtcpHandler_CreatedRtcpSourceDescription;

            Port = localRtcpPort;
            sampleFrequency = sampleRate;

            //udpSender = new UdpClient();
            //udpSender.Client.Bind(remoteEndPoint);
        }