Esempio n. 1
0
        /// <summary>
        /// Requests the SIP device to send a video key frame.
        /// </summary>
        /// <param name="rtpSession"></param>
        private static void RequestSIPAgentKeyFrame(RTPSession rtpSession)
        {
            if (rtpSession != null && !rtpSession.IsClosed)
            {
                var localVideoSsrc  = rtpSession.VideoLocalTrack.Ssrc;
                var remoteVideoSsrc = rtpSession.VideoRemoteTrack.Ssrc;

                Console.WriteLine($"Requesting key frame from SIP connection for remote ssrc {remoteVideoSsrc}.");

                RTCPFeedback pli = new RTCPFeedback(localVideoSsrc, remoteVideoSsrc, PSFBFeedbackTypesEnum.PLI);
                rtpSession.SendRtcpFeedback(SDPMediaTypesEnum.video, pli);
            }
        }