Commit bc061e84 authored by Sam Hocevar's avatar Sam Hocevar

* ./include/*, ./src/*: separated WIN32 #tests and UNDER_CE #tests, because

    WIN32 isn't always defined under WinCE, but might be. Grmbl.
  * ./include/*: changed a few u* and s* to uint*_t and int*_t.
parent 77c667f4
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -54,7 +54,7 @@ typedef struct aout_alloc_t
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 ) \
{ \
......@@ -278,7 +278,7 @@ VLC_EXPORT( int, aout_FormatNbChannels, ( audio_sample_format_t * p_format ) );
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 );
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -85,7 +85,7 @@ struct audio_sample_format_t
* 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)
......@@ -145,9 +145,9 @@ struct aout_buffer_t
*****************************************************************************/
struct audio_date_t
{
mtime_t date;
u32 i_divider;
u32 i_remainder;
mtime_t date;
uint32_t i_divider;
uint32_t i_remainder;
};
/*****************************************************************************
......@@ -157,11 +157,11 @@ struct audio_date_t
#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)
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -102,7 +102,7 @@ struct decoder_fifo_t
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;
......@@ -119,7 +119,7 @@ struct decoder_fifo_t
* 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
{
......@@ -196,12 +196,12 @@ struct bit_stream_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
......@@ -212,9 +212,9 @@ struct bit_stream_t
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 * ) );
......@@ -250,7 +250,8 @@ static inline void AlignWord( bit_stream_t * p_bit_stream )
/*****************************************************************************
* 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 )
{
......@@ -272,8 +273,8 @@ static inline u32 ShowBits( bit_stream_t * p_bit_stream, unsigned int 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 )
{
......@@ -318,7 +319,7 @@ static inline void RemoveBits( bit_stream_t * p_bit_stream,
* 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) )
......@@ -348,9 +349,10 @@ static inline void RemoveBits32( bit_stream_t * p_bit_stream )
* 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;
......@@ -385,12 +387,12 @@ static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int 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
......@@ -407,10 +409,10 @@ static inline s32 GetSignedBits( bit_stream_t * p_bit_stream,
/*****************************************************************************
* 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 )
{
......
......@@ -4,7 +4,7 @@
* 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>
*
......@@ -45,10 +45,10 @@
*****************************************************************************/
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
......@@ -93,12 +93,12 @@ struct es_descriptor_t
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 */
......@@ -208,7 +208,7 @@ struct input_info_category_t {
*****************************************************************************/
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
......@@ -228,7 +228,7 @@ struct stream_descriptor_t
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 */
......@@ -279,7 +279,7 @@ struct stream_position_t
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 */
};
......@@ -386,7 +386,7 @@ VLC_EXPORT( void, input_DumpStream, ( input_thread_t * ) );
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 * );
......
......@@ -3,7 +3,7 @@
* 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>
*
......@@ -40,14 +40,14 @@
*****************************************************************************/
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 * ) );
......
......@@ -4,7 +4,7 @@
* 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>
*
......@@ -62,7 +62,7 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
/*****************************************************************************
* Macros
*****************************************************************************/
#ifdef WIN32
#if defined( WIN32 ) && !defined( UNDER_CE )
# define CONSOLE_INTRO_MSG \
AllocConsole(); \
freopen( "CONOUT$", "w", stdout ); \
......
......@@ -2,7 +2,7 @@
* 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: Stphane Borel <stef@via.ecp.fr>
* Arnaud de Bossoreille de Ribou <bozo@via.ecp.fr>
......@@ -34,5 +34,5 @@ struct iso639_lang_t
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 ) );
......@@ -3,7 +3,7 @@
* 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>
*
......@@ -37,7 +37,7 @@ struct libvlc_t
vlc_bool_t b_ready;
/* CPU extensions */
u32 i_cpu;
uint32_t i_cpu;
/* Generic settings */
int i_verbose; /* info messages */
......@@ -83,7 +83,7 @@ struct vlc_t
/* 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
......
......@@ -26,14 +26,14 @@
*/
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 */
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -67,9 +67,9 @@ struct module_t
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? */
......
......@@ -9,7 +9,7 @@
* 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>
*
......@@ -36,7 +36,7 @@
* 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
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -30,7 +30,7 @@
# 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
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -34,7 +34,7 @@ struct variable_t
/* 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
......
......@@ -4,7 +4,7 @@
* 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>
*
......@@ -28,7 +28,7 @@
*****************************************************************************/
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 */
......@@ -55,7 +55,7 @@ struct picture_t
/* 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 */
......@@ -109,14 +109,17 @@ struct picture_heap_t
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
......@@ -191,9 +194,9 @@ struct subpicture_t
{
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
......
......@@ -5,7 +5,7 @@
* 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>
......@@ -68,7 +68,7 @@ struct vout_thread_t
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 */
......@@ -142,13 +142,13 @@ struct vout_thread_t
* 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 ) );
......
......@@ -3,7 +3,7 @@
* 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>
......@@ -74,7 +74,9 @@
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
......@@ -97,7 +99,7 @@ typedef int ptrdiff_t;
# endif
#endif
#if defined( WIN32 )
#if defined( WIN32 ) || defined( UNDER_CE )
typedef int ssize_t;
#endif
......@@ -272,7 +274,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
/*****************************************************************************
* OS-specific headers and thread types
*****************************************************************************/
#if defined( WIN32 )
#if defined( WIN32 ) || defined( UNDER_CE )
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
......@@ -334,7 +336,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
#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 */
......@@ -503,7 +505,7 @@ static inline uint64_t U64_AT( void * _p )
#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"
......@@ -517,16 +519,16 @@ static inline uint64_t U64_AT( void * _p )
# 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)
......
......@@ -50,7 +50,7 @@
/* 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"
......@@ -108,7 +108,7 @@
#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
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -21,5 +21,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
u32 CPUCapabilities( void );
uint32_t CPUCapabilities( void );
......@@ -3,7 +3,7 @@
* 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>
......@@ -39,12 +39,10 @@
#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>
......@@ -80,7 +78,7 @@
# 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
......@@ -126,7 +124,7 @@ typedef struct
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 *);
......
......@@ -3,7 +3,7 @@
* 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>
......@@ -76,6 +76,10 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
#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 )
{
......@@ -143,6 +147,10 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
#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 )
{
......@@ -224,6 +232,10 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
#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 )