|
VLC 4.0.0-dev
|
Go to the source code of this file.
Data Structures | |
| struct | date_t |
| Timestamps without long-term rounding errors. More... | |
Macros | |
| #define | VLC_TICK_MIN INT64_MIN |
| #define | VLC_TICK_MAX INT64_MAX |
| #define | VLC_TICK_FROM_SEC(sec) |
| #define | SEC_FROM_VLC_TICK(vtk) |
| #define | vlc_tick_from_sec(sec) |
| #define | VLC_TICK_FROM_MS(ms) |
| #define | MS_FROM_VLC_TICK(vtk) |
| #define | VLC_TICK_FROM_US(us) |
| #define | US_FROM_VLC_TICK(vtk) |
| #define | VLC_TICK_FROM_NS(ns) |
| #define | NS_FROM_VLC_TICK(vtk) |
| #define | MSFTIME_FROM_SEC(sec) |
| #define | MSFTIME_FROM_MS(sec) |
| #define | VLC_TICK_FROM_MSFTIME(msft) |
| #define | MSFTIME_FROM_VLC_TICK(vtk) |
| #define | vlc_tick_from_timeval(tv) |
| #define | vlc_tick_from_timespec(tv) |
| #define | MSTRTIME_MAX_SIZE 22 |
Typedefs | |
| typedef int64_t | vlc_tick_t |
| High precision date or time interval. | |
| typedef int64_t | msftime_t |
Functions | |
| static vlc_tick_t | vlc_tick_from_seci (int64_t sec) |
| static vlc_tick_t | vlc_tick_from_secf (double secf) |
| static double | secf_from_vlc_tick (vlc_tick_t vtk) |
| static vlc_tick_t | vlc_tick_rate_duration (float frame_rate) |
| static vlc_tick_t | vlc_tick_from_samples (int64_t samples, unsigned samp_rate) |
| static int64_t | samples_from_vlc_tick (vlc_tick_t t, unsigned samp_rate) |
| static vlc_tick_t | vlc_tick_from_frac (uint64_t num, uint64_t den) |
| struct timespec * | vlc_tick_to_timespec (struct timespec *restrict ts, vlc_tick_t tick) |
| Converts a VLC tick to a POSIX time specification. | |
| char * | vlc_tick_to_str (char *psz_buffer, vlc_tick_t ticks) |
| Convert seconds to a time in the format h:mm:ss. | |
| void | date_Init (date_t *restrict date, uint32_t num, uint32_t den) |
| Initializes a date_t. | |
| void | date_Change (date_t *restrict date, uint32_t num, uint32_t den) |
| Changes the rate of a date_t. | |
| static void | date_Set (date_t *restrict date, vlc_tick_t value) |
| Sets the exact timestamp of a date_t. | |
| static vlc_tick_t | date_Get (const date_t *restrict date) |
| Gets the current timestamp from a date_t. | |
| vlc_tick_t | date_Increment (date_t *restrict date, uint32_t count) |
| Increments a date. | |
| vlc_tick_t | date_Decrement (date_t *restrict date, uint32_t count) |
| Decrements a date. | |
| uint64_t | vlc_ntp_time (void) |
| Gets the current wallclock time as 64-bit NTP timestamp. | |
| #define MS_FROM_VLC_TICK | ( | vtk | ) |
Referenced by EsOutDecodersStopBuffering(), EsOutVaControlLocked(), EsOutVaPrivControlLocked(), IsPictureLateToProcess(), net_Connect(), read_cbs(), RenderPicture(), stream_Silence(), vlc_atomic_timedwait(), vlc_atomic_timedwait(), vlc_entry__core(), vlc_player_SetCategoryDelay(), vlc_player_SetEsIdDelay(), vlc_tick_wait(), vlc_timer_schedule(), vlc_tls_ClientSessionCreate(), and write_cbs().
| #define MSFTIME_FROM_MS | ( | sec | ) |
| #define MSFTIME_FROM_SEC | ( | sec | ) |
| #define MSFTIME_FROM_VLC_TICK | ( | vtk | ) |
Referenced by vlc_timer_schedule().
| #define MSTRTIME_MAX_SIZE 22 |
Referenced by input_title_GetName(), vlc_player_osd_Position(), and vlc_tick_to_str().
| #define NS_FROM_VLC_TICK | ( | vtk | ) |
Referenced by vlc_tick_to_timespec().
| #define SEC_FROM_VLC_TICK | ( | vtk | ) |
Referenced by SetStopStart(), and vlc_tick_to_str().
| #define US_FROM_VLC_TICK | ( | vtk | ) |
Referenced by vlm_ControlMediaInstanceGets(), and vlm_ControlMediaInstanceGetTimePosition().
| #define VLC_TICK_FROM_MS | ( | ms | ) |
Referenced by Control(), EsOutDrainDecoder(), FileControl(), input_clock_Update(), input_Create(), libvlc_GetMainPlaylist(), LiveControl(), MainLoop(), net_Connect(), OSDWidget(), rtp_dequeue(), sout_MuxSendBuffer(), vlc_atomic_timedwait(), vlc_demux_chained_Thread(), vlc_player_input_New(), vlc_tick_wait(), vlc_tls_ClientSessionCreate(), vout_DisplayTitle(), VoutResetChronoLocked(), and VoutSaveSnapshot().
| #define VLC_TICK_FROM_MSFTIME | ( | msft | ) |
Referenced by mdate_perf_100ns(), and mdate_wall().
| #define VLC_TICK_FROM_NS | ( | ns | ) |
| #define VLC_TICK_FROM_SEC | ( | sec | ) |
Referenced by Control(), httpdLoop(), input_rate_Add(), vlc_player_SendSmpteTimerSourceUpdates(), vout_OSDEpg(), vout_OSDMessageVa(), vout_SetInterlacingState(), and VoutSnapshotPip().
| #define vlc_tick_from_sec | ( | sec | ) |
Referenced by OpenSDP(), OpenURL(), vlc_player_input_NavigationFallback(), vlc_tick_from_frac(), and vlc_tick_now().
| #define vlc_tick_from_timespec | ( | tv | ) |
Referenced by vlc_tick_now().
| #define vlc_tick_from_timeval | ( | tv | ) |
| #define VLC_TICK_FROM_US | ( | us | ) |
Referenced by vlm_ControlMediaInstanceSetTimePosition().
| #define VLC_TICK_MAX INT64_MAX |
Referenced by EsOutAddLocked(), EsOutDecoderChangeDelay(), EsOutGetTracksDelay(), RenderPicture(), rtp_dequeue(), sout_MuxGetStream(), spu_SelectSubpictures(), TraceRender(), vlc_clock_get_context(), vlc_clock_master_update(), vlc_clock_on_update(), vlc_clock_slave_update(), vlc_player_GetEsIdDelay(), vlc_player_SendTimerSourceUpdates(), vlc_player_SetEsIdDelay(), vlc_player_timer_point_Interpolate(), vlc_player_track_priv_New(), vlc_player_UpdateTimer(), vlc_player_UpdateTimerBestSource(), vlc_player_UpdateTimerSeekState(), vlc_player_UpdateTimerSource(), and vout_ReleaseDisplay().
| #define VLC_TICK_MIN INT64_MIN |
| typedef int64_t msftime_t |
| typedef int64_t vlc_tick_t |
High precision date or time interval.
Store a high precision date or time interval. The maximum precision is the microsecond, and a 64 bits integer is used to avoid overflows (maximum time interval is then 292271 years, which should be long enough for any video). Dates are stored as microseconds since a common date (usually the epoch). Note that date and time intervals can be manipulated using regular arithmetic operators, and that no special functions are required.
|
inlinestatic |
References CLOCK_FREQ.
Referenced by demux_vaControlHelper(), rtp_queue(), and stream_Silence().
|
inlinestatic |
References CLOCK_FREQ.
| uint64_t vlc_ntp_time | ( | void | ) |
Gets the current wallclock time as 64-bit NTP timestamp.
References TIME_UTC, timespec_get(), timespec::tv_nsec, and timespec::tv_sec.
|
inlinestatic |
References lldiv(), lldiv_t::quot, lldiv_t::rem, vlc_tick_from_samples(), and vlc_tick_from_sec.
Referenced by mdate_perf().
|
inlinestatic |
|
inlinestatic |
References CLOCK_FREQ.
|
inlinestatic |
References CLOCK_FREQ.
|
inlinestatic |
References CLOCK_FREQ.
Referenced by SeekFramePrevious().
| char * vlc_tick_to_str | ( | char * | psz_buffer, |
| vlc_tick_t | ticks ) |
Convert seconds to a time in the format h:mm:ss.
This function is provided for any interface function which need to print a time string in the format h:mm:ss date.
| ticks | the time to be converted |
| psz_buffer | should be a buffer at least MSTRTIME_MAX_SIZE characters |
References MSTRTIME_MAX_SIZE, SEC_FROM_VLC_TICK, unlikely, and vlc_tick_to_str().
Referenced by input_title_GetName(), vlc_player_osd_Position(), and vlc_tick_to_str().
| struct timespec * vlc_tick_to_timespec | ( | struct timespec *restrict | ts, |
| vlc_tick_t | tick ) |
Converts a VLC tick to a POSIX time specification.
| ts | [out] storage space for the time specification |
| tick | VLC tick |
ts References CLOCK_FREQ, lldiv(), NS_FROM_VLC_TICK, lldiv_t::quot, and lldiv_t::rem.
Referenced by vlc_atomic_timedwait(), vlc_atomic_timedwait(), vlc_tick_sleep(), and vlc_tick_wait().