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 VLC_EXPORT (libvlc_int_t *, libvlc_InternalCreate, ( void ) );
00043 VLC_EXPORT (int, libvlc_InternalInit, ( libvlc_int_t *, int, const char *ppsz_argv[] ) );
00044 VLC_EXPORT (void, libvlc_InternalCleanup, ( libvlc_int_t * ) );
00045 VLC_EXPORT (void, libvlc_InternalDestroy, ( libvlc_int_t * ) );
00046
00047 VLC_EXPORT (int, libvlc_InternalAddIntf, ( libvlc_int_t *, const char * ) );
00048 VLC_EXPORT (void, libvlc_InternalWait, ( libvlc_int_t * ) );
00049
00050 typedef void (*libvlc_vlm_release_func_t)( libvlc_instance_t * ) ;
00051
00052
00053
00054
00055
00056 typedef struct libvlc_vlm_t
00057 {
00058 vlm_t *p_vlm;
00059 libvlc_event_manager_t *p_event_manager;
00060 libvlc_vlm_release_func_t pf_release;
00061 } libvlc_vlm_t;
00062
00063 struct libvlc_instance_t
00064 {
00065 libvlc_int_t *p_libvlc_int;
00066 libvlc_vlm_t libvlc_vlm;
00067 unsigned ref_count;
00068 int verbosity;
00069 vlc_mutex_t instance_lock;
00070 struct libvlc_callback_entry_list_t *p_callback_list;
00071 };
00072
00073
00074
00075
00076
00077
00078
00079 void libvlc_init_threads (void);
00080 void libvlc_deinit_threads (void);
00081
00082
00083 libvlc_event_manager_t * libvlc_event_manager_new(
00084 void * p_obj, libvlc_instance_t * p_libvlc_inst,
00085 libvlc_exception_t *p_e );
00086
00087 void libvlc_event_manager_release(
00088 libvlc_event_manager_t * p_em );
00089
00090 void libvlc_event_manager_register_event_type(
00091 libvlc_event_manager_t * p_em,
00092 libvlc_event_type_t event_type,
00093 libvlc_exception_t * p_e );
00094
00095 void libvlc_event_send(
00096 libvlc_event_manager_t * p_em,
00097 libvlc_event_t * p_event );
00098
00099 void libvlc_event_attach_async( libvlc_event_manager_t * p_event_manager,
00100 libvlc_event_type_t event_type,
00101 libvlc_callback_t pf_callback,
00102 void *p_user_data,
00103 libvlc_exception_t *p_e );
00104
00105
00106
00107 #define RAISENULL( ... ) { libvlc_printerr(__VA_ARGS__); \
00108 libvlc_exception_raise( p_e ); \
00109 return NULL; }
00110 #define RAISEZERO( ... ) { libvlc_printerr(__VA_ARGS__); \
00111 libvlc_exception_raise( p_e ); \
00112 return 0; }
00113
00114 #endif