![]() |
TSDuck v3.46-4964
MPEG Transport Stream Toolkit
|
#include <tsDSMCCCarousel.h>
Classes | |
| struct | GroupContext |
Public Types | |
| using | GroupHandler = std::function<void(const GroupContext&)> |
| using | GroupMap = std::map<uint32_t, GroupContext> |
| using | ModuleHandler = std::function<void(uint32_t download_id, uint16_t module_id, const ByteBlock& payload)> |
| using | ObjectHandler = std::function<void(uint32_t download_id, uint16_t module_id, const UString& name, const BIOPMessage& msg)> |
Public Member Functions | |
| DSMCCCarousel (DuckContext &duck) | |
| void | clear () |
| void | feedDownloadData (DSMCCDownloadDataMessage &ddm) |
| void | feedUserToNetwork (const DSMCCUserToNetworkMessage &unm) |
| void | flushPendingObjects () |
| const GroupMap & | groups () const |
| const DSMCCModuleAssembler::ModuleContext * | module (uint32_t download_id, uint16_t module_id) const |
| const std::map< DSMCCModuleAssembler::ModuleKey, DSMCCModuleAssembler::ModuleContext > & | modules () const |
| void | setGroupCompletedHandler (GroupHandler handler) |
| void | setModuleCompletedHandler (ModuleHandler handler) |
| void | setObjectHandler (ObjectHandler handler) |
| void | setScanBIOP (bool enabled) |
DSM-CC Object Carousel library facade.
Demux-agnostic entry point for extracting the content of a DSM-CC Object Carousel. Callers feed already-parsed DSM-CC messages; the carousel assembles modules, decompresses them when required, and invokes a callback with the final payload.
| using ts::DSMCCCarousel::GroupMap = std::map<uint32_t, GroupContext> |
Map of carousel groups keyed by download_id.
| using ts::DSMCCCarousel::ModuleHandler = std::function<void(uint32_t download_id, uint16_t module_id, const ByteBlock& payload)> |
Callback type for module completion events. Parameters: download_id (maps to the carousel group in data-carousel mode), module id, decompressed payload.
| using ts::DSMCCCarousel::ObjectHandler = std::function<void(uint32_t download_id, uint16_t module_id, const UString& name, const BIOPMessage& msg)> |
Callback type for BIOP object events. Invoked once per BIOP message parsed from a completed module. Parameters: download_id of the owning carousel group, module id, resolved object path (joined NameComponents from the parent SRG/Directory bindings; empty if the parent has not been parsed yet), parsed BIOP message.
| using ts::DSMCCCarousel::GroupHandler = std::function<void(const GroupContext&)> |
Callback type for group completion events. Fires exactly once per group when all known modules reach COMPLETE. Parameters: the completed GroupContext (by const ref).
|
explicit |
Constructor.
| [in,out] | duck | TSDuck execution context. |
| void ts::DSMCCCarousel::clear | ( | ) |
Clear carousel state.
| void ts::DSMCCCarousel::feedUserToNetwork | ( | const DSMCCUserToNetworkMessage & | unm | ) |
Feed a DSM-CC User-to-Network Message (DSI or DII). For a DSI, the carousel engine extracts the ServiceGateway location from the IOR and pre-seeds the name resolver so path resolution works as soon as the SRG module arrives.
| [in] | unm | The parsed message. |
|
inline |
Feed a DSM-CC Download Data Message (DDB).
| [in,out] | ddm | The parsed message. Payload may be moved out. |
|
inline |
Snapshot of all known modules, keyed by (download_id, module_id).
|
inline |
Look up a module by (download_id, module_id).
| [in] | download_id | The download_id. |
| [in] | module_id | The module_id. |
|
inline |
Snapshot of all known groups, keyed by download_id.
| void ts::DSMCCCarousel::flushPendingObjects | ( | ) |
Flush any BIOP objects that were buffered while waiting for their parent directory to be parsed. Objects whose names still cannot be resolved are emitted with an empty name.
|
inline |
Set a callback to be invoked when a module is fully loaded and decompressed.
| [in] | handler | The callback function. |
|
inline |
Set a callback to be invoked for each BIOP object extracted from a module.
| [in] | handler | The callback function. |
|
inline |
Set a callback to be invoked when all known modules in a group complete.
| [in] | handler | The callback function. |
|
inline |
Enable or disable BIOP parsing of completed modules. When disabled, the module handler still fires but no object handler callbacks occur. Use this for plain data carousels (e.g. DVB-SSU) where module payloads are opaque and BIOP parsing would only produce spurious warnings.
| [in] | enabled | True to parse BIOP (default), false to skip. |