RTP Audio System
2.0.0
|
Sequence Number Validator. More...
#include <seqnumvalidator.h>
Sequence Number Validator.
This class is a validator for sequence numbers. It is based on the algorithm described in RFC 1889. It can use sequence numbers up to a size of 64 bits. Jitter and fraction loss calculation is also done by this class.
SeqNumValidator::SeqNumValidator | ( | const cardinal | minSequential = 2 , |
const cardinal | maxMisorder = 100 , |
||
const cardinal | maxDropout = 3000 , |
||
const card64 | seqMod = (1 << 16) |
||
) |
Constructor for new sequence number validator.
minSequential | Minimum number of packets in sequence for the source to be valid. |
maxMisorder | Maximum difference for packets to be misordered. |
maxDropout | Maximum gap. |
seqMod | Sequence number modulo. |
double SeqNumValidator::calculateFractionLost | ( | ) |
Calculate and get fraction of packets lost.
double SeqNumValidator::getFractionLost | ( | ) | const [inline] |
Get fraction of packets lost. Note: No calculation of the fraction lost is done here! The fraction lost value is the value of the last call of calculateFractionLost()!
double SeqNumValidator::getJitter | ( | ) | const [inline] |
Get jitter.
card64 SeqNumValidator::getLastSeqNum | ( | ) | const [inline] |
Get extended last sequence number. This number is extended by the calculated number of sequence number cycles!
card64 SeqNumValidator::getPacketsLost | ( | ) | const [inline] |
Get number of packets lost. The loss is calculated by the number of sequence number cycles and gaps.
card64 SeqNumValidator::getPacketsReceived | ( | ) | const [inline] |
Get number of packets received.
void SeqNumValidator::init | ( | const card64 | sequenceNumber | ) | [inline, private] |
void SeqNumValidator::reset | ( | ) |
Reset SeqNumValidator.
Reimplemented in SourceStateInfo.
SeqNumValidator::ValidationResult SeqNumValidator::validate | ( | const card64 | sequenceNumber, |
const card32 | packetTimeStamp = 0 |
||
) |
Validate a new sequence number. If the packet is valid, jitter value will be calculated using packetTimeStamp. To disable jitter calculation, set packetTimeStamp to 0.
sequenceNumber | Sequence number to be validated. |
packetTimeStamp | Time stamp of the packet for jitter calculation. |
card64 SeqNumValidator::BadSeq [private] |
card64 SeqNumValidator::BaseSeq [private] |
card64 SeqNumValidator::Cycles [private] |
card64 SeqNumValidator::ExpectedPrior [private] |
Reimplemented in SourceStateInfo.
double SeqNumValidator::FractionLost [private] |
Reimplemented in SourceStateInfo.
double SeqNumValidator::Jitter [private] |
cardinal SeqNumValidator::MaxDropout [private] |
cardinal SeqNumValidator::MaxMisorder [private] |
card64 SeqNumValidator::MaxSeq [private] |
cardinal SeqNumValidator::MinSequential [private] |
card64 SeqNumValidator::PrevPacketArrivalTime [private] |
card64 SeqNumValidator::PrevPacketTimeStamp [private] |
card32 SeqNumValidator::Probation [private] |
card64 SeqNumValidator::Received [private] |
card64 SeqNumValidator::ReceivedPrior [private] |
Reimplemented in SourceStateInfo.
card64 SeqNumValidator::SeqMod [private] |
bool SeqNumValidator::Uninitialized [private] |