]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc.h
AVI: fix potential crash on seek (Closes: LP#803006)
[vlc] / include / vlc / libvlc.h
index 9091acea088d2dda211a858f8bb67f3dc307425d..da4d23d945f0d8c8825048109de4984e3ffad2de 100644 (file)
@@ -380,6 +380,8 @@ LIBVLC_API void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter );
  *
  * \param p_iter libvlc log iterator or NULL
  * \return true if iterator has more message objects, else false
+ *
+ * \libvlc_return_bool
  */
 LIBVLC_API int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter );
 
@@ -409,8 +411,6 @@ typedef struct libvlc_module_description_t
     struct libvlc_module_description_t *p_next;
 } libvlc_module_description_t;
 
-libvlc_module_description_t *libvlc_module_description_list_get( libvlc_instance_t *p_instance, const char *capability );
-
 /**
  * Release a list of module descriptions.
  *
@@ -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