vlc/include/main.h

86 lines
4.0 KiB
C
Raw Normal View History

/*****************************************************************************
2000-01-11 07:36:06 +08:00
* main.h: access to all program variables
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.35 2002/04/27 22:11:22 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
2000-01-11 07:36:06 +08:00
/*****************************************************************************
2000-01-11 07:36:06 +08:00
* main_t, p_main (global variable)
*****************************************************************************
2000-01-11 07:36:06 +08:00
* This structure has an unique instance, declared in main and pointed by the
* only global variable of the program. It should allow access to any variable
* of the program, for user-interface purposes or more easier call of interface
* and common functions (example: the intf_*Msg functions). Please avoid using
* it when you can access the members you need in an other way. In fact, it
* should only be used by interface thread.
*****************************************************************************/
typedef struct main_s
2000-01-11 07:36:06 +08:00
{
/* Private data */
struct main_sys_s* p_sys; /* for system specific properties */
2000-01-11 07:36:06 +08:00
/* Global properties */
int i_argc; /* command line arguments count */
char ** ppsz_argv; /* command line arguments */
char * psz_arg0; /* program name (whithout path) */
char * psz_homedir; /* user's home directory */
Some heavy changes today: * Removed duplicate function checks from configure.in. * Added extra magic to Makefile.modules so that the module Makefiles are now ridiculously simple. And I mean *simple*. Check it! This will make a possible switch to full autoconf/automake a lot easier. * Added the vlc version name to the plugin symbols, to be sure we only load plugins with the same version number. A nasty consequence is that you need to rebuild your tree after midnight if you are using a CVS tree :-) * Got rid of modules_export.h by #defining exported functions in the same header as their prototype. * Added modules_inner.h and other commonly used .h files to common.h so there are less and less files to include, and renamed common.h to <videolan/vlc.h>. * First modifications to the module handling system towards my ultimate goal to get rid of the *_Probe functions. Got rid of TestMethod and TestCPU, as well as src/misc/tests.c. * Wrote the chroma plugin handling functions. No YUV functions have been ported yet because it'ls a lot of work, but the core system works, I tried it with a naive yv12->rgb16 plugin (which will disappear when the real functions are ready). * Made a lot of functions in dvd_summary.c one-liners to avoid wasting too many output lines. * Fixed a segfault in input_dvd.c:DVDInit. * Added a fixfiles.sh script in plugins/gtk to be run after Glade has generated its C files. * Did some work on the KDE interface to make it suck a bit less. It still segfaults, but at least it runs and it looks less ugly. * RGB SDL rendering works again, though in 16bpp only. * Made plugins/vcd/linux_cdrom_tools.c independent of any vlc structure so that it'll be easily put in a library. Maybe libdvdcss? * Fixed VCD date display. * Merged vout_xvideo.c, vout_x11.c and vout_common.c into xcommon.c. * Wrote non-Shm XVideo output. * Made X11 output work again. Still pretty unstable, only works for 16bpp. * Additional french translation in po/fr.po. Any taker for the rest? * Fixed a segfault in video_output.c when the allocated pictures were not direct buffers. * If $DISPLAY isn't set, don't try to run the Gtk+ interface. * Replaced 48x48 .xpm images with 32x32 ones to conform to Debian policy (Closes Debian bug #126939). * Removed the automatic ./configure launch when running `make all' for the first time. Stuff currently more broken than it ought to be: * The wall filter. Being fixed. * x11 and sdl plugins for depth != 16bpp. * Software YUV. * gvlc, gnome-vlc, kvlc shortcuts. Use --intf instead for the moment.
2001-12-30 15:09:56 +08:00
u32 i_cpu_capabilities; /* CPU extensions */
int i_warning_level; /* warning messages level */
boolean_t b_stats; /* display statistics ? */
2000-01-11 07:36:06 +08:00
/* Generic settings */
boolean_t b_audio; /* is audio output allowed ? */
boolean_t b_video; /* is video output allowed ? */
boolean_t b_stereo;
mtime_t i_desync; /* relative desync of the audio ouput */
/* Fast memcpy plugin used */
module_t * p_memcpy_module;
void* ( *pf_memcpy ) ( void *, const void *, size_t );
void* ( *pf_memset ) ( void *, int, size_t ); /* FIXME: unimplemented */
2000-01-11 07:36:06 +08:00
/* Unique threads */
p_intf_thread_t p_intf; /* main interface thread */
2000-01-11 07:36:06 +08:00
/* Shared data - these structures are accessed directly from p_main by
* several modules */
p_playlist_t p_playlist; /* playlist */
p_intf_msg_t p_msg; /* messages interface data */
p_input_channel_t p_channel; /* channel library data */
/* Locks */
vlc_mutex_t config_lock; /* lock for the config file */
2000-01-11 07:36:06 +08:00
} main_t;
#ifndef __PLUGIN__
2000-01-11 07:36:06 +08:00
extern main_t *p_main;
#else
# define p_main (p_symbols->p_main)
#endif
2000-01-11 07:36:06 +08:00
Some heavy changes today: * Removed duplicate function checks from configure.in. * Added extra magic to Makefile.modules so that the module Makefiles are now ridiculously simple. And I mean *simple*. Check it! This will make a possible switch to full autoconf/automake a lot easier. * Added the vlc version name to the plugin symbols, to be sure we only load plugins with the same version number. A nasty consequence is that you need to rebuild your tree after midnight if you are using a CVS tree :-) * Got rid of modules_export.h by #defining exported functions in the same header as their prototype. * Added modules_inner.h and other commonly used .h files to common.h so there are less and less files to include, and renamed common.h to <videolan/vlc.h>. * First modifications to the module handling system towards my ultimate goal to get rid of the *_Probe functions. Got rid of TestMethod and TestCPU, as well as src/misc/tests.c. * Wrote the chroma plugin handling functions. No YUV functions have been ported yet because it'ls a lot of work, but the core system works, I tried it with a naive yv12->rgb16 plugin (which will disappear when the real functions are ready). * Made a lot of functions in dvd_summary.c one-liners to avoid wasting too many output lines. * Fixed a segfault in input_dvd.c:DVDInit. * Added a fixfiles.sh script in plugins/gtk to be run after Glade has generated its C files. * Did some work on the KDE interface to make it suck a bit less. It still segfaults, but at least it runs and it looks less ugly. * RGB SDL rendering works again, though in 16bpp only. * Made plugins/vcd/linux_cdrom_tools.c independent of any vlc structure so that it'll be easily put in a library. Maybe libdvdcss? * Fixed VCD date display. * Merged vout_xvideo.c, vout_x11.c and vout_common.c into xcommon.c. * Wrote non-Shm XVideo output. * Made X11 output work again. Still pretty unstable, only works for 16bpp. * Additional french translation in po/fr.po. Any taker for the rest? * Fixed a segfault in video_output.c when the allocated pictures were not direct buffers. * If $DISPLAY isn't set, don't try to run the Gtk+ interface. * Replaced 48x48 .xpm images with 32x32 ones to conform to Debian policy (Closes Debian bug #126939). * Removed the automatic ./configure launch when running `make all' for the first time. Stuff currently more broken than it ought to be: * The wall filter. Being fixed. * x11 and sdl plugins for depth != 16bpp. * Software YUV. * gvlc, gnome-vlc, kvlc shortcuts. Use --intf instead for the moment.
2001-12-30 15:09:56 +08:00
/*****************************************************************************
* Fast memory operation module
*****************************************************************************/
#define FAST_MEMCPY p_main->pf_memcpy
#define FAST_MEMSET p_main->pf_memset