Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::rtcp::header::NtpTimestamp Class Reference

Helper to store 64-bit ntp timestamp in a common way among RTCP. More...

#include <headers.h>

Public Member Functions

void reset ()
 Reset to initial state (all zeros). More...
 
packet::ntp_timestamp_t value () const
 Get NTP timestamp value. More...
 
void set_value (const packet::ntp_timestamp_t t)
 Set NTP timestamp value. More...
 

Detailed Description

Helper to store 64-bit ntp timestamp in a common way among RTCP.

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
| NTP timestamp, most significant word |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NTP timestamp, least significant word |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
nanoseconds_t timestamp(clock_t clock)
Get current timestamp in nanoseconds.

Definition at line 102 of file headers.h.

Member Function Documentation

◆ reset()

void roc::rtcp::header::NtpTimestamp::reset ( )
inline

Reset to initial state (all zeros).

Definition at line 121 of file headers.h.

◆ set_value()

void roc::rtcp::header::NtpTimestamp::set_value ( const packet::ntp_timestamp_t  t)
inline

Set NTP timestamp value.

Definition at line 135 of file headers.h.

◆ value()

packet::ntp_timestamp_t roc::rtcp::header::NtpTimestamp::value ( ) const
inline

Get NTP timestamp value.

Definition at line 127 of file headers.h.


The documentation for this class was generated from the following file: