]> git.sesse.net Git - vlc/blobdiff - src/control/libvlc_internal.h
sd: Make most members private.
[vlc] / src / control / libvlc_internal.h
index 481657c33baad0041ebaf55d97bd06c9993340c0..7ab347d7aefd415eeeafabe49cf79acf8f94ae56 100644 (file)
 
 #include <vlc_common.h>
 
+/* Note well: this header is included from LibVLC core.
+ * Therefore, static inline functions MUST NOT call LibVLC functions here
+ * (this can cause linkage failure on some platforms). */
+
 /***************************************************************************
  * Internal creation and destruction functions
  ***************************************************************************/
@@ -67,7 +71,6 @@ struct libvlc_instance_t
     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;
 };
 
@@ -82,16 +85,14 @@ void libvlc_deinit_threads (void);
 
 /* Events */
 libvlc_event_manager_t * libvlc_event_manager_new(
-        void * p_obj, libvlc_instance_t * p_libvlc_inst,
-        libvlc_exception_t *p_e );
+        void * p_obj, libvlc_instance_t * p_libvlc_inst );
 
 void libvlc_event_manager_release(
         libvlc_event_manager_t * p_em );
 
 void libvlc_event_manager_register_event_type(
         libvlc_event_manager_t * p_em,
-        libvlc_event_type_t event_type,
-        libvlc_exception_t * p_e );
+        libvlc_event_type_t event_type );
 
 void libvlc_event_send(
         libvlc_event_manager_t * p_em,
@@ -100,14 +101,16 @@ void libvlc_event_send(
 void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager,
                                libvlc_event_type_t event_type,
                                libvlc_callback_t pf_callback,
-                               void *p_user_data,
-                               libvlc_exception_t *p_e );
+                               void *p_user_data );
 
-/* Exception shorcuts */
+static inline libvlc_time_t from_mtime(mtime_t time)
+{
+    return (time + 500ULL)/ 1000ULL;
+}
 
-#define RAISENULL( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \
-                           return NULL; }
-#define RAISEZERO( ... ) { libvlc_exception_raise( p_e, __VA_ARGS__ ); \
-                           return 0; }
+static inline mtime_t to_mtime(libvlc_time_t time)
+{
+    return time * 1000ULL;
+}
 
 #endif