|
MXL : Media eXchange Layer
MXL
|
#include "mxl/time.h"#include "mxl-internal/IndexConversion.hpp"#include "mxl-internal/Thread.hpp"#include "mxl-internal/Timing.hpp"
Go to the source code of this file.
Functions | |
| MXL_EXPORT uint64_t | mxlGetCurrentIndex (mxlRational const *editRate) |
| MXL_EXPORT uint64_t | mxlGetNsUntilIndex (uint64_t index, mxlRational const *editRate) |
| MXL_EXPORT uint64_t | mxlGetTime () |
| MXL_EXPORT uint64_t | mxlIndexToTimestamp (mxlRational const *editRate, uint64_t index) |
| MXL_EXPORT void | mxlSleepForNs (uint64_t ns) |
| MXL_EXPORT void | mxlSleepUntil (uint64_t timestamp) |
| MXL_EXPORT uint64_t | mxlTimestampToIndex (mxlRational const *editRate, uint64_t timestamp) |
| MXL_EXPORT uint64_t mxlGetCurrentIndex | ( | mxlRational const * | editRate | ) |
Get the current ringbuffer index based on the current system TAI time Index 0 is defined to be index at the beginning of the epoch as defined by SMPTE ST 2059
| [in] | editRate | The edit rate of the Flow |
Definition at line 18 of file time.cpp.
| MXL_EXPORT uint64_t mxlGetNsUntilIndex | ( | uint64_t | index, |
| mxlRational const * | editRate ) |
Utility method to help compute how many nanoseconds we need to wait until the beginning of the specified index
| [in] | index | The index to wait for |
| [in] | editRate | The edit rate of the Flow |
Definition at line 50 of file time.cpp.
| MXL_EXPORT uint64_t mxlGetTime | ( | void | ) |
| MXL_EXPORT uint64_t mxlIndexToTimestamp | ( | mxlRational const * | editRate, |
| uint64_t | index ) |
Get the current timestamp based on the user provided index. Index 0 is defined to be index at the beginning of the epoch as defined by SMPTE ST 2059
| [in] | editRate | The edit rate of the Flow |
| [in] | index | The index in the ringbuffer |
Definition at line 38 of file time.cpp.
| MXL_EXPORT void mxlSleepForNs | ( | uint64_t | ns | ) |
Sleep for a specific amount of time.
| [in] | ns | How long to sleep for, in nanoseconds. |
Definition at line 65 of file time.cpp.
| MXL_EXPORT void mxlSleepUntil | ( | uint64_t | timestamp | ) |
Sleep until the specified timestamp is reached.
| [in] | timestamp | The time stamp in nanoseconds since the epoch. |
Definition at line 72 of file time.cpp.
| MXL_EXPORT uint64_t mxlTimestampToIndex | ( | mxlRational const * | editRate, |
| uint64_t | timestamp ) |
Get the current index based on the user provided timespec Index 0 is defined to be index at the beginning of the epoch as defined by SMPTE ST 2059
| [in] | editRate | The edit rate of the Flow |
| [in] | timestamp | The time stamp in nanoseconds since the epoch. |
Definition at line 31 of file time.cpp.