Assembles DSM-CC Object Carousel modules from DSI/DII/DDB messages.
More...
#include <tsDSMCCModuleAssembler.h>
|
| using | DiscoveryHandler = std::function< void(uint32_t download_id, uint16_t module_id)> |
| | Callback type for module discovery events.
|
| |
| using | ModuleHandler = std::function< void(const ModuleContext &)> |
| | Callback type for module completion events.
|
| |
|
using | ModuleKey = std::pair< uint32_t, uint16_t > |
| | Composite key used internally for tracking modules.
|
| |
|
|
static constexpr uint16_t | DEFAULT_BLOCK_SIZE = 4066 |
| | Default block_size when the DII announces 0 (the spec forbids it but malformed carousels show up and we must not divide by zero).
|
| |
Assembles DSM-CC Object Carousel modules from DSI/DII/DDB messages.
Demux-agnostic: callers feed already-parsed DSM-CC messages via feedUserToNetwork() and feedDownloadData(). A callback is invoked when a module is fully assembled.
◆ ModuleHandler
Callback type for module completion events.
Parameters: The completed ModuleContext.
◆ DiscoveryHandler
Callback type for module discovery events.
Fired once per (download_id, module_id) pair when its DII is first parsed. Not fired on version bumps of an already-known module, nor on orphan-DDB replay (the discovery already happened when the DII that announced the module arrived).
◆ DSMCCModuleAssembler()
| ts::DSMCCModuleAssembler::DSMCCModuleAssembler |
( |
DuckContext & |
duck | ) |
|
|
explicit |
Constructor.
- Parameters
-
| [in,out] | duck | TSDuck execution context. |
◆ feedUserToNetwork()
Feed a DSM-CC User-to-Network Message (DSI or DII).
- Parameters
-
| [in] | unm | The parsed message. |
◆ feedDownloadData()
Feed a DSM-CC Download Data Message (DDB).
- Parameters
-
| [in,out] | ddm | The parsed message. Payload may be moved out. |
◆ modules()
Snapshot of all known modules, keyed by (download_id, module_id).
- Returns
- The internal module map.
◆ module()
| const ModuleContext * ts::DSMCCModuleAssembler::module |
( |
uint32_t |
download_id, |
|
|
uint16_t |
module_id |
|
) |
| const |
Look up a module by (download_id, module_id).
- Parameters
-
| [in] | download_id | The download_id. |
| [in] | module_id | The module_id. |
- Returns
- Pointer to the module context, or nullptr if not found.
◆ setModuleCompletedHandler()
| void ts::DSMCCModuleAssembler::setModuleCompletedHandler |
( |
ModuleHandler |
handler | ) |
|
|
inline |
Set a callback to be invoked when a module is fully loaded.
- Parameters
-
| [in] | handler | The callback function. |
◆ setModuleDiscoveredHandler()
| void ts::DSMCCModuleAssembler::setModuleDiscoveredHandler |
( |
DiscoveryHandler |
handler | ) |
|
|
inline |
Set a callback to be invoked when a new module is announced via DII.
- Parameters
-
| [in] | handler | The callback function. |
The documentation for this class was generated from the following file: