upipe/uclock.h header reference

structure provided by the application to retrieve system time More

Header inclusion  

Members  

Type  

Functions  

Description  

structure provided by the application to retrieve system time

Members detail  

#define UCLOCK_FREQ  

This macro is declared in upipe/uclock.h source file, line 44.

#define _UPIPE_UCLOCK_H_  

This macro is declared in upipe/uclock.h source file, line 31.

struct uclock  

This struct is declared in upipe/uclock.h source file, line 48.

This struct is a structure allowing to retrieve system time.

FieldDescription
struct urefcount * refcount;pointer to refcount management structure
uint64_t (*uclock_now)(struct uclock *) ;function returning the current system time
uint64_t (*uclock_to_real)(struct uclock *, uint64_t ) ;function converting a system time to Epoch-based real time
uint64_t (*uclock_from_real)(struct uclock *, uint64_t ) ;function converting Epoch-based real time to system time

uint64_t uclock_from_real(struct uclock *uclock, uint64_t real)  

This function is declared in upipe/uclock.h source file, line 94.

This function converts Epoch-based real time (from * 1970-01-01 00:00:00 +0000) to real time. The scale has to be passed in units of UCLOCK_FREQ.

Parameter list:

  • uclock: pointer to uclock
  • real: number of ticks since the Epoch

The return value is system time in 27 MHz ticks, or UINT64_MAX if unsupported

uint64_t uclock_now(struct uclock *uclock)  

This function is declared in upipe/uclock.h source file, line 67.

This function returns the current system time.

Parameter list:

  • uclock: pointer to uclock

The return value is current system time in 27 MHz ticks, or UINT64_MAX in case of error

void uclock_release(struct uclock *uclock)  

This function is declared in upipe/uclock.h source file, line 118.

This function decrements the reference count of a uclock or frees it.

Parameter list:

  • uclock: pointer to uclock

uint64_t uclock_to_real(struct uclock *uclock, uint64_t systime)  

This function is declared in upipe/uclock.h source file, line 80.

This function converts a system time to Epoch-based real time (from 1970-01-01 00:00:00 +0000). The scale is in units of UCLOCK_FREQ, divide by it to get standard time_t.

Parameter list:

  • uclock: pointer to uclock
  • systime: system time in 27 MHz ticks

The return value is number of ticks since the Epoch, or UINT64_MAX if unsupported

struct uclock * uclock_use(struct uclock *uclock)  

This function is declared in upipe/uclock.h source file, line 106.

This function increments the reference count of a uclock.

Parameter list:

  • uclock: pointer to uclock

The return value is same pointer to uclock

Valid XHTML 1.0 StrictGenerated by cmassiot on Fri Feb 2 23:57:19 2018 using MkDoc