* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.19 2002/08/12 22:12:50 massiot Exp $
+ * $Id: vlc_common.h,v 1.26 2002/08/30 22:22:24 massiot Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
*****************************************************************************/
/*****************************************************************************
- * Compiler-specific workarounds
+ * Required vlc headers
*****************************************************************************/
+#if defined( __BORLANDC__ )
+# undef PACKAGE
+#endif
+
+#include "config.h"
+
#if defined( __BORLANDC__ )
# undef HAVE_VARIADIC_MACROS
# undef HAVE_STDINT_H
#endif
+#include "vlc_config.h"
+#include "modules_inner.h"
+
/*****************************************************************************
* Required system headers
*****************************************************************************/
*****************************************************************************/
typedef u32 vlc_fourcc_t;
-#define VLC_FOURCC( a, b, c, d ) \
- ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
+#ifdef WORDS_BIGENDIAN
+# define VLC_FOURCC( a, b, c, d ) \
+ ( ((u32)d) | ( ((u32)c) << 8 ) | ( ((u32)b) << 16 ) | ( ((u32)a) << 24 ) )
+# define VLC_TWOCC( a, b ) \
+ ( (u16)(b) | ( (u16)(a) << 8 ) )
-#define VLC_TWOCC( a, b ) \
- ( (u16)(a) | ( (u16)(b) << 8 ) )
+#else
+# define VLC_FOURCC( a, b, c, d ) \
+ ( ((u32)a) | ( ((u32)b) << 8 ) | ( ((u32)c) << 16 ) | ( ((u32)d) << 24 ) )
+# define VLC_TWOCC( a, b ) \
+ ( (u16)(a) | ( (u16)(b) << 8 ) )
+
+#endif
/*****************************************************************************
* Classes declaration
/* Audio */
typedef struct aout_instance_t aout_instance_t;
typedef struct aout_sys_t aout_sys_t;
+typedef struct aout_fifo_t aout_fifo_t;
typedef struct aout_input_t aout_input_t;
typedef struct aout_buffer_t aout_buffer_t;
typedef struct audio_sample_format_t audio_sample_format_t;
+typedef struct audio_date_t audio_date_t;
/* Video */
typedef struct vout_thread_t vout_thread_t;
VLC_COMMON_MEMBERS
};
+/* The object list */
+struct vlc_list_t
+{
+ int i_count;
+ vlc_object_t ** pp_objects;
+
+ /* Private */
+ int _i_extra;
+ vlc_object_t * _p_first;
+};
+
/* VLC_OBJECT: attempt at doing a clever cast */
#define VLC_OBJECT( x ) \
((vlc_object_t *)(x))+0*(x)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct
/*****************************************************************************
* I18n stuff
*****************************************************************************/
-#ifndef PACKAGE /* Borland C++ uses this ! */
-#define PACKAGE VLC_PACKAGE
-#endif
-#define VERSION VLC_VERSION
-
-#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) && !defined( __BORLANDC__ ) && !defined( MODULE_NAME_IS_gnome )
+#if defined( ENABLE_NLS ) && defined ( HAVE_GETTEXT ) && !defined( __BORLANDC__ ) && !defined( NEED_GNOMESUPPORT_H )
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# else
# define N_(String) (String)
# endif
-#elif !defined( MODULE_NAME_IS_gnome )
+#elif !defined( NEED_GNOMESUPPORT_H )
# define _(String) (String)
# define N_(String) (String)
#endif
/*****************************************************************************
- * Plug-in stuff
+ * Additional vlc stuff
*****************************************************************************/
#include "vlc_symbols.h"
+#include "os_specific.h"
+#include "vlc_messages.h"
+#include "vlc_threads_funcs.h"
+#include "mtime.h"
+#include "modules.h"
+#include "main.h"
+#include "configuration.h"
+#include "vlc_objects.h"
+
+#if defined( __BORLANDC__ )
+# undef PACKAGE
+# define PACKAGE
+#endif
+