*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
- * Gildas Bazin <gbazin@netcourrier.com>
+ * Gildas Bazin <gbazin@videolan.org>
*
* 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
#include "config.h"
+#if defined(PACKAGE)
+# undef PACKAGE_NAME
+# define PACKAGE_NAME PACKAGE
+#endif
+#if defined(VERSION)
+# undef PACKAGE_VERSION
+# define PACKAGE_VERSION VERSION
+#endif
+
#if defined( __BORLANDC__ )
# undef HAVE_VARIADIC_MACROS
# undef HAVE_STDINT_H
# endif
#endif
-#if defined( WIN32 )
+#if defined( WIN32 ) || defined( UNDER_CE )
# include <malloc.h>
# ifndef PATH_MAX
# define PATH_MAX MAX_PATH
* Playlist commands
*/
typedef enum {
- PLAYLIST_PLAY, /**< Starts playing. No arg. */
- PLAYLIST_PAUSE, /**< Toggles playlist pause. No arg. */
- PLAYLIST_STOP, /**< Stops playing. No arg. */
- PLAYLIST_SKIP, /**< Skip X items and play. */
- PLAYLIST_GOTO, /**< Goto Xth item. */
+ PLAYLIST_PLAY, /**< No arg. res=can fail*/
+ PLAYLIST_AUTOPLAY, /**< No arg. res=cant fail*/
+ PLAYLIST_VIEWPLAY, /**< arg1= int, arg2= playlist_item_t*,*/
+ /** arg3 = playlist_item_t* , res=can fail */
+ PLAYLIST_ITEMPLAY, /** <arg1 = playlist_item_t * , res=can fail */
+ PLAYLIST_PAUSE, /**< No arg res=can fail*/
+ PLAYLIST_STOP, /**< No arg res=can fail*/
+ PLAYLIST_SKIP, /**< arg1=int, res=can fail*/
+ PLAYLIST_GOTO, /**< arg1=int res=can fail */
+ PLAYLIST_VIEWGOTO, /**< arg1=int res=can fail */
} playlist_command_t;
typedef struct playlist_t playlist_t;
typedef struct playlist_item_t playlist_item_t;
-typedef struct playlist_group_t playlist_group_t;
+typedef struct playlist_view_t playlist_view_t;
typedef struct playlist_export_t playlist_export_t;
+typedef struct services_discovery_t services_discovery_t;
+typedef struct services_discovery_sys_t services_discovery_sys_t;
+typedef struct playlist_add_t playlist_add_t;
+typedef struct playlist_preparse_t playlist_preparse_t;
/* Modules */
typedef struct module_bank_t module_bank_t;
typedef struct module_symbols_t module_symbols_t;
typedef struct module_cache_t module_cache_t;
+typedef struct config_category_t config_category_t;
+
/* Interface */
typedef struct intf_thread_t intf_thread_t;
typedef struct intf_sys_t intf_sys_t;
/* Video */
typedef struct vout_thread_t vout_thread_t;
typedef struct vout_sys_t vout_sys_t;
+typedef struct vout_synchro_t vout_synchro_t;
typedef struct chroma_sys_t chroma_sys_t;
+
typedef video_format_t video_frame_format_t;
typedef struct picture_t picture_t;
typedef struct picture_sys_t picture_sys_t;
typedef struct picture_heap_t picture_heap_t;
+
+typedef struct spu_t spu_t;
typedef struct subpicture_t subpicture_t;
typedef struct subpicture_sys_t subpicture_sys_t;
typedef struct subpicture_region_t subpicture_region_t;
-typedef struct vout_synchro_t vout_synchro_t;
-typedef struct text_renderer_sys_t text_renderer_sys_t;
typedef struct text_style_t text_style_t;
+typedef struct image_handler_t image_handler_t;
+
/* Stream output */
typedef struct sout_instance_t sout_instance_t;
typedef struct sout_instance_sys_t sout_instance_sys_t;
typedef struct stream_ctrl_t stream_ctrl_t;
typedef struct pes_packet_t pes_packet_t;
typedef struct network_socket_t network_socket_t;
+typedef struct virtual_socket_t v_socket_t;
typedef struct iso639_lang_t iso639_lang_t;
/* block */
typedef struct httpd_redirect_t httpd_redirect_t;
typedef struct httpd_stream_t httpd_stream_t;
+/* TLS support */
+typedef struct tls_t tls_t;
+typedef struct tls_server_t tls_server_t;
+typedef struct tls_session_t tls_session_t;
+
+/* XML */
+typedef struct xml_t xml_t;
+typedef struct xml_sys_t xml_sys_t;
+typedef struct xml_reader_t xml_reader_t;
+typedef struct xml_reader_sys_t xml_reader_sys_t;
+
+/* vod server */
+typedef struct vod_t vod_t;
+typedef struct vod_sys_t vod_sys_t;
+typedef struct vod_media_t vod_media_t;
+
/* opengl */
typedef struct opengl_t opengl_t;
typedef struct opengl_sys_t opengl_sys_t;
#if defined( WIN32 ) || defined( UNDER_CE )
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
-# define IS_WINNT ( GetVersion() < 0x80000000 )
+# if defined( UNDER_CE )
+# define IS_WINNT 0
+# else
+# define IS_WINNT ( GetVersion() < 0x80000000 )
+# endif
#endif
#include "vlc_threads.h"
volatile vlc_bool_t b_die; /**< set by the outside */ \
volatile vlc_bool_t b_dead; /**< set by the object */ \
volatile vlc_bool_t b_attached; /**< set by the object */ \
+ vlc_bool_t b_force; /**< set by the outside (eg. module_Need()) */ \
\
/* Object variables */ \
vlc_mutex_t var_lock; \
# define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#endif
+static int64_t GCD( int64_t a, int64_t b )
+{
+ if( b ) return GCD( b, a % b );
+ else return a;
+}
+
/* Dynamic array handling: realloc array, move data, increment position */
#define INSERT_ELEM( p_ar, i_oldsize, i_pos, elem ) \
do \
#define GetQWBE( p ) U64_AT( p )
/* Helper writer functions */
-
#define SetWLE( p, v ) _SetWLE( (uint8_t*)p, v)
static inline void _SetWLE( uint8_t *p, uint16_t i_dw )
{
SetDWLE( p, i_qw&0xffffffff );
SetDWLE( p+4, ( i_qw >> 32)&0xffffffff );
}
+#define SetWBE( p, v ) _SetWBE( (uint8_t*)p, v)
+static inline void _SetWBE( uint8_t *p, uint16_t i_dw )
+{
+ p[0] = ( i_dw >> 8 )&0xff;
+ p[1] = ( i_dw )&0xff;
+}
+
+#define SetDWBE( p, v ) _SetDWBE( (uint8_t*)p, v)
+static inline void _SetDWBE( uint8_t *p, uint32_t i_dw )
+{
+ p[0] = ( i_dw >> 24 )&0xff;
+ p[1] = ( i_dw >> 16 )&0xff;
+ p[2] = ( i_dw >> 8 )&0xff;
+ p[3] = ( i_dw )&0xff;
+}
+#define SetQWBE( p, v ) _SetQWBE( (uint8_t*)p, v)
+static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
+{
+ SetDWBE( p+4, i_qw&0xffffffff );
+ SetDWBE( p, ( i_qw >> 32)&0xffffffff );
+}
#if WORDS_BIGENDIAN
# define hton16(i) ( i )
# define vlc_atof NULL
#endif
+#ifndef HAVE_STRTOF
+# ifdef HAVE_STRTOD
+# define strtof strtod
+# endif
+#endif
+
#ifndef HAVE_ATOLL
# define atoll vlc_atoll
VLC_EXPORT( int64_t, vlc_atoll, ( const char *nptr ) );
# define vlc_atoll NULL
#endif
+#ifndef HAVE_STRTOLL
+# define strtoll vlc_strtoll
+ VLC_EXPORT( int64_t, vlc_strtoll, ( const char *nptr, char **endptr, int base ) );
+#elif !defined(__PLUGIN__)
+# define vlc_strtoll NULL
+#endif
+
#ifndef HAVE_GETENV
# define getenv vlc_getenv
VLC_EXPORT( char *, vlc_getenv, ( const char *name ) );
# define vsnprintf _vsnprintf
# endif
+# ifndef _T
+# ifdef UNICODE
+# define _T(q) L##q
+# else
+# define _T(q) q
+# endif
+# endif
#endif
/* lseek (defined in src/extras/libc.c) */
# define vlc_lseek NULL
#endif
+VLC_EXPORT( vlc_bool_t, vlc_reduce, ( int *, int *, int64_t, int64_t, int64_t ) );
+VLC_EXPORT( char **, vlc_parse_cmdline, ( const char *, int * ) );
+
/* vlc_wraptext (defined in src/extras/libc.c) */
#define wraptext vlc_wraptext
VLC_EXPORT( char *, vlc_wraptext, ( const char *, int, vlc_bool_t ) );
+/* iconv wrappers (defined in src/extras/libc.c) */
+typedef void *vlc_iconv_t;
+VLC_EXPORT( vlc_iconv_t, vlc_iconv_open, ( const char *, const char * ) );
+VLC_EXPORT( size_t, vlc_iconv, ( vlc_iconv_t, char **, size_t *, char **, size_t * ) );
+VLC_EXPORT( int, vlc_iconv_close, ( vlc_iconv_t ) );
+
/*****************************************************************************
* CPU capabilities
*****************************************************************************/
defined(MODULE_NAME_IS_pda))
/* Declare nothing: gnome.h will do it for us */
#elif defined( ENABLE_NLS )
-#if defined( HAVE_INCLUDED_GETTEXT )
-# include "libintl.h"
-#else
-# include <libintl.h>
-#endif
+# if defined( HAVE_INCLUDED_GETTEXT )
+# include "libintl.h"
+# else
+# include <libintl.h>
+# endif
# undef _
-#if defined( __BORLANDC__ )
-#define _(String) vlc_dgettext (PACKAGE_TARNAME, String)
-#else
-# define _(String) vlc_dgettext (PACKAGE, String)
-#endif
+# define _(String) vlc_dgettext (PACKAGE_NAME, String)
# define N_(String) ((char*)(String))
#else
# define _(String) ((char*)(String))