Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _LIBVLC_INTERNAL_H
00026 #define _LIBVLC_INTERNAL_H 1
00027
00028 #ifdef HAVE_CONFIG_H
00029 # include "config.h"
00030 #endif
00031
00032 #include <vlc/libvlc_structures.h>
00033 #include <vlc/libvlc.h>
00034 #include <vlc/libvlc_media.h>
00035 #include <vlc/libvlc_events.h>
00036
00037 #include <vlc_common.h>
00038
00039
00040
00041
00042
00043
00044
00045
00046 VLC_API libvlc_int_t *libvlc_InternalCreate( void );
00047 VLC_API int libvlc_InternalInit( libvlc_int_t *, int, const char *ppsz_argv[] );
00048 VLC_API void libvlc_InternalCleanup( libvlc_int_t * );
00049 VLC_API void libvlc_InternalDestroy( libvlc_int_t * );
00050
00051 VLC_API int libvlc_InternalAddIntf( libvlc_int_t *, const char * );
00052 VLC_API void libvlc_InternalWait( libvlc_int_t * );
00053 VLC_API void libvlc_SetExitHandler( libvlc_int_t *, void (*) (void *), void * );
00054
00055 typedef void (*libvlc_vlm_release_func_t)( libvlc_instance_t * ) ;
00056
00057
00058
00059
00060
00061 typedef struct libvlc_vlm_t
00062 {
00063 vlm_t *p_vlm;
00064 libvlc_event_manager_t *p_event_manager;
00065 libvlc_vlm_release_func_t pf_release;
00066 } libvlc_vlm_t;
00067
00068 struct libvlc_instance_t
00069 {
00070 libvlc_int_t *p_libvlc_int;
00071 libvlc_vlm_t libvlc_vlm;
00072 unsigned ref_count;
00073 vlc_mutex_t instance_lock;
00074 struct libvlc_callback_entry_list_t *p_callback_list;
00075 };
00076
00077
00078
00079
00080
00081
00082
00083 void libvlc_init_threads (void);
00084 void libvlc_deinit_threads (void);
00085
00086
00087 libvlc_event_manager_t * libvlc_event_manager_new(
00088 void * p_obj, libvlc_instance_t * p_libvlc_inst );
00089
00090 void libvlc_event_manager_release(
00091 libvlc_event_manager_t * p_em );
00092
00093 void libvlc_event_manager_register_event_type(
00094 libvlc_event_manager_t * p_em,
00095 libvlc_event_type_t event_type );
00096
00097 void libvlc_event_send(
00098 libvlc_event_manager_t * p_em,
00099 libvlc_event_t * p_event );
00100
00101 void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager,
00102 libvlc_event_type_t event_type,
00103 libvlc_callback_t pf_callback,
00104 void *p_user_data );
00105
00106 static inline libvlc_time_t from_mtime(mtime_t time)
00107 {
00108 return (time + 500ULL)/ 1000ULL;
00109 }
00110
00111 static inline mtime_t to_mtime(libvlc_time_t time)
00112 {
00113 return time * 1000ULL;
00114 }
00115
00116 #endif