TSDuck v3.43-4462
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches

Inter-packet Arrival Time (IAT) analysis for datagram-based inputs. More...

#include <tsIATAnalyzer.h>

Classes

class  Status
 Structure containing the IAT analysis results. More...
 

Public Member Functions

 IATAnalyzer (Report &report)
 Constructor.
 
void feedPacket (const TSPacket &pkt, const TSPacketMetadata &mdata)
 The following method feeds the analyzer with a TS packet.
 
bool getStatus (Status &status)
 Get the IAT since start or the last getStatusRestart().
 
bool getStatusRestart (Status &status)
 Get the IAT since start or the last getStatusRestart().
 
bool isValid () const
 Check if the IAT analysis in progress is valid.
 
void reset ()
 Reset all collected information.
 

Detailed Description

Inter-packet Arrival Time (IAT) analysis for datagram-based inputs.

IAT measures the interval between two input datagrams. Each datagram typically contains several TS packets. Therefore, the IAT is not an interval between TS packets. IAT analysis is possible only when the origin of the TS packets is a datagram-based input such as UDP (live or from pcap file), SRT, RIST.

Constructor & Destructor Documentation

◆ IATAnalyzer()

ts::IATAnalyzer::IATAnalyzer ( Report report)

Constructor.

Parameters
[in,out]reportWhere to report errors. A reference is kept in this object instance.

Member Function Documentation

◆ feedPacket()

void ts::IATAnalyzer::feedPacket ( const TSPacket pkt,
const TSPacketMetadata mdata 
)

The following method feeds the analyzer with a TS packet.

Parameters
[in]pktA new transport stream packet.
[in]mdataAssociated metadata.

◆ isValid()

bool ts::IATAnalyzer::isValid ( ) const
inline

Check if the IAT analysis in progress is valid.

Returns
True if the analysis is either not started or if valid IAT analysis is in progress. False in case of invalid input: no timestamp, not datagrams, inconsistent timestamps, etc.

◆ getStatus()

bool ts::IATAnalyzer::getStatus ( Status status)

Get the IAT since start or the last getStatusRestart().

This is just a snapshot. The status will continue to evolve.

Parameters
[out]statusReturned status.
Returns
True on success, false if there is no IAT information (not started, no packet, not datagram, etc).

◆ getStatusRestart()

bool ts::IATAnalyzer::getStatusRestart ( Status status)

Get the IAT since start or the last getStatusRestart().

The status is reset and a new measurement period starts.

Parameters
[out]statusReturned status.
Returns
True on success, false if there is no IAT information (not started, no packet, not datagram, etc).

The documentation for this class was generated from the following file: