]> git.sesse.net Git - vlc/blob - include/main.h
Hide libvlc_global_data_t from plugins
[vlc] / include / main.h
1 /*****************************************************************************
2  * main.h: access to all program variables
3  * Declaration and extern access to global program object.
4  *****************************************************************************
5  * Copyright (C) 1999, 2000, 2001, 2002 the VideoLAN team
6  * $Id$
7  *
8  * Authors: Vincent Seguin <seguin@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #if !defined( __LIBVLC__ )
26   #error You are not libvlc or one of its plugins. You cannot include this file
27 #endif
28
29 /*****************************************************************************
30  * libvlc_internal_instance_t
31  *****************************************************************************
32  * This structure is a LibVLC instance, for use by libvlc core and plugins
33  *****************************************************************************/
34 struct libvlc_int_t
35 {
36     VLC_COMMON_MEMBERS
37
38     /* Global properties */
39     int                    i_argc;           ///< command line arguments count
40     char **                ppsz_argv;        ///< command line arguments
41     char *                 psz_homedir;      ///< configuration directory
42     char *                 psz_userdir;      ///< user's home directory
43     char *                 psz_configfile;   ///< location of config file
44
45     playlist_t            *p_playlist;       ///< playlist object
46
47     /* Messages */
48     msg_bank_t             msg_bank;    ///< The message bank
49     int                    i_verbose;   ///< info messages
50     vlc_bool_t             b_color;     ///< color messages?
51
52     module_t *             p_memcpy_module;  ///< Fast memcpy plugin used
53     void* ( *pf_memcpy ) ( void *, const void *, size_t ); ///< fast memcpy
54     void* ( *pf_memset ) ( void *, int, size_t );          ///< fast memset
55
56     vlc_bool_t             b_stats;       ///< Should we collect stats ?
57     vlc_mutex_t            timer_lock;    ///< Lock to protect timers
58     int                    i_timers;      ///< Number of timers
59     counter_t            **pp_timers;     ///< Array of all timers
60
61     vlc_mutex_t            config_lock;    ///< Lock for the config file
62 #ifdef __APPLE__
63     vlc_mutex_t            quicktime_lock; ///< QT is not thread safe on OSX
64 #endif
65
66     /* Structure storing the action name / key associations */
67     struct hotkey
68     {
69         const char *psz_action;
70         int i_action;
71         int i_key;
72
73         /* hotkey accounting information */
74         mtime_t i_delta_date;/*< minimum delta time between two key presses */
75         mtime_t i_last_date; /*< last date key was pressed */
76         int     i_times;     /*< n times pressed within delta date*/
77     } *p_hotkeys;
78 };
79