![]() |
TSDuck v3.44-4659
MPEG Transport Stream Toolkit
|
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. More...
#include <tsDSMCCBIOPNameResolver.h>
Public Types | |
| using | 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. | |
| using | NameKey = std::pair< uint16_t, ByteBlock > |
| Identifies an object inside the carousel: (module_id, object_key). | |
Public Member Functions | |
| BIOPNameResolver ()=default | |
| Default constructor. | |
| void | addRoot (const NameKey &key) |
| Mark a key as a carousel root (a ServiceGateway). | |
| void | clear () |
| Reset all internal state. | |
| void | defer (uint16_t module_id, std::unique_ptr< BIOPMessage > msg) |
| Defer a BIOP message for later emission, in arrival order. | |
| void | drain (const EmitCallback &cb) |
| Emit every deferred message whose name now resolves. | |
| void | flush (const EmitCallback &cb) |
| Drain, then emit any still-deferred messages with an empty name. | |
| void | recordBindings (const NameKey &parent, const std::vector< BIOPBinding > &bindings) |
| Record the parent->child name links carried by a Directory or ServiceGateway. | |
| UString | resolveName (const NameKey &key) const |
| Resolve the absolute path of an object. | |
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::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.
| 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::unique_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 (ownership transferred). |
| 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. |