TSDuck v3.43-4520
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::mcast::NIPDemux Class Reference

DVB-NIP demux, extracting files and tables. More...

#include <tsmcastNIPDemux.h>

Inheritance diagram for ts::mcast::NIPDemux:
Collaboration diagram for ts::mcast::NIPDemux:

Classes

class  ServiceListContext
 Description of a DVB-I or DVB-NIP service list. More...
 

Public Member Functions

 NIPDemux (DuckContext &duck, NIPHandlerInterface *handler=nullptr)
 Constructor.
 
void addProtocolSession (const TransportProtocol &protocol, const FluteSessionId &session)
 Add a FLUTE or ROUTE session in the DVB-NIP analyzer.
 
void addSession (const FluteSessionId &session)
 Add a FLUTE session in the DVB-NIP analyzer.
 
template<class Rep , class Period >
void feedPacket (const cn::duration< Rep, Period > &timestamp, const IPPacket &pkt)
 The following method feeds the demux with an IP packet.
 
template<class Rep , class Period >
void feedPacket (const cn::duration< Rep, Period > &timestamp, const IPSocketAddress &source, const IPSocketAddress &destination, const uint8_t *udp, size_t udp_size)
 The following method feeds the demux with a UDP packet.
 
void getFileStatus ()
 Force a file status update in the FLUTE so that the handler can be notified on its handleFluteFile().
 
template<class CONTAINER >
requires std::same_as<typename CONTAINER::value_type, ts::mcast::NIPDemux::ServiceListContext>
void getServiceLists (CONTAINER &lists) const
 Get a description of all service lists.
 
template<class CONTAINER >
requires std::same_as<typename CONTAINER::value_type, ts::mcast::NIPService>
void getServices (CONTAINER &services) const
 Get a description of all services.
 
bool isFiltered (const FluteSessionId &session) const
 Check if a UDP packet or FLUTE file is part of a filtered session.
 
bool isFiltered (const IPAddress &source, const IPSocketAddress &destination) const
 Check if a UDP packet or FLUTE file is part of a filtered session.
 
bool reset (const FluteDemuxArgs &args)
 Reset the demux.
 
void setHandler (NIPHandlerInterface *h)
 Replace the NIP handler.
 

Detailed Description

DVB-NIP demux, extracting files and tables.

Constructor & Destructor Documentation

◆ NIPDemux()

ts::mcast::NIPDemux::NIPDemux ( DuckContext duck,
NIPHandlerInterface handler = nullptr 
)
explicit

Constructor.

Parameters
[in,out]duckTSDuck execution context. The reference is kept inside the demux.
[in]handlerThe object to invoke when information is found.

Member Function Documentation

◆ setHandler()

void ts::mcast::NIPDemux::setHandler ( NIPHandlerInterface h)
inline

Replace the NIP handler.

Parameters
[in]hThe new handler.

◆ reset()

bool ts::mcast::NIPDemux::reset ( const FluteDemuxArgs args)

Reset the demux.

Parameters
[in]argsDemux arguments.
Returns
True on success, false on error.

◆ feedPacket() [1/2]

template<class Rep , class Period >
void ts::mcast::NIPDemux::feedPacket ( const cn::duration< Rep, Period > &  timestamp,
const IPPacket pkt 
)

The following method feeds the demux with an IP packet.

The packet is ignored if this is not a UDP packet.

Parameters
[in]timestampPacket time stamp value. This value should be taken from a monotonic clock.
[in]pktAn IP packet.

◆ feedPacket() [2/2]

template<class Rep , class Period >
void ts::mcast::NIPDemux::feedPacket ( const cn::duration< Rep, Period > &  timestamp,
const IPSocketAddress source,
const IPSocketAddress destination,
const uint8_t *  udp,
size_t  udp_size 
)

The following method feeds the demux with a UDP packet.

Parameters
[in]timestampPacket time stamp value. This value should be taken from a monotonic clock.
[in]sourceSource socket address.
[in]destinationDestination socket address.
[in]udpAddress of UDP payload.
[in]udp_sizeSize in bytes of UDP payload.

◆ addSession()

void ts::mcast::NIPDemux::addSession ( const FluteSessionId session)

Add a FLUTE session in the DVB-NIP analyzer.

There is normally no reason to call this from the application. The analyzer always starts with the DVB-NIP Announcement Channel on reset(). Then, all declared sessions in the DVB-NIP tables are automatically added.

Parameters
[in]sessionThe session id to add.

◆ addProtocolSession()

void ts::mcast::NIPDemux::addProtocolSession ( const TransportProtocol protocol,
const FluteSessionId session 
)

Add a FLUTE or ROUTE session in the DVB-NIP analyzer.

There is normally no reason to call this from the application. The analyzer always starts with the DVB-NIP Announcement Channel on reset(). Then, all declared sessions in the DVB-NIP tables are automatically added.

Parameters
[in]protocolThe file transport protocol.
[in]sessionThe session id to add.

◆ isFiltered() [1/2]

bool ts::mcast::NIPDemux::isFiltered ( const IPAddress source,
const IPSocketAddress destination 
) const

Check if a UDP packet or FLUTE file is part of a filtered session.

Parameters
[in]sourceSource IP address.
[in]destinationDestination IP address and UDP port.
Returns
True if the packet is part of a filtered session.

◆ isFiltered() [2/2]

bool ts::mcast::NIPDemux::isFiltered ( const FluteSessionId session) const

Check if a UDP packet or FLUTE file is part of a filtered session.

Parameters
[in]sessionFLUTE session id.
Returns
True if the packet is part of a filtered session.

◆ getServiceLists()

template<class CONTAINER >
requires std::same_as<typename CONTAINER::value_type, ts::mcast::NIPDemux::ServiceListContext>
void ts::mcast::NIPDemux::getServiceLists ( CONTAINER &  lists) const

Get a description of all service lists.

Parameters
[out]listsReturned container of service list descriptions. The list of sorted by file names of service lists.

◆ getServices()

template<class CONTAINER >
requires std::same_as<typename CONTAINER::value_type, ts::mcast::NIPService>
void ts::mcast::NIPDemux::getServices ( CONTAINER &  services) const

Get a description of all services.

Parameters
[out]servicesReturned container of service descriptions. The list of sorted by logical channel number (LCN).

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