WIN32 isn't always defined under WinCE, but might be. Grmbl.
* ./include/*: changed a few u* and s* to uint*_t and int*_t.
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.30 2002/11/10 14:31:46 gbazin Exp $
+ * $Id: aout_internal.h,v 1.31 2002/11/11 14:39:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
else \
{ \
int i_alloc_size; \
- i_alloc_size = (u64)(p_alloc)->i_bytes_per_sec \
+ i_alloc_size = (uint64_t)(p_alloc)->i_bytes_per_sec \
* (i_nb_usec) / 1000000 + 1; \
ALLOCA_TEST( p_alloc, p_new_buffer ) \
{ \
VLC_EXPORT( void, aout_FormatPrepare, ( audio_sample_format_t * p_format ) );
VLC_EXPORT( void, aout_FormatPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format ) );
VLC_EXPORT( void, aout_FormatsPrint, ( aout_instance_t * p_aout, const char * psz_text, const audio_sample_format_t * p_format1, const audio_sample_format_t * p_format2 ) );
-void aout_FifoInit( aout_instance_t *, aout_fifo_t *, u32 );
+void aout_FifoInit( aout_instance_t *, aout_fifo_t *, uint32_t );
mtime_t aout_FifoNextStart( aout_instance_t *, aout_fifo_t * );
void aout_FifoPush( aout_instance_t *, aout_fifo_t *, aout_buffer_t * );
void aout_FifoSet( aout_instance_t *, aout_fifo_t *, mtime_t );
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: audio_output.h,v 1.69 2002/10/20 12:23:47 massiot Exp $
+ * $Id: audio_output.h,v 1.70 2002/11/11 14:39:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* integers, but multiplication requires shifting the 64-bit result
* from 56 fractional bits back to 28 (and rounding.)
*/
-typedef s32 vlc_fixed_t;
+typedef int32_t vlc_fixed_t;
#define FIXED32_FRACBITS 28
#define FIXED32_MIN ((vlc_fixed_t) -0x80000000L)
#define FIXED32_MAX ((vlc_fixed_t) +0x7fffffffL)
*****************************************************************************/
struct audio_date_t
{
- mtime_t date;
- u32 i_divider;
- u32 i_remainder;
+ mtime_t date;
+ uint32_t i_divider;
+ uint32_t i_remainder;
};
/*****************************************************************************
#define aout_New(a) __aout_New(VLC_OBJECT(a))
VLC_EXPORT( aout_instance_t *, __aout_New, ( vlc_object_t * ) );
VLC_EXPORT( void, aout_Delete, ( aout_instance_t * ) );
-VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, u32 ) );
+VLC_EXPORT( void, aout_DateInit, ( audio_date_t *, uint32_t ) );
VLC_EXPORT( void, aout_DateSet, ( audio_date_t *, mtime_t ) );
VLC_EXPORT( void, aout_DateMove, ( audio_date_t *, mtime_t ) );
VLC_EXPORT( mtime_t, aout_DateGet, ( const audio_date_t * ) );
-VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, u32 ) );
+VLC_EXPORT( mtime_t, aout_DateIncrement, ( audio_date_t *, uint32_t ) );
/* From dec.c : */
#define aout_DecNew(a, b, c) __aout_DecNew(VLC_OBJECT(a), b, c)
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_ext-dec.h,v 1.76 2002/11/09 16:34:52 sam Exp $
+ * $Id: input_ext-dec.h,v 1.77 2002/11/11 14:39:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
input_buffers_t *p_packets_mgt; /* packets management services data */
/* Standard pointers given to the decoders as a toolbox. */
- u16 i_id;
+ uint16_t i_id;
vlc_fourcc_t i_fourcc;
es_sys_t * p_demux_data;
stream_ctrl_t * p_stream_ctrl;
* This type describes a bit fifo used to store bits while working with the
* input stream at the bit level.
*****************************************************************************/
-typedef u32 WORD_TYPE;
+typedef uint32_t WORD_TYPE;
typedef struct bit_fifo_t
{
* results will be returned. Use RealignBits() if unsure.
*/
-#if (WORD_TYPE == u32)
+#if (WORD_TYPE == uint32_t)
# define WORD_AT U32_AT
-# define WORD_SIGNED s32
-#elif (WORD_TYPE == u64)
+# define WORD_SIGNED int32_t
+#elif (WORD_TYPE == uint64_t)
# define WORD_AT U64_AT
-# define WORD_SIGNED s64
+# define WORD_SIGNED int64_t
#else
# error Unsupported WORD_TYPE
#endif
VLC_EXPORT( int, InitBitstream, ( bit_stream_t *, decoder_fifo_t *, void ( * )( bit_stream_t *, vlc_bool_t ), void * p_callback_arg ) );
VLC_EXPORT( vlc_bool_t, NextDataPacket, ( decoder_fifo_t *, bit_stream_t * ) );
VLC_EXPORT( void, BitstreamNextDataPacket, ( bit_stream_t * ) );
-VLC_EXPORT( u32, UnalignedShowBits, ( bit_stream_t *, unsigned int ) );
+VLC_EXPORT( uint32_t, UnalignedShowBits, ( bit_stream_t *, unsigned int ) );
VLC_EXPORT( void, UnalignedRemoveBits, ( bit_stream_t * ) );
-VLC_EXPORT( u32, UnalignedGetBits, ( bit_stream_t *, unsigned int ) );
+VLC_EXPORT( uint32_t, UnalignedGetBits, ( bit_stream_t *, unsigned int ) );
VLC_EXPORT( void, CloseBitstream, ( bit_stream_t * ) );
VLC_EXPORT( void, CurrentPTS, ( bit_stream_t *, mtime_t *, mtime_t * ) );
VLC_EXPORT( void, NextPTS, ( bit_stream_t *, mtime_t *, mtime_t * ) );
/*****************************************************************************
* ShowBits : return i_bits bits from the bit stream
*****************************************************************************/
-static inline u32 ShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
+static inline uint32_t ShowBits( bit_stream_t * p_bit_stream,
+ unsigned int i_bits )
{
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
* ShowSignedBits : return i_bits bits from the bit stream, using signed
* arithmetic
*****************************************************************************/
-static inline s32 ShowSignedBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
+static inline int32_t ShowSignedBits( bit_stream_t * p_bit_stream,
+ unsigned int i_bits )
{
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
* RemoveBits32 : removes 32 bits from the bit buffer (and as a side effect,
* refill it)
*****************************************************************************/
-#if (WORD_TYPE == u32)
+#if (WORD_TYPE == uint32_t)
static inline void RemoveBits32( bit_stream_t * p_bit_stream )
{
if( p_bit_stream->p_byte <= p_bit_stream->p_end - sizeof(WORD_TYPE) )
* GetBits : returns i_bits bits from the bit stream and removes them
* XXX: do not use for 32 bits, see GetBits32
*****************************************************************************/
-static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
+static inline uint32_t GetBits( bit_stream_t * p_bit_stream,
+ unsigned int i_bits )
{
- u32 i_result;
+ uint32_t i_result;
p_bit_stream->fifo.i_available -= i_bits;
* using signed arithmetic
* XXX: do not use for 32 bits
*****************************************************************************/
-static inline s32 GetSignedBits( bit_stream_t * p_bit_stream,
- unsigned int i_bits )
+static inline int32_t GetSignedBits( bit_stream_t * p_bit_stream,
+ unsigned int i_bits )
{
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
- s32 i_result;
+ int32_t i_result;
p_bit_stream->fifo.i_available -= i_bits;
i_result = (WORD_SIGNED)p_bit_stream->fifo.buffer
/*****************************************************************************
* GetBits32 : returns 32 bits from the bit stream and removes them
*****************************************************************************/
-#if (WORD_TYPE == u32)
-static inline u32 GetBits32( bit_stream_t * p_bit_stream )
+#if (WORD_TYPE == uint32_t)
+static inline uint32_t GetBits32( bit_stream_t * p_bit_stream )
{
- u32 i_result;
+ uint32_t i_result;
if( p_bit_stream->fifo.i_available == 32 )
{
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.77 2002/08/18 13:16:51 sigmunau Exp $
+ * $Id: input_ext-intf.h,v 1.78 2002/11/11 14:39:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
struct es_descriptor_t
{
- u16 i_id; /* stream ID for PS, PID for TS */
- u8 i_stream_id; /* stream ID defined in the PES */
+ uint16_t i_id; /* stream ID for PS, PID for TS */
+ uint8_t i_stream_id; /* stream ID defined in the PES */
vlc_fourcc_t i_fourcc; /* stream type */
- u8 i_cat; /* stream category (audio, video, spu) */
+ uint8_t i_cat; /* stream category (audio, video, spu) */
int i_demux_fd; /* used to store demux device
file handle */
char psz_desc[20]; /* description of ES: audio language
struct pgrm_descriptor_t
{
/* Program characteristics */
- u16 i_number; /* program number */
- u8 i_version; /* version number */
+ uint16_t i_number; /* program number */
+ uint8_t i_version; /* version number */
vlc_bool_t b_is_ok; /* Is the description up to date ? */
/* Service Descriptor (program name) - DVB extension */
- u8 i_srv_type;
+ uint8_t i_srv_type;
char * psz_srv_name;
/* Synchronization information */
*****************************************************************************/
struct stream_descriptor_t
{
- u16 i_stream_id; /* stream id */
+ uint16_t i_stream_id; /* stream id */
vlc_bool_t b_changed; /* if stream has been changed,
we have to inform the interface */
vlc_mutex_t stream_lock; /* to be taken every time you read
input_area_t * p_new_area; /* Newly selected area from
* the interface */
- u32 i_mux_rate; /* the rate we read the stream (in
+ uint32_t i_mux_rate; /* the rate we read the stream (in
* units of 50 bytes/s) ; 0 if undef */
/* New status and rate requested by the interface */
off_t i_tell; /* actual location in the area (in arbitrary units) */
off_t i_size; /* total size of the area (in arbitrary units) */
- u32 i_mux_rate; /* the rate we read the stream (in
+ uint32_t i_mux_rate; /* the rate we read the stream (in
* units of 50 bytes/s) ; 0 if undef */
};
VLC_EXPORT( char *, input_OffsetToTime, ( input_thread_t *, char *, off_t ) );
VLC_EXPORT( int, input_ToggleES, ( input_thread_t *, es_descriptor_t *, vlc_bool_t ) );
VLC_EXPORT( int, input_ChangeArea, ( input_thread_t *, input_area_t * ) );
-VLC_EXPORT( int, input_ChangeProgram, ( input_thread_t *, u16 ) );
+VLC_EXPORT( int, input_ChangeProgram, ( input_thread_t *, uint16_t ) );
int input_ToggleGrayscale( input_thread_t * );
int input_ToggleMute ( input_thread_t * );
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.36 2002/10/27 16:58:14 gbazin Exp $
+ * $Id: input_ext-plugins.h,v 1.37 2002/11/11 14:39:11 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
VLC_EXPORT( int, input_InitStream,( input_thread_t *, size_t ) );
VLC_EXPORT( void, input_EndStream, ( input_thread_t * ) );
-VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, u16 ) );
-VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, u16, size_t ) );
+VLC_EXPORT( pgrm_descriptor_t *, input_FindProgram,( input_thread_t *, uint16_t ) );
+VLC_EXPORT( pgrm_descriptor_t *, input_AddProgram, ( input_thread_t *, uint16_t, size_t ) );
VLC_EXPORT( void, input_DelProgram,( input_thread_t *, pgrm_descriptor_t * ) );
VLC_EXPORT( int, input_SetProgram,( input_thread_t *, pgrm_descriptor_t * ) );
VLC_EXPORT( input_area_t *, input_AddArea,( input_thread_t * ) );
VLC_EXPORT( void, input_DelArea, ( input_thread_t *, input_area_t * ) );
-VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, u16 ) );
-VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, u16, size_t ) );
+VLC_EXPORT( es_descriptor_t *, input_FindES,( input_thread_t *, uint16_t ) );
+VLC_EXPORT( es_descriptor_t *, input_AddES, ( input_thread_t *, pgrm_descriptor_t *, uint16_t, size_t ) );
VLC_EXPORT( void, input_DelES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_SelectES, ( input_thread_t *, es_descriptor_t * ) );
VLC_EXPORT( int, input_UnselectES,( input_thread_t *, es_descriptor_t * ) );
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: interface.h,v 1.36 2002/10/11 22:32:55 sam Exp $
+ * $Id: interface.h,v 1.37 2002/11/11 14:39:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
/*****************************************************************************
* Macros
*****************************************************************************/
-#ifdef WIN32
+#if defined( WIN32 ) && !defined( UNDER_CE )
# define CONSOLE_INTRO_MSG \
AllocConsole(); \
freopen( "CONOUT$", "w", stdout ); \
* iso_lang.h: function to decode language code (in dvd or a52 for instance).
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: iso_lang.h,v 1.7 2002/07/20 18:01:41 sam Exp $
+ * $Id: iso_lang.h,v 1.8 2002/11/11 14:39:11 sam Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
VLC_EXPORT( const iso639_lang_t *, GetLang_1, ( const char * ) );
VLC_EXPORT( const iso639_lang_t *, GetLang_2T, ( const char * ) );
VLC_EXPORT( const iso639_lang_t *, GetLang_2B, ( const char * ) );
-VLC_EXPORT( const char *, DecodeLanguage, ( u16 ) );
+VLC_EXPORT( const char *, DecodeLanguage, ( uint16_t ) );
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: main.h,v 1.50 2002/11/10 18:04:22 sam Exp $
+ * $Id: main.h,v 1.51 2002/11/11 14:39:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
vlc_bool_t b_ready;
/* CPU extensions */
- u32 i_cpu;
+ uint32_t i_cpu;
/* Generic settings */
int i_verbose; /* info messages */
/* Fast memcpy plugin used */
module_t * p_memcpy_module;
-#if defined( WIN32 )
+#if defined( UNDER_CE )
void* ( __cdecl *pf_memcpy ) ( void *, const void *, size_t );
void* ( __cdecl *pf_memset ) ( void *, int, size_t );
#else
*/
typedef union {
- s64 q; /* Quadword (64-bit) value */
- u64 uq; /* Unsigned Quadword */
- s32 d[2]; /* 2 Doubleword (32-bit) values */
- u32 ud[2]; /* 2 Unsigned Doubleword */
- s16 w[4]; /* 4 Word (16-bit) values */
- u16 uw[4]; /* 4 Unsigned Word */
- s8 b[8]; /* 8 Byte (8-bit) values */
- u8 ub[8]; /* 8 Unsigned Byte */
+ int64_t q; /* Quadword (64-bit) value */
+ uint64_t uq; /* Unsigned Quadword */
+ int32_t d[2]; /* 2 Doubleword (32-bit) values */
+ uint32_t ud[2]; /* 2 Unsigned Doubleword */
+ int16_t w[4]; /* 4 Word (16-bit) values */
+ uint16_t uw[4]; /* 4 Unsigned Word */
+ int8_t b[8]; /* 8 Byte (8-bit) values */
+ uint8_t ub[8]; /* 8 Unsigned Byte */
float s[2]; /* Single-precision (32-bit) value */
} ATTR_ALIGN(8) mmx_t; /* On an 8-byte (64-bit) boundary */
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.h,v 1.61 2002/08/21 17:31:58 sam Exp $
+ * $Id: modules.h,v 1.62 2002/11/11 14:39:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
char *pp_shortcuts[ MODULE_SHORTCUT_MAX ]; /* Shortcuts to the module */
- char *psz_capability; /* Capability */
- int i_score; /* Score for each capability */
- u32 i_cpu; /* Required CPU capabilities */
+ char *psz_capability; /* Capability */
+ int i_score; /* Score for each capability */
+ uint32_t i_cpu; /* Required CPU capabilities */
vlc_bool_t b_unloadable; /* Can we be dlclosed? */
vlc_bool_t b_reentrant; /* Are we reentrant? */
* Functions prototyped are implemented in interface/mtime.c.
*****************************************************************************
* Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
- * $Id: mtime.h,v 1.12 2002/06/01 12:31:57 sam Exp $
+ * $Id: mtime.h,v 1.13 2002/11/11 14:39:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* returning the date of the first image to be displayed. It can be used in
* comparaison with other values: all existing dates will be earlier.
*****************************************************************************/
-#define LAST_MDATE ((mtime_t)((u64)(-1)/2))
+#define LAST_MDATE ((mtime_t)((uint64_t)(-1)/2))
/*****************************************************************************
* MSTRTIME_MAX_SIZE: maximum possible size of mstrtime
* os_specific.h: OS specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: os_specific.h,v 1.9 2002/06/02 14:26:15 gbazin Exp $
+ * $Id: os_specific.h,v 1.10 2002/11/11 14:39:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
# include "beos_specific.h"
#elif defined( SYS_DARWIN )
# include "darwin_specific.h"
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
# include "win32_specific.h"
#else
# undef _NEED_OS_SPECIFIC_H
* variables.h: variables handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: variables.h,v 1.7 2002/10/28 20:57:01 sam Exp $
+ * $Id: variables.h,v 1.8 2002/11/11 14:39:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* The variable unique name, (almost) unique hashed value, and type */
char * psz_name;
- u32 i_hash;
+ uint32_t i_hash;
int i_type;
/* A pointer to a comparison function, a duplication function, and
* includes all common video types and constants.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video.h,v 1.57 2002/11/06 18:07:57 sam Exp $
+ * $Id: video.h,v 1.58 2002/11/11 14:39:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
*****************************************************************************/
typedef struct plane_t
{
- u8 *p_pixels; /* Start of the plane's data */
+ uint8_t *p_pixels; /* Start of the plane's data */
/* Variables used for fast memcpy operations */
int i_lines; /* Number of lines */
/* Picture data - data can always be freely modified, but p_data may
* NEVER be modified. A direct buffer can be handled as the plugin
* wishes, it can even swap p_pixels buffers. */
- u8 *p_data;
+ uint8_t *p_data;
void *p_data_orig; /* pointer before memalign */
plane_t p[ VOUT_MAX_PLANES ]; /* description of the planes */
int i_planes; /* number of allocated planes */
int i_bmask, i_rbshift, i_lbshift;
/* Stuff used for palettized RGB planes */
- void (* pf_setpalette) ( vout_thread_t *, u16 *, u16 *, u16 * );
+ void (* pf_setpalette) ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * );
};
-/* RGB2PIXEL: assemble RGB components to a pixel value, returns a u32 */
-#define RGB2PIXEL( p_vout, i_r, i_g, i_b ) \
- (((((u32)i_r) >> p_vout->output.i_rrshift) << p_vout->output.i_lrshift) | \
- ((((u32)i_g) >> p_vout->output.i_rgshift) << p_vout->output.i_lgshift) | \
- ((((u32)i_b) >> p_vout->output.i_rbshift) << p_vout->output.i_lbshift))
+/* RGB2PIXEL: assemble RGB components to a pixel value, returns a uint32_t */
+#define RGB2PIXEL( p_vout, i_r, i_g, i_b ) \
+ (((((uint32_t)i_r) >> p_vout->output.i_rrshift) \
+ << p_vout->output.i_lrshift) \
+ | ((((uint32_t)i_g) >> p_vout->output.i_rgshift) \
+ << p_vout->output.i_lgshift) \
+ | ((((uint32_t)i_b) >> p_vout->output.i_rbshift) \
+ << p_vout->output.i_lbshift))
/*****************************************************************************
* Flags used to describe the status of a picture
{
vout_font_t * p_font; /* font, NULL for default */
int i_style; /* text style */
- u32 i_char_color; /* character color */
- u32 i_border_color; /* border color */
- u32 i_bg_color; /* background color */
+ uint32_t i_char_color; /* character color */
+ uint32_t i_border_color; /* border color */
+ uint32_t i_bg_color; /* background color */
} text;
} type;
#endif
* thread, and destroy a previously opened video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_output.h,v 1.85 2002/11/06 18:07:57 sam Exp $
+ * $Id: video_output.h,v 1.86 2002/11/11 14:39:11 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
vout_sys_t * p_sys; /* system output method */
/* Current display properties */
- u16 i_changes; /* changes made to the thread */
+ uint16_t i_changes; /* changes made to the thread */
float f_gamma; /* gamma */
vlc_bool_t b_grayscale; /* color or grayscale display */
vlc_bool_t b_info; /* print additional information */
* Prototypes
*****************************************************************************/
#define vout_CreateThread(a,b,c,d,e) __vout_CreateThread(VLC_OBJECT(a),b,c,d,e)
-VLC_EXPORT( vout_thread_t *, __vout_CreateThread, ( vlc_object_t *, int, int, u32, int ) );
+VLC_EXPORT( vout_thread_t *, __vout_CreateThread, ( vlc_object_t *, int, int, uint32_t, int ) );
VLC_EXPORT( void, vout_DestroyThread, ( vout_thread_t * ) );
-VLC_EXPORT( int, vout_ChromaCmp, ( u32, u32 ) );
+VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) );
VLC_EXPORT( picture_t *, vout_CreatePicture, ( vout_thread_t *, vlc_bool_t, vlc_bool_t, vlc_bool_t ) );
-VLC_EXPORT( void, vout_AllocatePicture,( vout_thread_t *, picture_t *, int, int, u32 ) );
+VLC_EXPORT( void, vout_AllocatePicture,( vout_thread_t *, picture_t *, int, int, uint32_t ) );
VLC_EXPORT( void, vout_DestroyPicture, ( vout_thread_t *, picture_t * ) );
VLC_EXPORT( void, vout_DisplayPicture, ( vout_thread_t *, picture_t * ) );
VLC_EXPORT( void, vout_DatePicture, ( vout_thread_t *, picture_t *, mtime_t ) );
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.36 2002/11/10 23:41:53 sam Exp $
+ * $Id: vlc_common.h,v 1.37 2002/11/11 14:39:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
typedef signed short int16_t;
typedef unsigned int uint32_t;
typedef signed int int32_t;
-# if defined( _MSC_VER ) || ( defined( WIN32 ) && !defined( __MINGW32__ ) )
+# if defined( _MSC_VER ) \
+ || defined( UNDER_CE ) \
+ || ( defined( WIN32 ) && !defined( __MINGW32__ ) )
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
# else
# endif
#endif
-#if defined( WIN32 )
+#if defined( WIN32 ) || defined( UNDER_CE )
typedef int ssize_t;
#endif
/*****************************************************************************
* OS-specific headers and thread types
*****************************************************************************/
-#if defined( WIN32 )
+#if defined( WIN32 ) || defined( UNDER_CE )
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
#ifdef NTOHL_IN_SYS_PARAM_H
# include <sys/param.h>
-#elif !defined(WIN32) /* NTOHL_IN_SYS_PARAM_H || WIN32 */
+#elif !defined(WIN32) && !defined( UNDER_CE )
# include <netinet/in.h>
#endif /* NTOHL_IN_SYS_PARAM_H || WIN32 */
#endif
/* Format type specifiers for 64 bits numbers */
-#if !defined(WIN32)
+#if !defined(WIN32) && !defined(UNDER_CE)
# define I64Fd "%lld"
# define I64Fi "%lli"
# define I64Fo "%llo"
# define I64Fu "%I64u"
# define I64Fx "%I64x"
# define I64FX "%I64X"
-#endif /* defined(WIN32) */
+#endif /* defined(WIN32)||defined(UNDER_CE) */
/* 64 bits integer constant suffix */
-#if !defined(WIN32)
+#if !defined(WIN32) && !defined(UNDER_CE)
# define I64C(x) x##LL
#else
# define I64C(x) x##i64
-#endif /* defined(WIN32) */
+#endif /* defined(WIN32)||defined(UNDER_CE) */
-#ifdef WIN32
+#if defined(WIN32) && !defined(UNDER_CE)
/* win32, cl and icl support */
# if defined( _MSC_VER ) || !defined( __MINGW32__ )
# define __attribute__(x)
/* The configuration file and directory */
#ifdef SYS_BEOS
# define CONFIG_DIR "config/settings"
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
# define CONFIG_DIR "vlc"
#else
# define CONFIG_DIR ".vlc"
#define DEFAULT_PTS_DELAY (mtime_t)(.3*CLOCK_FREQ)
/* DVD and VCD devices */
-#ifndef WIN32
+#if !defined( WIN32 ) && !defined( UNDER_CE )
# define DVD_DEVICE "/dev/dvd"
# define VCD_DEVICE "/dev/cdrom"
#else
* cpu.h: CPU type detection
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: vlc_cpu.h,v 1.4 2002/10/03 13:21:54 sam Exp $
+ * $Id: vlc_cpu.h,v 1.5 2002/11/11 14:39:11 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
-u32 CPUCapabilities( void );
+uint32_t CPUCapabilities( void );
* This header provides portable declarations for mutexes & conditions
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads.h,v 1.17 2002/11/10 18:04:22 sam Exp $
+ * $Id: vlc_threads.h,v 1.18 2002/11/11 14:39:11 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#elif defined( ST_INIT_IN_ST_H ) /* State threads */
# include <st.h>
-#elif defined( WIN32 )
-# if defined( UNDER_CE )
+#elif defined( UNDER_CE )
/* WinCE API */
-# else
-# include <process.h> /* Win32 API */
-# endif
+#elif defined( WIN32 )
+# include <process.h> /* Win32 API */
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */
# include <pthread.h>
# define VLC_THREAD_PRIORITY_VIDEO 31
# define VLC_THREAD_PRIORITY_OUTPUT 31
-#elif defined(WIN32)
+#elif defined(WIN32) || defined(UNDER_CE)
# define VLC_THREAD_PRIORITY_LOW 0
# define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_TIME_CRITICAL
# define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_HIGHEST
vlc_object_t * p_this;
} vlc_cond_t;
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
typedef HANDLE vlc_thread_t;
typedef BOOL (WINAPI *SIGNALOBJECTANDWAIT) ( HANDLE, HANDLE, DWORD, BOOL );
typedef unsigned (__stdcall *PTHREAD_START) (void *);
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads_funcs.h,v 1.8 2002/11/10 18:04:22 sam Exp $
+ * $Id: vlc_threads_funcs.h,v 1.9 2002/11/11 14:39:11 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
#elif defined( ST_INIT_IN_ST_H )
i_result = st_mutex_lock( p_mutex->mutex );
+#elif defined( UNDER_CE )
+ EnterCriticalSection( &p_mutex->csection );
+ return 0;
+
#elif defined( WIN32 )
if( p_mutex->mutex )
{
#elif defined( ST_INIT_IN_ST_H )
i_result = st_mutex_unlock( p_mutex->mutex );
+#elif defined( UNDER_CE )
+ LeaveCriticalSection( &p_mutex->csection );
+ return 0;
+
#elif defined( WIN32 )
if( p_mutex->mutex )
{
#elif defined( ST_INIT_IN_ST_H )
i_result = st_cond_signal( p_condvar->cond );
+#elif defined( UNDER_CE )
+ PulseEvent( p_condvar->event );
+ return 0;
+
#elif defined( WIN32 )
/* Release one waiting thread if one is available. */
/* For this trick to work properly, the vlc_cond_signal must be surrounded
{
PulseEvent( p_condvar->event );
}
-# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 )
{
/* Wait for the gate to be open */
WaitForSingleObject( p_condvar->event, INFINITE );
}
}
-# endif
return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
#elif defined( ST_INIT_IN_ST_H )
i_result = st_cond_broadcast( p_condvar->cond );
+#elif defined( UNDER_CE )
+ int i;
+
+ /* Release all waiting threads. */
+ for( i = p_condvar->i_waiting_threads; i > 0; i-- )
+ {
+ PulseEvent( p_condvar->event );
+ }
+ return 0;
+
#elif defined( WIN32 )
int i;
PulseEvent( p_condvar->event );
}
}
-# ifndef UNDER_CE
else if( p_condvar->i_win9x_cv == 1 )
{
/* Wait for the gate to be open */
WaitForSingleObject( p_condvar->event, INFINITE );
}
}
-# endif
return 0;
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
i_result = st_cond_wait( p_condvar->cond );
st_mutex_lock( p_mutex->mutex );
+#elif defined( UNDER_CE )
+ p_condvar->i_waiting_threads++;
+ LeaveCriticalSection( &p_mutex->csection );
+ WaitForSingleObject( p_condvar->event, INFINITE );
+ p_condvar->i_waiting_threads--;
+
+ /* Reacquire the mutex before returning. */
+ vlc_mutex_lock( p_mutex );
+
+ return 0;
+
#elif defined( WIN32 )
if( !p_condvar->semaphore )
{
* Significantly revised and rewinddir, seekdir and telldir added by Colin
* Peters <colin@fu.is.saga-u.ac.jp>
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
* $Author: sam $
- * $Date: 2002/11/10 23:41:53 $
+ * $Date: 2002/11/11 14:39:12 $
*
*/
}
else
{
- /* FIXME: if I wasn't lazy, I'dcheck for overflows here. */
+ /* FIXME: if I wasn't lazy, I'd check for overflows here. */
sprintf (szFullPath, MAX_PATH, "\\%s", szPath );
}
#else
#endif
#endif
-#if defined (WIN32) && !defined (__CYGWIN32__)
+#if defined (WIN32) && !defined (__CYGWIN32__) || defined(UNDER_CE)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: input.c,v 1.214 2002/11/10 18:04:23 sam Exp $
+ * $Id: input.c,v 1.215 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
#include <string.h>
#ifdef HAVE_SYS_TIMES_H
{
psz_parser++;
}
-#ifdef WIN32
+#if defined( WIN32 ) || defined( UNDER_CE )
if( psz_parser - p_input->psz_source == 1 )
{
msg_Warn( p_input, "drive letter %c: found in source string",
- p_input->psz_source ) ;
+ p_input->psz_source[0] ) ;
psz_parser = "";
}
#endif
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.33 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_clock.c,v 1.34 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
* input_dec.c: Functions for the management of decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.50 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_dec.c,v 1.51 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-dec.h"
#include "input_ext-intf.h"
* input_ext-dec.c: services to the decoders
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-dec.c,v 1.40 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_ext-dec.c,v 1.41 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-dec.h"
#include "input_ext-intf.h"
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-intf.c,v 1.42 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_ext-intf.c,v 1.43 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-dec.h"
#include "input_ext-intf.h"
* input_ext-plugins.c: useful functions for access and demux plug-ins
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_ext-plugins.c,v 1.21 2002/11/10 23:41:53 sam Exp $
+ * $Id: input_ext-plugins.c,v 1.22 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#endif
#ifdef UNDER_CE
- /* No network support */
+ /* No network support (FIXME: use winsock1?) */
#elif defined( WIN32 )
# include <winsock2.h>
# include <ws2tcpip.h>
* input_info.c: Convenient functions to handle the input info structures
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_info.c,v 1.8 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_info.c,v 1.9 2002/11/11 14:39:12 sam Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-intf.h"
#include "interface.h"
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2002 VideoLAN
- * $Id: input_programs.c,v 1.97 2002/11/10 18:04:23 sam Exp $
+ * $Id: input_programs.c,v 1.98 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
#include <vlc/vlc.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* off_t */
-#endif
-
#include "stream_control.h"
#include "input_ext-intf.h"
#include "input_ext-dec.h"
i_index++;
}
- /* XXX: no need to memmove, we have unordered data */
+ /* XXX: no need to memmove, we have unsorted data */
REMOVE_ELEM( p_input->stream.pp_selected_es,
p_input->stream.i_selected_es_number,
i_index );
* intf_eject.c: CD/DVD-ROM ejection handling functions
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
- * $Id: intf_eject.c,v 1.16 2002/11/10 18:04:23 sam Exp $
+ * $Id: intf_eject.c,v 1.17 2002/11/11 14:39:12 sam Exp $
*
* Author: Julien Blache <jb@technologeek.org> for the Linux part
* with code taken from the Linux "eject" command
return 1;
-#elif defined(WIN32)
-
-#if defined(UNDER_CE)
+#elif defined(UNDER_CE)
msg_Warn( p_this, "CD-Rom ejection unsupported on this platform" );
- i_ret = -1;
-
-#else
+ return 1;
+
+#elif defined(WIN32)
HANDLE h_drive ;
TCHAR psz_drive_id[8] ;
DWORD dw_access_flags = GENERIC_READ ;
CloseHandle (h_drive) ;
return (i_ret) ;
}
-#endif /* UNDER_CE */
#else /* WIN32 */
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.44 2002/11/10 23:41:53 sam Exp $
+ * $Id: configuration.c,v 1.45 2002/11/11 14:39:12 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
struct passwd *p_pw = NULL;
#endif
-#ifdef WIN32
+#if defined(WIN32) || defined(UNDER_CE)
typedef HRESULT (WINAPI *SHGETFOLDERPATH)( HWND, int, HANDLE, DWORD,
LPTSTR );
# define CSIDL_FLAG_CREATE 0x8000
* cpu.c: CPU detection code
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: cpu.c,v 1.8 2002/11/10 18:04:24 sam Exp $
+ * $Id: cpu.c,v 1.9 2002/11/11 14:39:12 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
*****************************************************************************
* This function is called to list extensions the CPU may have.
*****************************************************************************/
-u32 CPUCapabilities( void )
+uint32_t CPUCapabilities( void )
{
- volatile u32 i_capabilities = CPU_CAPABILITY_NONE;
+ volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE;
#if defined( SYS_DARWIN )
struct host_basic_info hi;
* modules, especially intf modules. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.21 2002/11/10 18:04:24 sam Exp $
+ * $Id: messages.c,v 1.22 2002/11/11 14:39:12 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
p_item->psz_msg );
}
-#if defined(WIN32)
+#if defined(WIN32) || defined(UNDER_CE)
fflush( stderr );
#endif
}
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.102 2002/11/10 18:04:24 sam Exp $
+ * $Id: modules.c,v 1.103 2002/11/11 14:39:12 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
#elif defined(HAVE_IMAGE_H) /* BeOS */
# include <image.h>
# define HAVE_DYNAMIC_PLUGINS
+#elif defined(UNDER_CE)
+# define HAVE_DYNAMIC_PLUGINS
#elif defined(WIN32)
# define HAVE_DYNAMIC_PLUGINS
#else
* modules_plugin.h : Plugin management functions used by the core application.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h.in,v 1.5 2002/10/31 11:16:30 sam Exp $
+ * $Id: modules_plugin.h.in,v 1.6 2002/11/11 14:39:12 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
*handle = load_add_on( psz_filename );
return( *handle < 0 );
-#elif defined(WIN32)
+#elif defined(WIN32) || defined(UNDER_CE)
*handle = LoadLibrary( psz_filename );
return( *handle == NULL );
#ifdef SYS_BEOS
unload_add_on( handle );
-#elif defined(WIN32)
+#elif defined(WIN32) || defined(UNDER_CE)
FreeLibrary( handle );
#else
return( NULL );
}
-#elif defined(WIN32)
+#elif defined(WIN32) || defined(UNDER_CE)
return( (void *)GetProcAddress( handle, psz_function ) );
#else
#if defined(SYS_BEOS)
return( "failed" );
-#elif defined(WIN32)
+#elif defined(WIN32) || defined(UNDER_CE)
int i, i_error = GetLastError();
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
* Functions are prototyped in mtime.h.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: mtime.c,v 1.34 2002/08/08 00:35:11 sam Exp $
+ * $Id: mtime.c,v 1.35 2002/11/11 14:39:12 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
# include <kernel/OS.h>
#endif
-#if defined( WIN32 )
+#if defined( WIN32 ) || defined( UNDER_CE )
# include <windows.h>
#else
# include <sys/time.h>
#if defined( HAVE_KERNEL_OS_H )
return( real_time_clock_usecs() );
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
/* We don't get the real date, just the value of a high precision timer.
* this is because the usual time functions have at best only a milisecond
* resolution */
}
snooze( delay );
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
mtime_t usec_time, delay;
usec_time = mdate();
#elif defined( ST_INIT_IN_ST_H )
st_usleep( delay );
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
Sleep( (int) (delay / 1000) );
#elif defined( HAVE_NANOSLEEP )
* netutils.c: various network functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: netutils.c,v 1.75 2002/11/10 18:04:24 sam Exp $
+ * $Id: netutils.c,v 1.76 2002/11/11 14:39:12 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr>
#endif
#if defined( UNDER_CE )
- /* No real network support */
+ /* No real network support (FIXME: use winsock1?) */
#elif defined( WIN32 )
# include <winsock2.h>
#else
* threads.c : threads implementation for the VideoLAN client
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: threads.c,v 1.25 2002/11/10 23:41:53 sam Exp $
+ * $Id: threads.c,v 1.26 2002/11/11 14:39:12 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#if defined( PTH_INIT_IN_PTH_H )
#elif defined( ST_INIT_IN_ST_H )
+#elif defined( UNDER_CE )
#elif defined( WIN32 )
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
static pthread_mutex_t once_mutex = PTHREAD_MUTEX_INITIALIZER;
while( i_status == VLC_THREADS_PENDING ) msleep( THREAD_SLEEP );
#elif defined( ST_INIT_IN_ST_H )
while( i_status == VLC_THREADS_PENDING ) msleep( THREAD_SLEEP );
+#elif defined( UNDER_CE )
+ while( i_status == VLC_THREADS_PENDING ) msleep( THREAD_SLEEP );
#elif defined( WIN32 )
while( i_status == VLC_THREADS_PENDING ) msleep( THREAD_SLEEP );
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
#elif defined( ST_INIT_IN_ST_H )
i_initializations--;
+#elif defined( UNDER_CE )
+ i_initializations--;
+
#elif defined( WIN32 )
i_initializations--;
/* Wrapper function for profiling */
static void * vlc_thread_wrapper ( void *p_wrapper );
-# ifdef WIN32
+# if defined( WIN32 ) && !defined( UNDER_CE )
# define ITIMER_REAL 1
# define ITIMER_PROF 2
};
int setitimer(int kind, const struct itimerval* itnew, struct itimerval* itold);
-# endif /* WIN32 */
+# endif /* WIN32 && !UNDER_CE */
typedef struct wrapper_t
{
p_mutex->mutex = st_mutex_new();
return ( p_mutex->mutex == NULL ) ? errno : 0;
+#elif defined( UNDER_CE )
+ InitializeCriticalSection( &p_mutex->csection );
+ return 0;
+
#elif defined( WIN32 )
/* We use mutexes on WinNT/2K/XP because we can use the SignalObjectAndWait
* function and have a 100% correct vlc_cond_wait() implementation.
* As this function is not available on Win9x, we can use the faster
* CriticalSections */
-# if !defined( UNDER_CE )
if( p_this->p_libvlc->SignalObjectAndWait &&
!p_this->p_libvlc->b_fast_mutex )
{
return ( p_mutex->mutex != NULL ? 0 : 1 );
}
else
-# endif
{
p_mutex->mutex = NULL;
InitializeCriticalSection( &p_mutex->csection );
#elif defined( ST_INIT_IN_ST_H )
i_result = st_mutex_destroy( p_mutex->mutex );
+#elif defined( UNDER_CE )
+ DeleteCriticalSection( &p_mutex->csection );
+ return 0;
+
#elif defined( WIN32 )
if( p_mutex->mutex )
{
p_condvar->cond = st_cond_new();
return ( p_condvar->cond == NULL ) ? errno : 0;
+#elif defined( UNDER_CE )
+ /* Initialize counter */
+ p_condvar->i_waiting_threads = 0;
+
+ /* Create an auto-reset event. */
+ p_condvar->event = CreateEvent( NULL, /* no security */
+ FALSE, /* auto-reset event */
+ FALSE, /* start non-signaled */
+ NULL ); /* unnamed */
+ return !p_condvar->event;
+
#elif defined( WIN32 )
/* Initialize counter */
p_condvar->i_waiting_threads = 0;
-# if !defined( UNDER_CE )
/* Misc init */
p_condvar->i_win9x_cv = p_this->p_libvlc->i_win9x_cv;
p_condvar->SignalObjectAndWait = p_this->p_libvlc->SignalObjectAndWait;
if( (p_condvar->SignalObjectAndWait && !p_this->p_libvlc->b_fast_mutex)
|| p_condvar->i_win9x_cv == 0 )
{
-# endif
/* Create an auto-reset event. */
p_condvar->event = CreateEvent( NULL, /* no security */
FALSE, /* auto-reset event */
p_condvar->semaphore = NULL;
return !p_condvar->event;
-# if !defined( UNDER_CE )
}
else
{
return !p_condvar->semaphore || !p_condvar->event;
}
-# endif
#elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
return pthread_cond_init( &p_condvar->cond, NULL );
#elif defined( ST_INIT_IN_ST_H )
i_result = st_cond_destroy( p_condvar->cond );
+#elif defined( UNDER_CE )
+ i_result = !CloseHandle( p_condvar->event );
+
#elif defined( WIN32 )
if( !p_condvar->semaphore )
i_result = !CloseHandle( p_condvar->event );
p_this->thread_id = st_thread_create( func, (void *)p_this, 1, 0 );
i_ret = 0;
-#elif defined( WIN32 )
+#elif defined( WIN32 ) || defined( UNDER_CE )
{
unsigned threadID;
/* When using the MSVCRT C library you have to use the _beginthreadex
#elif defined( ST_INIT_IN_ST_H )
i_ret = st_thread_join( p_this->thread_id, NULL );
+#elif defined( UNDER_CE )
+ WaitForSingleObject( p_this->thread_id, INFINITE );
+
#elif defined( WIN32 )
WaitForSingleObject( p_this->thread_id, INFINITE );
* stream_output.c : stream output module
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: stream_output.c,v 1.4 2002/11/10 18:04:24 sam Exp $
+ * $Id: stream_output.c,v 1.5 2002/11/11 14:39:12 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
{
psz_parser++;
}
-#ifdef WIN32
+#if defined( WIN32 ) || defined( UNDER_CE )
if( psz_parser - p_sout->psz_dest == 1 )
{
msg_Warn( p_sout, "drive letter %c: found in source string",