]> git.sesse.net Git - vlc/blobdiff - src/control/libvlc_internal.h
Do not export unimplemented functions
[vlc] / src / control / libvlc_internal.h
index 8ad972a787db2966dbcdb40df89eeca162efca8f..bc545a598e94f6c57688274f38664f079058e035 100644 (file)
@@ -53,12 +53,6 @@ typedef void (*libvlc_vlm_release_func_t)( libvlc_instance_t * ) ;
  * Opaque structures for libvlc API
  ***************************************************************************/
 
-typedef enum libvlc_lock_state_t
-{
-    libvlc_Locked,
-    libvlc_UnLocked
-} libvlc_lock_state_t;
-
 typedef struct libvlc_vlm_t
 {
     vlm_t                  *p_vlm;
@@ -70,11 +64,9 @@ struct libvlc_instance_t
 {
     libvlc_int_t *p_libvlc_int;
     libvlc_vlm_t  libvlc_vlm;
-    int           b_playlist_locked;
     unsigned      ref_count;
     int           verbosity;
     vlc_mutex_t   instance_lock;
-    vlc_mutex_t   event_callback_lock;
     struct libvlc_callback_entry_list_t *p_callback_list;
 };
 
@@ -112,9 +104,27 @@ void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager,
 
 /* Exception shorcuts */
 
-#define RAISENULL( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \
+#define RAISENULL( ... ) { libvlc_printerr(__VA_ARGS__); \
+                           libvlc_exception_raise( p_e ); \
                            return NULL; }
-#define RAISEZERO( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \
+#define RAISEZERO( ... ) { libvlc_printerr(__VA_ARGS__); \
+                           libvlc_exception_raise( p_e ); \
                            return 0; }
 
+static inline void clear_if_needed(libvlc_exception_t *e)
+{
+    if (libvlc_exception_raised(e))
+        libvlc_exception_clear(e);
+}
+
+static inline libvlc_time_t from_mtime(mtime_t time)
+{
+    return (time + 500ULL)/ 1000ULL;
+}
+
+static inline mtime_t to_mtime(libvlc_time_t time)
+{
+    return time * 1000ULL;
+}
+
 #endif