![]() |
TSDuck v3.46-4964
MPEG Transport Stream Toolkit
|
#include <tsDSMCCBIOPNameResolver.h>
Public Types | |
| using | EmitCallback = std::function<void(uint16_t module_id, const UString& name, const BIOPMessage& msg)> |
| using | NameKey = std::pair<uint16_t, ByteBlock> |
Public Member Functions | |
| BIOPNameResolver ()=default | |
| void | addRoot (const NameKey &key) |
| void | clear () |
| void | defer (uint16_t module_id, std::shared_ptr< BIOPMessage > msg) |
| void | drain (const EmitCallback &cb) |
| void | flush (const EmitCallback &cb) |
| void | recordBindings (const NameKey &parent, const std::vector< BIOPBinding > &bindings) |
| UString | resolveName (const NameKey &key) const |
Resolves the absolute path of BIOP objects within a DSM-CC Object Carousel by tracking the parent/child graph established by ServiceGateway and Directory bindings. Buffers BIOP messages whose parent has not yet been seen and emits them once their name becomes resolvable.
| using ts::BIOPNameResolver::NameKey = std::pair<uint16_t, ByteBlock> |
Identifies an object inside the carousel: (module_id, object_key).
| using ts::BIOPNameResolver::EmitCallback = std::function<void(uint16_t module_id, const UString& name, const BIOPMessage& msg)> |
Callback invoked once a BIOP message is ready to be reported. Parameters: module id, resolved path (empty if unresolved), the message.
|
default |
Default constructor.
| void ts::BIOPNameResolver::clear | ( | ) |
Reset all internal state.
| void ts::BIOPNameResolver::addRoot | ( | const NameKey & | key | ) |
Mark a key as a carousel root (a ServiceGateway).
| [in] | key | (module_id, object_key) of the ServiceGateway. |
| void ts::BIOPNameResolver::recordBindings | ( | const NameKey & | parent, |
| const std::vector< BIOPBinding > & | bindings ) |
Record the parent->child name links carried by a Directory or ServiceGateway.
| [in] | parent | Identifier of the directory/SRG containing the bindings. |
| [in] | bindings | The bindings to record. |
| void ts::BIOPNameResolver::defer | ( | uint16_t | module_id, |
| std::shared_ptr< BIOPMessage > | msg ) |
Defer a BIOP message for later emission, in arrival order.
| [in] | module_id | Module the message was parsed from. |
| [in] | msg | The parsed message. |
| void ts::BIOPNameResolver::drain | ( | const EmitCallback & | cb | ) |
Emit every deferred message whose name now resolves. Messages that still cannot be resolved remain deferred.
| [in] | cb | Callback invoked for each emitted message. |
| void ts::BIOPNameResolver::flush | ( | const EmitCallback & | cb | ) |
Drain, then emit any still-deferred messages with an empty name.
| [in] | cb | Callback invoked for each emitted message. |
Resolve the absolute path of an object.
| [in] | key | (module_id, object_key) of the object. |