libvlc_internal.h
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_EXPORT (libvlc_int_t *, libvlc_InternalCreate, ( void ) );
00047 VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, const char *ppsz_argv[] ) );
00048 VLC_EXPORT (void, libvlc_InternalCleanup, ( libvlc_int_t * ) );
00049 VLC_EXPORT (void, libvlc_InternalDestroy, ( libvlc_int_t * ) );
00050
00051 VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char * ) );
00052 VLC_EXPORT (void, libvlc_InternalWait, ( libvlc_int_t * ) );
00053 VLC_EXPORT (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 int verbosity;
00074 vlc_mutex_t instance_lock;
00075 struct libvlc_callback_entry_list_t *p_callback_list;
00076 };
00077
00078
00079
00080
00081
00082
00083
00084 void libvlc_init_threads (void);
00085 void libvlc_deinit_threads (void);
00086
00087
00088 libvlc_event_manager_t * libvlc_event_manager_new(
00089 void * p_obj, libvlc_instance_t * p_libvlc_inst );
00090
00091 void libvlc_event_manager_release(
00092 libvlc_event_manager_t * p_em );
00093
00094 void libvlc_event_manager_register_event_type(
00095 libvlc_event_manager_t * p_em,
00096 libvlc_event_type_t event_type );
00097
00098 void libvlc_event_send(
00099 libvlc_event_manager_t * p_em,
00100 libvlc_event_t * p_event );
00101
00102 void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager,
00103 libvlc_event_type_t event_type,
00104 libvlc_callback_t pf_callback,
00105 void *p_user_data );
00106
00107 static inline libvlc_time_t from_mtime(mtime_t time)
00108 {
00109 return (time + 500ULL)/ 1000ULL;
00110 }
00111
00112 static inline mtime_t to_mtime(libvlc_time_t time)
00113 {
00114 return time * 1000ULL;
00115 }
00116
00117 #endif