CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
Managing Timestamp Data

Table of Contents

Timestamp Management

PTP timestamps are sent along with all payloads as part of the payload config. These PTP timestamps are SMPTE ST 2059-2 compliant with the exception that the seconds field is limited to 32-bits instead of the specified 48-bits. The timestamps are expected to be created at origination of the media stream with the use of a PTP time source.

The SDK provides for converting PTP timestamps into RTP timestamps by using the CdiUtilityPtpToRtp() function. This function converts a PtpTimestamp into a 32-bit RTP timestamp in units of the specified sample rate. For ST 2110 video or ancillary data the sample rate should be 90kHz, audio streams should use the audio sample rate for RTP timestamp creation.

PTP timestamps are sent as part of all SDK payload headers for RAW and AVM payloads. The PTP timestamps are sent with the functions CdiAvmTxPayload() and CdiRawTxPayload().

The origination_ptp_timestamp exists as part of CdiCoreExtraData which is used by CdiCoreTxPayloadConfig and CdiAvmTxPayloadConfig on the sender side and as part of callback data structure CdiCoreCbData and CdiAvmRxCbData.

When tracking time within the AWS network use CdiCoreGetUtcTime() to get the highest precision network synced time available in AWS. Using Amazon Time Sync Service described below will help in getting the best precision network time.

If there is a need to compare time codes with network time it is STRONGLY recommended that any instances being used for getting time are configured to use Amazon Time Sync Service. Configuration instructions below:

Linux Setup Instructions

Windows Setup Instructions

The diagram below shows how timestamps sit within the larger SDK data structures.

The diagram below shows the flow from PTP timestamp creation through a video processing pipeline in AWS.