NewTOAPIA.Net.Rtp.RtpSession.CreateRtpSenderFec C# (CSharp) Method

CreateRtpSenderFec() public method

Creates an RtpSender with Forward Error Correction This RtpSender sends the data requested by the user, plus some extra data in order to help recover lost data. The recovery packets are sent per the specified ratio of cDataPx : cFecPx, e.g. 3:1 means for every 3 data packets we will send 1 fec packet. This means we can lose any 1 of the 4 packets and recover the data. 3:2 means we can lose any 2 of the 5 and still recover the data. It takes 1 FEC packet to recover 1 lost data packet. It is important to balance the extra CPU and network bandwidth against the reliability of the data. Increasing either CPU or network bandwidth too much may cause worse data loss than not correcting at all. If the FEC ratio uses only 1 FEC packet (2:1, 3:1, etc.) we use an XOR algorithm, which is very fast. If the ratio uses more than one FEC packet (3:2, 5:3, etc.), we use the Reed-Solomon algorithm. Reed-Solomon is more complicated and therefore requires more CPU, however it allows you to recover from a broader range of loss patterns.
public CreateRtpSenderFec ( string name, PayloadType pt, Hashtable priExns, ushort cDataPx, ushort cFecPx ) : RtpSender
name string
pt PayloadType
priExns System.Collections.Hashtable Private extensions for this RtpSender/Stream
cDataPx ushort
cFecPx ushort
return RtpSender
        public RtpSender CreateRtpSenderFec(string name, PayloadType pt, Hashtable priExns, ushort cDataPx, ushort cFecPx)
        {
            ValidateRtpTraffic();

            RtpSender rtpSender = RtpSender.CreateInstance(this, name, pt, priExns, cDataPx, cFecPx);
            _CreateRtpSender(rtpSender);

            return rtpSender;
        }