Пример #1
0
        // Check to see if packet is inside the recovery range
        protected bool InRangeFec(RtpPacketFec packet)
        {
            bool inRange = true;

            if (rangeInitialized)
            {
                ushort minDiff = unchecked ((ushort)(packet.DataRangeMin - minSeq));

                // Correct data range but not needed - late (frame already complete)
                // OR Wrong data range - really late
                if ((minDiff == 0 && (dataPxAct + fecPxAct == 0)) || minDiff > HALF_USHORT_MAX)
                {
                    inRange = false;
                    pcFecPacketsLate++;
                    ReturnFecBuffer(packet.ReleaseBuffer());
                }
                else if (minDiff != 0) // Wrong data range - too new
                {
                    Undecodable();
                }
            }

            return(inRange);
        }
Пример #2
0
        // Check to see if packet is inside the recovery range
        protected bool InRangeFec(RtpPacketFec packet)
        {
            bool inRange = true;

            if(rangeInitialized)
            {
                ushort minDiff = unchecked((ushort)(packet.DataRangeMin - minSeq));
                
                // Correct data range but not needed - late (frame already complete)
                // OR Wrong data range - really late
                if((minDiff == 0 && (dataPxAct + fecPxAct == 0)) || minDiff > HALF_USHORT_MAX) 
                {
                    inRange = false;
                    pcFecPacketsLate++;
                    ReturnFecBuffer(packet.ReleaseBuffer());
                }                
                else if(minDiff != 0) // Wrong data range - too new
                {
                    Undecodable();
                }
            }

            return inRange;
        }