![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsmcastFluteDemux.h>
Classes | |
| class | FileStatus |
Public Types | |
| using | SessionStatus = std::map<FluteSessionId, std::map<UString, FileStatus>> |
Public Member Functions | |
| FluteDemux (DuckContext &duck, FluteHandlerInterface *handler=nullptr) | |
| ~FluteDemux () | |
| template<class Rep, class Period> | |
| void | feedPacket (const cn::duration< Rep, Period > ×tamp, const IPPacket &pkt) |
| 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) |
| void | getFilesStatus (SessionStatus &status) const |
| void | printFilesStatus (std::ostream &out) const |
| bool | reset (const FluteDemuxArgs &args, bool will_get_files_status=false) |
| void | setHandler (FluteHandlerInterface *h) |
This class extract files from FLUTE streams in UDP datagrams.
| using ts::mcast::FluteDemux::SessionStatus = std::map<FluteSessionId, std::map<UString, FileStatus>> |
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.
|
explicit |
Constructor.
| [in,out] | duck | TSDuck execution context. The reference is kept inside the demux. |
| [in] | handler | The object to invoke when FLUTE information is found. |
| ts::mcast::FluteDemux::~FluteDemux | ( | ) |
Destructor.
|
inline |
Replace the FLUTE handler.
| [in] | h | The new handler. |
| bool ts::mcast::FluteDemux::reset | ( | const FluteDemuxArgs & | args, |
| bool | will_get_files_status = false ) |
Reset the demux.
| [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. |
| void ts::mcast::FluteDemux::feedPacket | ( | const cn::duration< Rep, Period > & | timestamp, |
| const IPPacket & | pkt ) |
|
inline |
The following method feeds the demux with a UDP packet.
| [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. |
| 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.
| [out] | status | A description of all sessions and files. |
| 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.
| [in,out] | out | Where to print the summary. |