This topic describes the data used in Real-Time Streaming (RTS) APIs to record stream delay.


Records the data used to count the stream delay.

struct player_delay
    long long decoder_time_ms;  //current utc time when the video frame send to decoder
    long long render_time_ms;   //current utc time when the video frame send to render
    unsigned long long pts;     //the video frame's pts


Parameter Description
decoder_time_ms The system time when an image is collected (Unix timestamp). Unit: milliseconds.
render_time_ms The system time when the collected image is fed into the encoder (Unix timestamp). Unit: milliseconds.
pts The presentation timestamp. Unit: milliseconds.


player_delay does not require all pts values to be updated. You can call ioctl to send pts at a fixed granularity. The following code provides an example:
player_delay* delay = (player_delay*)malloc(sizeof(player_delay));
... set player delay param
__rts_funcs->ioctl(artc->rts_worker, "set_player_delay", delay)