Klv Metadata timing
There are two options for carrying MISB KLV Metadata:
- Async Klv
- Sync Klv
Detailed info on Klv encoded metadata in Stanag 4609 streams
In order to select the desired mode, add the KlvPid to the output of the Injector.
var klvProps = new KlvDataPropsWr(ProcessingModeWr.INSERT_KLV_SYNC);
KlvInjector.AddKlvPidToOutput(m_KlvPid, klvProps);
In ASYNC mode, the packet will be inserted and delivered as "best effort". The timestamp, if set will be ignored.
In SYNC mode, you have the complete control on the timing by providing the timestamp (100-nanosecond units) that are translated into MPEG TS PTS timestamps.
Additionally, you must take care of the timing information that exists in the MISB (Tag 2) Klv packets, so it could correspond to the transport stream timestamps.
KlvInjector allows an easy KLV timestamp manipulation - you can simply adjust the time before sending the packet:
var pckt = m_KlvInjector.KlvRemux.AdjustTime(packetBuffer, myCorrectTime)));
m_KlvInjector.WritePacketToOutputPid(m_KlvPid, pckt, timestamp);