| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
#ifndef LIBVLC_LIBVLC_H |
|---|
| 26 |
# define LIBVLC_LIBVLC_H 1 |
|---|
| 27 |
|
|---|
| 28 |
extern const char vlc_usage[]; |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
extern const struct hotkey libvlc_hotkeys[]; |
|---|
| 32 |
extern const size_t libvlc_hotkeys_size; |
|---|
| 33 |
extern int vlc_key_to_action (vlc_object_t *, const char *, |
|---|
| 34 |
vlc_value_t, vlc_value_t, void *); |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
void system_Init ( libvlc_int_t *, int *, const char *[] ); |
|---|
| 40 |
void system_Configure ( libvlc_int_t *, int *, const char *[] ); |
|---|
| 41 |
void system_End ( libvlc_int_t * ); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
int vlc_threads_init( void ); |
|---|
| 47 |
void vlc_threads_end( void ); |
|---|
| 48 |
vlc_object_t *vlc_threadobj (void); |
|---|
| 49 |
#ifdef LIBVLC_REFCHECK |
|---|
| 50 |
void vlc_refcheck (vlc_object_t *obj); |
|---|
| 51 |
#else |
|---|
| 52 |
# define vlc_refcheck( obj ) (void)0 |
|---|
| 53 |
#endif |
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
extern uint32_t cpu_flags; |
|---|
| 59 |
uint32_t CPUCapabilities( void ); |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
typedef struct msg_queue_t |
|---|
| 66 |
{ |
|---|
| 67 |
|
|---|
| 68 |
vlc_mutex_t lock; |
|---|
| 69 |
bool b_overflow; |
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 |
msg_item_t msg[VLC_MSG_QSIZE]; |
|---|
| 73 |
int i_start; |
|---|
| 74 |
int i_stop; |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
int i_sub; |
|---|
| 78 |
msg_subscription_t **pp_sub; |
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
#ifdef UNDER_CE |
|---|
| 82 |
FILE *logfile; |
|---|
| 83 |
#endif |
|---|
| 84 |
} msg_queue_t; |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
typedef struct msg_bank_t |
|---|
| 90 |
{ |
|---|
| 91 |
vlc_mutex_t lock; |
|---|
| 92 |
msg_queue_t queue; |
|---|
| 93 |
} msg_bank_t; |
|---|
| 94 |
|
|---|
| 95 |
void msg_Create (libvlc_int_t *); |
|---|
| 96 |
void msg_Flush (libvlc_int_t *); |
|---|
| 97 |
void msg_Destroy (libvlc_int_t *); |
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
typedef struct |
|---|
| 101 |
{ |
|---|
| 102 |
int i_code; |
|---|
| 103 |
char * psz_message; |
|---|
| 104 |
} msg_context_t; |
|---|
| 105 |
|
|---|
| 106 |
void msg_StackSet ( int, const char*, ... ); |
|---|
| 107 |
void msg_StackAdd ( const char*, ... ); |
|---|
| 108 |
const char* msg_StackMsg ( void ); |
|---|
| 109 |
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
|
|---|
| 114 |
extern vlc_threadvar_t msg_context_global_key; |
|---|
| 115 |
void msg_StackDestroy (void *); |
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 |
|
|---|
| 119 |
|
|---|
| 120 |
char *vlc_fix_readdir (const char *); |
|---|
| 121 |
bool vlc_current_charset (char **); |
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|
| 128 |
|
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
extern void * |
|---|
| 142 |
vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type, |
|---|
| 143 |
const char *psz_type); |
|---|
| 144 |
|
|---|
| 145 |
|
|---|
| 146 |
|
|---|
| 147 |
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
typedef struct libvlc_global_data_t |
|---|
| 153 |
{ |
|---|
| 154 |
VLC_COMMON_MEMBERS |
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
int i_counter; |
|---|
| 158 |
|
|---|
| 159 |
module_bank_t * p_module_bank; |
|---|
| 160 |
|
|---|
| 161 |
char * psz_vlcpath; |
|---|
| 162 |
} libvlc_global_data_t; |
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 |
libvlc_global_data_t *vlc_global (void); |
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
struct vlc_object_internals_t |
|---|
| 171 |
{ |
|---|
| 172 |
|
|---|
| 173 |
variable_t * p_vars; |
|---|
| 174 |
vlc_mutex_t var_lock; |
|---|
| 175 |
int i_vars; |
|---|
| 176 |
|
|---|
| 177 |
|
|---|
| 178 |
vlc_thread_t thread_id; |
|---|
| 179 |
bool b_thread; |
|---|
| 180 |
|
|---|
| 181 |
|
|---|
| 182 |
vlc_mutex_t lock; |
|---|
| 183 |
vlc_cond_t wait; |
|---|
| 184 |
int pipes[2]; |
|---|
| 185 |
vlc_spinlock_t spin; |
|---|
| 186 |
|
|---|
| 187 |
|
|---|
| 188 |
vlc_spinlock_t ref_spin; |
|---|
| 189 |
unsigned i_refcount; |
|---|
| 190 |
vlc_destructor_t pf_destructor; |
|---|
| 191 |
#ifndef LIBVLC_REFCHECK |
|---|
| 192 |
vlc_thread_t creator_id; |
|---|
| 193 |
#endif |
|---|
| 194 |
|
|---|
| 195 |
|
|---|
| 196 |
vlc_object_t *prev, *next; |
|---|
| 197 |
vlc_object_t **pp_children; |
|---|
| 198 |
int i_children; |
|---|
| 199 |
}; |
|---|
| 200 |
|
|---|
| 201 |
#define ZOOM_SECTION N_("Zoom") |
|---|
| 202 |
#define ZOOM_QUARTER_KEY_TEXT N_("1:4 Quarter") |
|---|
| 203 |
#define ZOOM_HALF_KEY_TEXT N_("1:2 Half") |
|---|
| 204 |
#define ZOOM_ORIGINAL_KEY_TEXT N_("1:1 Original") |
|---|
| 205 |
#define ZOOM_DOUBLE_KEY_TEXT N_("2:1 Double") |
|---|
| 206 |
|
|---|
| 207 |
#define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1) |
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 |
#ifdef __GNUC__ |
|---|
| 211 |
__attribute__((deprecated)) |
|---|
| 212 |
#endif |
|---|
| 213 |
static inline void |
|---|
| 214 |
vlc_object_signal_maybe (vlc_object_t *p_this) |
|---|
| 215 |
{ |
|---|
| 216 |
vlc_cond_signal (&(vlc_internals(p_this)->wait)); |
|---|
| 217 |
} |
|---|
| 218 |
|
|---|
| 219 |
|
|---|
| 220 |
|
|---|
| 221 |
|
|---|
| 222 |
typedef struct libvlc_priv_t |
|---|
| 223 |
{ |
|---|
| 224 |
|
|---|
| 225 |
vlc_mutex_t config_lock; |
|---|
| 226 |
char * psz_configfile; |
|---|
| 227 |
|
|---|
| 228 |
|
|---|
| 229 |
|
|---|
| 230 |
input_item_array_t input_items; |
|---|
| 231 |
int i_last_input_id ; |
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
msg_bank_t msg_bank; |
|---|
| 235 |
int i_verbose; |
|---|
| 236 |
bool b_color; |
|---|
| 237 |
|
|---|
| 238 |
|
|---|
| 239 |
vlc_mutex_t timer_lock; |
|---|
| 240 |
counter_t **pp_timers; |
|---|
| 241 |
int i_timers; |
|---|
| 242 |
bool b_stats; |
|---|
| 243 |
|
|---|
| 244 |
void *p_stats_computer; |
|---|
| 245 |
|
|---|
| 246 |
|
|---|
| 247 |
|
|---|
| 248 |
module_t *p_memcpy_module; |
|---|
| 249 |
playlist_t *p_playlist; |
|---|
| 250 |
vlm_t *p_vlm; |
|---|
| 251 |
interaction_t *p_interaction; |
|---|
| 252 |
httpd_t *p_httpd; |
|---|
| 253 |
|
|---|
| 254 |
|
|---|
| 255 |
sout_instance_t *p_sout; |
|---|
| 256 |
|
|---|
| 257 |
|
|---|
| 258 |
unsigned threads_count; |
|---|
| 259 |
vlc_mutex_t threads_lock; |
|---|
| 260 |
vlc_cond_t threads_wait; |
|---|
| 261 |
} libvlc_priv_t; |
|---|
| 262 |
|
|---|
| 263 |
static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc) |
|---|
| 264 |
{ |
|---|
| 265 |
return (libvlc_priv_t *)(libvlc + 1); |
|---|
| 266 |
} |
|---|
| 267 |
|
|---|
| 268 |
void playlist_ServicesDiscoveryKillAll( playlist_t *p_playlist ); |
|---|
| 269 |
|
|---|
| 270 |
#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->p_libvlc)->b_stats) |
|---|
| 271 |
|
|---|
| 272 |
|
|---|
| 273 |
|
|---|
| 274 |
|
|---|
| 275 |
extern module_config_t libvlc_config[]; |
|---|
| 276 |
extern const size_t libvlc_config_count; |
|---|
| 277 |
|
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
|
|---|
| 281 |
void var_OptionParse (vlc_object_t *, const char *, bool trusted); |
|---|
| 282 |
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 |
|
|---|
| 286 |
# ifndef HAVE_DIRENT_H |
|---|
| 287 |
typedef void DIR; |
|---|
| 288 |
# ifndef FILENAME_MAX |
|---|
| 289 |
# define FILENAME_MAX (260) |
|---|
| 290 |
# endif |
|---|
| 291 |
struct dirent |
|---|
| 292 |
{ |
|---|
| 293 |
long d_ino; |
|---|
| 294 |
unsigned short d_reclen; |
|---|
| 295 |
unsigned short d_namlen; |
|---|
| 296 |
char d_name[FILENAME_MAX]; |
|---|
| 297 |
}; |
|---|
| 298 |
# define opendir vlc_opendir |
|---|
| 299 |
# define readdir vlc_readdir |
|---|
| 300 |
# define closedir vlc_closedir |
|---|
| 301 |
# define rewinddir vlc_rewindir |
|---|
| 302 |
void *vlc_opendir (const char *); |
|---|
| 303 |
void *vlc_readdir (void *); |
|---|
| 304 |
int vlc_closedir(void *); |
|---|
| 305 |
void vlc_rewinddir(void *); |
|---|
| 306 |
# endif |
|---|
| 307 |
|
|---|
| 308 |
#if defined (WIN32) |
|---|
| 309 |
# include <dirent.h> |
|---|
| 310 |
void *vlc_wopendir (const wchar_t *); |
|---|
| 311 |
|
|---|
| 312 |
struct _wdirent *vlc_wreaddir (void *); |
|---|
| 313 |
void vlc_rewinddir (void *); |
|---|
| 314 |
# define _wopendir vlc_wopendir |
|---|
| 315 |
# define _wreaddir vlc_wreaddir |
|---|
| 316 |
# define _wclosedir vlc_wclosedir |
|---|
| 317 |
# define rewinddir vlc_rewinddir |
|---|
| 318 |
#endif |
|---|
| 319 |
|
|---|
| 320 |
#endif |
|---|