This class extract files from FLUTE streams in UDP datagrams.
More...
#include <tsmcastFluteDemux.h>
|
| | FluteDemux (DuckContext &duck, FluteHandlerInterface *handler=nullptr) |
| | Constructor.
|
| |
|
| ~FluteDemux () |
| | Destructor.
|
| |
| template<class Rep , class Period > |
| void | feedPacket (const cn::duration< Rep, Period > ×tamp, 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 > ×tamp, 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 | getFilesStatus (SessionStatus &status) const |
| | Get the current status of all file transfers.
|
| |
| void | printFilesStatus (std::ostream &out) const |
| | Print a list of all received files.
|
| |
| bool | reset (const FluteDemuxArgs &args, bool will_get_files_status=false) |
| | Reset the demux.
|
| |
| void | setHandler (FluteHandlerInterface *h) |
| | Replace the FLUTE handler.
|
| |
This class extract files from FLUTE streams in UDP datagrams.
◆ SessionStatus
Description of all files, in all sessions, as returned by getFilesStatus().
The outer map is indexed by FLUTE session id. In each session, the files are indexed by name.
- See also
- getFilesStatus()
◆ FluteDemux()
Constructor.
- Parameters
-
| [in,out] | duck | TSDuck execution context. The reference is kept inside the demux. |
| [in] | handler | The object to invoke when FLUTE information is found. |
◆ setHandler()
Replace the FLUTE handler.
- Parameters
-
◆ reset()
| bool ts::mcast::FluteDemux::reset |
( |
const FluteDemuxArgs & |
args, |
|
|
bool |
will_get_files_status = false |
|
) |
| |
Reset the demux.
- Parameters
-
| [in] | args | Demux arguments. |
| [in] | will_get_files_status | We intend to call getFilesStatus() later. This means that the demux needs to keep track of all received files. Since this uses a ever-growing amount of memory, be sure to specify this option when necessary only and when the demux session, until the next reset(), is limited in time. |
- Returns
- True on success, false on error.
- See also
- getFilesStatus()
◆ feedPacket() [1/2]
template<class Rep , class Period >
| void ts::mcast::FluteDemux::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] | timestamp | Packet time stamp value. This value should be taken from a monotonic clock. |
| [in] | pkt | An IP packet. |
◆ feedPacket() [2/2]
template<class Rep , class Period >
| void ts::mcast::FluteDemux::feedPacket |
( |
const cn::duration< Rep, Period > & |
timestamp, |
|
|
const IPSocketAddress & |
source, |
|
|
const IPSocketAddress & |
destination, |
|
|
const uint8_t * |
udp, |
|
|
size_t |
udp_size |
|
) |
| |
|
inline |
The following method feeds the demux with a UDP packet.
- Parameters
-
| [in] | timestamp | Packet time stamp value. This value should be taken from a monotonic clock. |
| [in] | source | Source socket address. |
| [in] | destination | Destination socket address. |
| [in] | udp | Address of UDP payload. |
| [in] | udp_size | Size in bytes of UDP payload. |
◆ getFilesStatus()
| void ts::mcast::FluteDemux::getFilesStatus |
( |
SessionStatus & |
status | ) |
const |
Get the current status of all file transfers.
This method returns current transfers only if will_get_files_status was false when reset() was called.
- Parameters
-
| [out] | status | A description of all sessions and files. |
◆ printFilesStatus()
| void ts::mcast::FluteDemux::printFilesStatus |
( |
std::ostream & |
out | ) |
const |
Print a list of all received files.
This method prints current transfers only if will_get_files_status was false when reset() was called.
- Parameters
-
| [in,out] | out | Where to print the summary. |
The documentation for this class was generated from the following file: