Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
dc7fff37
Commit
dc7fff37
authored
May 10, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_clock, libvlc_delay: expose LibVLC clock for audio sync
parent
6a45dac7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
include/vlc/libvlc.h
include/vlc/libvlc.h
+28
-0
src/control/core.c
src/control/core.c
+5
-0
src/libvlc.sym
src/libvlc.sym
+1
-0
No files found.
include/vlc/libvlc.h
View file @
dc7fff37
...
...
@@ -448,6 +448,34 @@ LIBVLC_API
libvlc_module_description_t
*
libvlc_video_filter_list_get
(
libvlc_instance_t
*
p_instance
);
/** @} */
/** \defgroup libvlc_clock LibVLC time
* These functions provide access to the LibVLC time/clock.
* @{
*/
/**
* Return the current time as defined by LibVLC. The unit is the microsecond.
* Time increases monotonically (regardless of time zone changes and RTC
* adjustements).
* The origin is arbitrary but consistent across the whole system
* (e.g. the system uptim, the time since the system was booted).
* \note On systems that support it, the POSIX monotonic clock is used.
*/
LIBVLC_API
int64_t
libvlc_clock
(
void
);
/**
* Return the delay (in microseconds) until a certain timestamp.
* \param pts timestamp
* \return negative if timestamp is in the past,
* positive if it is in the future
*/
static
inline
int64_t
libvlc_delay
(
int64_t
pts
)
{
return
pts
-
libvlc_clock
();
}
/** @} */
# ifdef __cplusplus
...
...
src/control/core.c
View file @
dc7fff37
...
...
@@ -238,3 +238,8 @@ libvlc_module_description_t *libvlc_video_filter_list_get( libvlc_instance_t *p_
{
return
libvlc_module_description_list_get
(
p_instance
,
"video filter2"
);
}
int64_t
libvlc_clock
(
void
)
{
return
mdate
();
}
src/libvlc.sym
View file @
dc7fff37
...
...
@@ -25,6 +25,7 @@ libvlc_audio_set_mute
libvlc_audio_set_track
libvlc_audio_set_volume
libvlc_audio_toggle_mute
libvlc_clock
libvlc_event_attach
libvlc_event_detach
libvlc_event_manager_new
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment