/** audio output buffer */
struct aout_buffer_t
{
- byte_t * p_buffer;
+ uint8_t * p_buffer;
int i_alloc_type;
/* i_size is the real size of the buffer (used for debug ONLY), i_nb_bytes
* is the number of significative bytes in it. */
aout_fifo_t fifo;
/* Mixer information */
- byte_t * p_first_byte_to_mix;
+ uint8_t * p_first_byte_to_mix;
audio_replay_gain_t replay_gain;
float f_multiplier;
typedef int32_t intptr_t;
#endif
-typedef uint8_t byte_t;
-
/* Systems that don't have stdint.h may not define INT64_MIN and
INT64_MAX */
#ifndef INT64_MIN
{
HANDLE hEvent;
struct SRB_ExecSCSICmd ssc;
- byte_t p_tocheader[ 4 ];
+ uint8_t p_tocheader[ 4 ];
/* Create the transfer completion event */
hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
if( pp_sectors )
{
int i, i_toclength;
- byte_t *p_fulltoc;
+ uint8_t *p_fulltoc;
i_toclength = 4 /* header */ + p_tocheader[0] +
((unsigned int)p_tocheader[1] << 8);
* ioctl_ReadSector: Read VCD or CDDA sectors
****************************************************************************/
int ioctl_ReadSectors( vlc_object_t *p_this, const vcddev_t *p_vcddev,
- int i_sector, byte_t * p_buffer, int i_nb, int i_type )
+ int i_sector, uint8_t *p_buffer, int i_nb, int i_type )
{
- byte_t *p_block;
+ uint8_t *p_block;
int i;
if( i_type == VCD_TYPE ) p_block = malloc( VCD_SECTOR_SIZE * i_nb );
void ioctl_Close ( vlc_object_t *, vcddev_t * );
int ioctl_GetTracksMap ( vlc_object_t *, const vcddev_t *, int ** );
int ioctl_ReadSectors ( vlc_object_t *, const vcddev_t *,
- int, byte_t *, int, int );
+ int, uint8_t *, int, int );
struct aout_filter_sys_t
{
size_t i_overflow_buffer_size;/* in bytes */
- byte_t * p_overflow_buffer;
+ uint8_t * p_overflow_buffer;
unsigned int i_nb_atomic_operations;
struct atomic_operation_t * p_atomic_operations;
};
struct filter_sys_t
{
size_t i_overflow_buffer_size;/* in bytes */
- byte_t * p_overflow_buffer;
+ uint8_t * p_overflow_buffer;
unsigned int i_nb_atomic_operations;
struct atomic_operation_t * p_atomic_operations;
};
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
float * p_in = (float*) p_in_buf->p_buffer;
- byte_t * p_out;
- byte_t * p_overflow;
- byte_t * p_slide;
+ uint8_t * p_out;
+ uint8_t * p_overflow;
+ uint8_t * p_slide;
size_t i_overflow_size; /* in bytes */
size_t i_out_size; /* in bytes */
int i_bitspersample;
size_t i_overflow_buffer_size;/* in bytes */
- byte_t * p_overflow_buffer;
+ uint8_t * p_overflow_buffer;
unsigned int i_nb_atomic_operations;
struct atomic_operation_t * p_atomic_operations;
};
int i_output_nb = aout_FormatNbChannels( &p_filter->output );
int16_t * p_in = (int16_t*) p_in_buf->p_buffer;
- byte_t * p_out;
- byte_t * p_overflow;
- byte_t * p_slide;
+ uint8_t * p_out;
+ uint8_t * p_overflow;
+ uint8_t * p_slide;
size_t i_overflow_size; /* in bytes */
size_t i_out_size; /* in bytes */
static const uint8_t p_sync_le[6] = { 0x72, 0xF8, 0x1F, 0x4E, 0x01, 0x00 };
static const uint8_t p_sync_be[6] = { 0xF8, 0x72, 0x4E, 0x1F, 0x00, 0x01 };
#ifndef HAVE_SWAB
- byte_t * p_tmp;
+ uint8_t * p_tmp;
uint16_t i;
#endif
uint16_t i_frame_size = p_in_buf->i_nb_bytes / 2;
- byte_t * p_in = p_in_buf->p_buffer;
- byte_t * p_out = p_out_buf->p_buffer;
+ uint8_t * p_in = p_in_buf->p_buffer;
+ uint8_t * p_out = p_out_buf->p_buffer;
/* Copy the S/PDIF headers. */
if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') )
for( i_frame = 0; i_frame < 3; i_frame++ )
{
uint16_t i_length_padded = i_length;
- byte_t * p_out = p_out_buf->p_buffer + (i_frame * i_fz);
- byte_t * p_in = p_filter->p_sys->p_buf + (i_frame * i_length);
+ uint8_t * p_out = p_out_buf->p_buffer + (i_frame * i_fz);
+ uint8_t * p_in = p_filter->p_sys->p_buf + (i_frame * i_length);
switch( p_in_buf->i_nb_samples )
{
swab( p_in, p_out + 8, i_length );
#else
uint16_t i;
- byte_t * p_tmp, tmp;
+ uint8_t * p_tmp, tmp;
p_tmp = p_out + 8;
for( i = i_length / 2 ; i-- ; )
{
p_in = p_swabbed + i - 1;
#else
- byte_t p_tmp[2];
+ uint8_t p_tmp[2];
p_in = (int16_t *)p_in_buf->p_buffer + i - 1;
#endif
while( i-- )
{
#ifndef HAVE_SWAB
- p_tmp[0] = ((byte_t *)p_in)[1];
- p_tmp[1] = ((byte_t *)p_in)[0];
+ p_tmp[0] = ((uint8_t *)p_in)[1];
+ p_tmp[1] = ((uint8_t *)p_in)[0];
*p_out = (float)( *(int16_t *)p_tmp ) / 32768.0;
#else
*p_out = (float)*p_in / 32768.0;
uint8_t * p_in = (uint8_t *)p_in_buf->p_buffer + (i - 1) * 3;
float * p_out = (float *)p_out_buf->p_buffer + i - 1;
- byte_t p_tmp[3];
+ uint8_t p_tmp[3];
while( i-- )
{
int i_nb_channels = aout_FormatNbChannels( &p_aout->mixer.mixer );
int i_nb_bytes = p_buffer->i_nb_samples * sizeof(int32_t)
* i_nb_channels;
- byte_t * p_in;
- byte_t * p_out;
+ uint8_t * p_in;
+ uint8_t * p_out;
while ( p_input->b_error )
{
*****************************************************************************
* This function writes a buffer of i_length bytes in the socket
*****************************************************************************/
-static void Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
+static void Play( aout_thread_t *p_aout, uint8_t *buffer, int i_size )
{
int i_amount;
{
aout_buffer_t * p_buffer = NULL;
int i_tmp, i_size;
- byte_t * p_bytes;
+ uint8_t * p_bytes;
if ( p_aout->output.output.i_format != VLC_FOURCC('s','p','d','i') )
{
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static void Play ( aout_instance_t * );
-static void SDLCallback ( void *, byte_t *, int );
+static void SDLCallback ( void *, uint8_t *, int );
/*****************************************************************************
* Module descriptor
/*****************************************************************************
* SDLCallback: what to do once SDL has played sound samples
*****************************************************************************/
-static void SDLCallback( void * _p_aout, byte_t * p_stream, int i_len )
+static void SDLCallback( void * _p_aout, uint8_t * p_stream, int i_len )
{
aout_instance_t * p_aout = (aout_instance_t *)_p_aout;
aout_buffer_t * p_buffer;
int i_buffer_size;
- byte_t *p_silence_buffer; /* buffer we use to play silence */
+ uint8_t *p_silence_buffer; /* buffer we use to play silence */
bool b_chan_reorder; /* do we need channel reordering */
int pi_chan_table[AOUT_CHAN_MAX];
static void CloseDecoder ( vlc_object_t * );
static void *DecodeBlock ( decoder_t *, block_t ** );
-static int SyncInfo ( const byte_t *, unsigned int *, unsigned int *,
+static int SyncInfo ( const uint8_t *, unsigned int *, unsigned int *,
unsigned int *, int * );
static uint8_t *GetOutBuffer ( decoder_t *, void ** );
* since we don't want to oblige S/PDIF people to use liba52 just to get
* their SyncInfo...
*****************************************************************************/
-static int SyncInfo( const byte_t * p_buf,
+static int SyncInfo( const uint8_t * p_buf,
unsigned int * pi_channels,
unsigned int * pi_channels_conf,
unsigned int * pi_sample_rate, int * pi_bit_rate )
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- const byte_t*p_peek;
+ const uint8_t *p_peek;
int i_peek = 0;
bool b_big_endian = 0; /* Arbitrary initialisation */
#else
int i;
- byte_t *p_tmp, tmp;
+ uint8_t *p_tmp, tmp;
p_tmp = p_block_in->p_buffer;
for( i = p_block_in->i_buffer / 2 ; i-- ; )
{
#define __EVEN( x ) ( (x)&0x01 ? (x)+1 : (x) )
-static vlc_fourcc_t GetFOURCC( const byte_t *p_buff )
+static vlc_fourcc_t GetFOURCC( const uint8_t *p_buff )
{
return VLC_FOURCC( p_buff[0], p_buff[1], p_buff[2], p_buff[3] );
}
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
int i_peek = 0;
/* Check if we are dealing with a WAV file */
{
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
uint8_t *p_streaminfo;
int i_streaminfo;
static int DemuxOpen( vlc_object_t * p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
int i_size;
/* Lets check the content to see if this is a NSC file */
{
demux_t *p_demux = (demux_t *)p_this;
int i_peek, i, b_found = false;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
i_peek = stream_Peek( p_demux->s, &p_peek, MAX_LINE );
&& !strcasecmp( psz_file + strlen( "VTS_00_0" ) , ".IFO" ) ) ) )
{
int i_peek;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
i_peek = stream_Peek( p_demux->s, &p_peek, 8 );
if( i_peek != 8 || memcmp( p_peek, "DVDVIDEO", 8 ) )
int E_(Import_SGIMB)( vlc_object_t * p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- const byte_t *p_peek;
+ const uint8_t *p_peek;
int i_size;
/* Lets check the content to see if this is a sgi mediabase file */
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys;
- const byte_t *p_peek, *p_peek_backup;
+ const uint8_t *p_peek, *p_peek_backup;
uint32_t i_dword;
dv_header_t dv_header;
int i_card;
int i_device;
- byte_t * p_silent_buffer;
+ uint8_t * p_silent_buffer;
};
#define DEFAULT_FRAME_SIZE 2048
{
aout_buffer_t * p_buffer;
int i_tmp, i_size;
- byte_t * p_bytes;
+ uint8_t * p_bytes;
if ( p_aout->output.output.i_format != VLC_FOURCC('s','p','d','i') )
{
static int vlclua_demux_read( lua_State *L )
{
demux_t *p_demux = (demux_t *)vlclua_get_this( L );
- byte_t *p_read;
+ uint8_t *p_read;
int n = luaL_checkint( L, 1 );
int i_read = stream_Read( p_demux->s, &p_read, n );
lua_pushlstring( L, (const char *)p_read, i_read );
{
stream_t * p_stream;
int n;
- byte_t *p_read;
+ uint8_t *p_read;
int i_read;
p_stream = (stream_t *)luaL_checklightuserdata( L, 1 );
n = luaL_checkint( L, 2 );
/****************************************************************************
* ADTS helpers
****************************************************************************/
-static int ADTSSyncInfo( decoder_t * p_dec, const byte_t * p_buf,
+static int ADTSSyncInfo( decoder_t * p_dec, const uint8_t * p_buf,
unsigned int * pi_channels,
unsigned int * pi_sample_rate,
unsigned int * pi_frame_length,
int i_width;
int i_height;
- byte_t* p_pixels;
+ uint8_t* p_pixels;
};
/*****************************************************************************
{
vout_sys_t *p_sys = p_vout->p_sys;
IDirectFBSurface *p_primary = (IDirectFBSurface *) p_vout->p_sys->p_primary;
- byte_t* p_pixels = NULL;
+ uint8_t* p_pixels = NULL;
picture_t *p_pic = NULL;
int i_rlength, i_glength, i_blength;
int i_roffset, i_goffset, i_boffset;
/* allocate p_pixels */
i_size = i_line_pitch * p_sys->i_height;
- p_sys->p_pixels = malloc( sizeof(byte_t) * i_size );
+ p_sys->p_pixels = malloc( i_size );
if( p_sys->p_pixels == NULL )
{
p_primary->Unlock(p_primary);
{
vout_sys_t *p_sys = p_vout->p_sys;
IDirectFBSurface *p_primary = (IDirectFBSurface *) p_sys->p_primary;
- byte_t* p_pixels = NULL;
+ uint8_t* p_pixels = NULL;
int i_size;
int i_line_pitch;
vlc_fourcc_t i_chroma;
/* Video memory */
- byte_t * p_video; /* base adress */
+ uint8_t * p_video; /* base adress */
size_t i_page_size; /* page size */
};
struct picture_sys_t
{
- byte_t * p_data; /* base adress */
+ uint8_t * p_data; /* base adress */
};
/*****************************************************************************
{
mga_vid_config_t mga;
int i_fd;
- byte_t * p_video;
+ uint8_t * p_video;
};
struct picture_sys_t
Display *p_display, EXTRA_ARGS,
int i_width, int i_height )
{
- byte_t * p_data; /* image data storage zone */
+ uint8_t * p_data; /* image data storage zone */
IMAGE_TYPE *p_image;
#ifdef MODULE_NAME_IS_x11
int i_quantum; /* XImage quantum (see below) */
i_height = ( i_height + 15 ) >> 4 << 4;
i_width = ( i_width + 15 ) >> 4 << 4;
- p_data = (byte_t *) malloc( i_width * i_height * i_bits_per_pixel / 8 );
+ p_data = malloc( i_width * i_height * i_bits_per_pixel / 8 );
#elif defined(MODULE_NAME_IS_x11)
i_bytes_per_line = i_width * i_bytes_per_pixel;
- p_data = (byte_t *) malloc( i_bytes_per_line * i_height );
+ p_data = malloc( i_bytes_per_line * i_height );
#endif
if( !p_data )
{
{ \
(p_new_buffer)->i_alloc_type = i_alloc_type; \
(p_new_buffer)->i_size = i_alloc_size; \
- (p_new_buffer)->p_buffer = (byte_t *)(p_new_buffer) \
+ (p_new_buffer)->p_buffer = (uint8_t *)(p_new_buffer) \
+ sizeof(aout_buffer_t); \
- (p_new_buffer)->b_discontinuity = false; \
+ (p_new_buffer)->b_discontinuity = false; \
if ( (p_previous_buffer) != NULL ) \
{ \
(p_new_buffer)->start_date = \
if( p_input->b_restart )
{
aout_fifo_t fifo, dummy_fifo;
- byte_t *p_first_byte_to_mix;
+ uint8_t *p_first_byte_to_mix;
vlc_mutex_lock( &p_aout->mixer_lock );