From 88991a5ce9c2603bc5a9be0779353fe08b29e8f9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 25 Oct 2003 00:49:14 +0000 Subject: [PATCH] * include/vlc_common.h: + Removed u8, s8, u16 etc. for good. * ALL: + Replaced all occurrences of u8, s8, u16 etc. with uint8_t, int8_t, etc. --- include/vlc_common.h | 22 +- include/vlc_threads.h | 6 +- modules/access/dshow/dshow.cpp | 10 +- modules/access/dvd/access.c | 8 +- modules/access/dvd/es.c | 6 +- modules/access/dvd/ifo.c | 195 +++++----- modules/access/dvd/ifo.h | 354 +++++++++--------- modules/access/dvd/udf.h | 6 +- modules/access/dvdplay/es.c | 20 +- modules/access/v4l/v4l.c | 10 +- modules/audio_filter/channel_mixer/trivial.c | 16 +- modules/audio_filter/converter/fixed32tos16.c | 14 +- modules/audio_filter/converter/float32tos16.c | 10 +- modules/audio_filter/converter/float32tos8.c | 6 +- modules/audio_filter/converter/float32tou16.c | 6 +- modules/audio_filter/converter/float32tou8.c | 6 +- modules/audio_filter/converter/s16tofixed32.c | 8 +- modules/audio_filter/converter/s16tofloat32.c | 8 +- .../audio_filter/converter/s16tofloat32swab.c | 24 +- modules/audio_filter/converter/s8tofloat32.c | 4 +- modules/audio_filter/converter/u8tofixed32.c | 4 +- modules/audio_filter/converter/u8tofloat32.c | 4 +- modules/audio_mixer/trivial.c | 8 +- modules/audio_output/alsa.c | 4 +- modules/audio_output/file.c | 4 +- modules/audio_output/sdl.c | 10 +- modules/codec/araw.c | 6 +- modules/codec/cinepak.c | 120 +++--- modules/codec/ffmpeg/ffmpeg.c | 4 +- modules/codec/ffmpeg/ffmpeg.h | 24 +- .../ffmpeg/postprocessing/postprocessing.c | 34 +- .../ffmpeg/postprocessing/postprocessing.h | 12 +- modules/codec/libmpeg2.c | 18 +- modules/codec/spudec/render.c | 40 +- modules/codec/tarkin.c | 6 +- modules/codec/theora.c | 14 +- modules/demux/mpeg/system.c | 26 +- modules/demux/mpeg/system.h | 24 +- modules/demux/ogg.c | 20 +- modules/demux/util/id3.c | 14 +- modules/demux/util/id3tag.c | 32 +- modules/gui/beos/VideoOutput.cpp | 224 +++++------ modules/gui/beos/VideoWindow.h | 58 +-- modules/gui/qnx/vout.c | 5 +- modules/misc/dummy/decoder.c | 8 +- modules/misc/dummy/vout.c | 12 +- modules/video_chroma/i420_yuy2.c | 6 +- modules/video_output/aa.c | 7 +- modules/video_output/directx/vout.h | 6 +- modules/video_output/fb.c | 20 +- modules/video_output/ggi.c | 29 +- modules/video_output/glide.c | 12 +- modules/video_output/mga/mga.c | 48 +-- modules/video_output/sdl.c | 6 +- modules/video_output/x11/xcommon.h | 12 +- src/misc/beos_specific.cpp | 20 +- src/misc/threads.c | 4 +- 57 files changed, 815 insertions(+), 829 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index fc211bf8db..790f521152 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc_common.h,v 1.82 2003/10/24 21:27:06 gbazin Exp $ + * $Id: vlc_common.h,v 1.83 2003/10/25 00:49:13 sam Exp $ * * Authors: Samuel Hocevar * Vincent Seguin @@ -25,7 +25,7 @@ *****************************************************************************/ /** - * \file + * \file * This file is a collection of common definitions and types */ @@ -133,22 +133,6 @@ typedef uint16_t audio_volume_t; typedef int socklen_t; #endif -/***************************************************************************** - * Old types definitions - ***************************************************************************** - * We still provide these types because most of the VLC code uses them - * instead of the C9x types. They should be removed when the transition is - * complete (probably in 10 years). - *****************************************************************************/ -typedef uint8_t u8; -typedef int8_t s8; -typedef uint16_t u16; -typedef int16_t s16; -typedef uint32_t u32; -typedef int32_t s32; -typedef uint64_t u64; -typedef int64_t s64; - /***************************************************************************** * mtime_t: high precision date or time interval ***************************************************************************** @@ -803,7 +787,7 @@ VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) ); #endif # undef _ #if defined( __BORLANDC__ ) -#define _(String) vlc_dgettext (PACKAGE_TARNAME, String) +#define _(String) vlc_dgettext (PACKAGE_TARNAME, String) #else # define _(String) vlc_dgettext (PACKAGE, String) #endif diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 4bcabb1854..903deeee5f 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -3,7 +3,7 @@ * This header provides portable declarations for mutexes & conditions ***************************************************************************** * Copyright (C) 1999, 2002 VideoLAN - * $Id: vlc_threads.h,v 1.33 2003/08/28 17:19:42 sam Exp $ + * $Id: vlc_threads.h,v 1.34 2003/10/25 00:49:13 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -213,7 +213,7 @@ typedef thread_id vlc_thread_t; typedef struct { - int32 init; + int32_t init; sem_id lock; vlc_object_t * p_this; @@ -221,7 +221,7 @@ typedef struct typedef struct { - int32 init; + int32_t init; thread_id thread; vlc_object_t * p_this; diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index d36cd63555..57e00e03ec 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -2,7 +2,7 @@ * dshow.cpp : DirectShow access module for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: dshow.cpp,v 1.10 2003/10/18 20:09:23 gbazin Exp $ + * $Id: dshow.cpp,v 1.11 2003/10/25 00:49:13 sam Exp $ * * Author: Gildas Bazin * @@ -283,7 +283,7 @@ static int AccessOpen( vlc_object_t *p_this ) p_input->stream.p_selected_area->i_tell = 0; p_input->stream.i_method = INPUT_METHOD_FILE; vlc_mutex_unlock( &p_input->stream.stream_lock ); - + var_Create( p_input, "dshow-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT); var_Get( p_input, "dshow-caching", &val ); p_input->i_pts_delay = val.i_int * 1000; @@ -333,7 +333,7 @@ static int AccessOpen( vlc_object_t *p_this ) p_sys->p_graph->Release(); /* Uninitialize OLE/COM */ - CoUninitialize(); + CoUninitialize(); free( p_sys->p_header ); free( p_sys->pp_streams ); @@ -377,7 +377,7 @@ static void AccessClose( vlc_object_t *p_this ) p_sys->p_graph->Release(); /* Uninitialize OLE/COM */ - CoUninitialize(); + CoUninitialize(); free( p_sys->p_header ); for( int i = 0; i < p_sys->i_streams; i++ ) delete p_sys->pp_streams[i]; @@ -674,7 +674,7 @@ FindCaptureDevice( vlc_object_t *p_this, string *p_devicename, return NULL; } - /* If there are no enumerators for the requested type, then + /* If there are no enumerators for the requested type, then * CreateClassEnumerator will succeed, but p_class_enum will be NULL */ if( p_class_enum == NULL ) { diff --git a/modules/access/dvd/access.c b/modules/access/dvd/access.c index 0bf8dc147f..86228a19ff 100644 --- a/modules/access/dvd/access.c +++ b/modules/access/dvd/access.c @@ -8,7 +8,7 @@ * -udf.* to find files ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: access.c,v 1.13 2003/05/04 22:42:14 gbazin Exp $ + * $Id: access.c,v 1.14 2003/10/25 00:49:13 sam Exp $ * * Author: Stéphane Borel * @@ -400,9 +400,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) if( p_area != p_input->stream.p_selected_area ) { - int i_vts_title; - u32 i_first; - u32 i_last; + int i_vts_title; + uint32_t i_first; + uint32_t i_last; unsigned int i; /* Reset the Chapter position of the old title */ diff --git a/modules/access/dvd/es.c b/modules/access/dvd/es.c index 06bf34b84f..3d544442c3 100644 --- a/modules/access/dvd/es.c +++ b/modules/access/dvd/es.c @@ -1,7 +1,7 @@ /* es.c: functions to find and select ES ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: es.c,v 1.5 2003/05/05 22:23:32 gbazin Exp $ + * $Id: es.c,v 1.6 2003/10/25 00:49:13 sam Exp $ * * Author: Stéphane Borel * @@ -228,10 +228,10 @@ void DVDReadSPU( input_thread_t * p_input ) { ADDES( 0xbd, 0x20 + i_id, VLC_FOURCC('s','p','u','b'), SPU_ES, vts.manager_inf.p_spu_attr[i-1].i_lang_code, "", - sizeof(int) + 16*sizeof(u32) ); + sizeof(int) + 16*sizeof(uint32_t) ); *(int*)p_es->p_demux_data = 0xBeeF; memcpy( (char*)p_es->p_demux_data + sizeof(int), - palette, 16*sizeof(u32) ); + palette, 16*sizeof(uint32_t) ); } else { diff --git a/modules/access/dvd/ifo.c b/modules/access/dvd/ifo.c index b6a9cca943..278177aa1a 100644 --- a/modules/access/dvd/ifo.c +++ b/modules/access/dvd/ifo.c @@ -2,7 +2,7 @@ * ifo.c: Functions for ifo parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ifo.c,v 1.5 2003/03/03 14:21:08 gbazin Exp $ + * $Id: ifo.c,v 1.6 2003/10/25 00:49:13 sam Exp $ * * Authors: Stéphane Borel * German Tischler @@ -68,13 +68,13 @@ static int ReadCellInf ( ifo_t * , cell_inf_t *, int ); static int FreeCellInf ( cell_inf_t * ); static int FreeTitleSet ( vts_t * ); -static u8* FillBuffer ( ifo_t *, u8 *, int ); -static u8 ReadByte ( ifo_t *, u8 *, u8 ** ); -static void ReadBytes ( ifo_t *, u8 *, u8 **, u8 *, int ); -static void DumpBytes ( ifo_t *, u8 *, u8 **, int ); -static u16 ReadWord ( ifo_t *, u8 *, u8 ** ); -static u32 ReadDouble ( ifo_t *, u8 *, u8 ** ); -static u64 ReadQuad ( ifo_t *, u8 *, u8 ** ); +static uint8_t* FillBuffer ( ifo_t *, uint8_t *, int ); +static uint8_t ReadByte ( ifo_t *, uint8_t *, uint8_t ** ); +static void ReadBytes ( ifo_t *, uint8_t *, uint8_t **, uint8_t *, int ); +static void DumpBytes ( ifo_t *, uint8_t *, uint8_t **, int ); +static uint16_t ReadWord ( ifo_t *, uint8_t *, uint8_t ** ); +static uint32_t ReadDouble ( ifo_t *, uint8_t *, uint8_t ** ); +static uint64_t ReadQuad ( ifo_t *, uint8_t *, uint8_t ** ); /* * IFO Management. @@ -105,9 +105,9 @@ int IfoCreate( thread_dvd_data_t * p_dvd ) *****************************************************************************/ int IfoInit( ifo_t * p_ifo ) { - u8 p_buf[DVD_LB_SIZE]; - u8* p_tmp; - u64 i_temp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; + uint64_t i_temp; int i, j, k; int i_start; @@ -168,7 +168,7 @@ int IfoInit( ifo_t * p_ifo ) for( i = 0 ; i < MGINF.i_spu_nb ; i++ ) { - ReadBytes( p_ifo, p_buf, &p_tmp, (u8*)(&i_temp), 6 ); + ReadBytes( p_ifo, p_buf, &p_tmp, (uint8_t*)(&i_temp), 6 ); /* FIXME : take care of endianness */ } @@ -192,19 +192,19 @@ int IfoInit( ifo_t * p_ifo ) p_tmp = FillBuffer( p_ifo, p_buf, p_ifo->i_start + MGINF.i_title_inf_start_sector ); /*fprintf( stderr, "title inf %d\n", p_ifo->i_pos ); */ - + TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp ); /*fprintf( stderr, "title_inf: TTU nb %d\n", TITINF.i_title_nb ); */ DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); - + /* parsing of title attributes */ TITINF.p_attr = malloc( TITINF.i_title_nb *sizeof(title_attr_t) ); if( TITINF.p_attr == NULL ) { return -1; } - + for( i = 0 ; i < TITINF.i_title_nb ; i++ ) { TITINF.p_attr[i].i_play_type = ReadByte( p_ifo, p_buf, &p_tmp ); @@ -246,11 +246,11 @@ int IfoInit( ifo_t * p_ifo ) i_start = p_ifo->i_pos; /*fprintf( stderr, "PTL\n" ); */ - + PARINF.i_country_nb = ReadWord( p_ifo, p_buf, &p_tmp ); PARINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp ); PARINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); - + PARINF.p_parental_desc = malloc( PARINF.i_country_nb * sizeof(parental_desc_t) ); if( PARINF.p_parental_desc == NULL ) @@ -284,7 +284,7 @@ int IfoInit( ifo_t * p_ifo ) for( j = 0 ; j < 8 ; j++ ) { PARINF.p_parental_mask[i].ppi_mask[j] = - malloc( ( PARINF.i_vts_nb + 1 ) * sizeof(u16) ); + malloc( ( PARINF.i_vts_nb + 1 ) * sizeof(uint16_t) ); if( PARINF.p_parental_mask[i].ppi_mask[j] == NULL ) { @@ -307,20 +307,20 @@ int IfoInit( ifo_t * p_ifo ) #define VTSINF p_ifo->vmg.vts_inf if( MGINF.i_vts_inf_start_sector ) { - u64 i_temp; + uint64_t i_temp; p_tmp = FillBuffer( p_ifo, p_buf, p_ifo->i_start + MGINF.i_vts_inf_start_sector ); i_start = p_ifo->i_pos; - + /*fprintf( stderr, "VTS ATTR\n" ); */ - + VTSINF.i_vts_nb = ReadWord( p_ifo, p_buf, &p_tmp );; /*fprintf( stderr, "VTS ATTR Nb: %d\n", VTSINF.i_vts_nb ); */ DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); VTSINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); VTSINF.pi_vts_attr_start_byte = - malloc( VTSINF.i_vts_nb * sizeof(u32) ); + malloc( VTSINF.i_vts_nb * sizeof(uint32_t) ); if( VTSINF.pi_vts_attr_start_byte == NULL ) { return -1; @@ -367,7 +367,7 @@ int IfoInit( ifo_t * p_ifo ) for( j = 0 ; j < 28 ; j++ ) { /* FIXME : Fix endianness issue here */ - ReadBytes( p_ifo, p_buf, &p_tmp, (u8*)(&i_temp), 6 ); + ReadBytes( p_ifo, p_buf, &p_tmp, (uint8_t*)(&i_temp), 6 ); } DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); @@ -390,7 +390,7 @@ int IfoInit( ifo_t * p_ifo ) for( j = 0 ; j < 28 /*VTSINF.p_vts_vts_inf[i].i_vtstt_subpic_nb*/ ; j++ ) { /* FIXME : Fix endianness issue here */ - ReadBytes( p_ifo, p_buf, &p_tmp, (u8*)(&i_temp), 6 ); + ReadBytes( p_ifo, p_buf, &p_tmp, (uint8_t*)(&i_temp), 6 ); } } } @@ -431,12 +431,12 @@ int IfoInit( ifo_t * p_ifo ) *****************************************************************************/ int IfoTitleSet( ifo_t * p_ifo, int i_title ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i_off; int i_start; - u64 i_temp; - u16 i_short; + uint64_t i_temp; + uint16_t i_short; int i, j; if( p_ifo->vts.b_initialized ) @@ -497,7 +497,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) for( i = 0 ; i < 28 ; i++ ) { /* FIXME : take care of endianness */ - ReadBytes( p_ifo, p_buf, &p_tmp, (u8*)(&i_temp), 6 ); + ReadBytes( p_ifo, p_buf, &p_tmp, (uint8_t*)(&i_temp), 6 ); } DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); @@ -562,7 +562,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) for( i=0 ; i> 16; /*fprintf( stderr, "Subpic %d: "I64Fx"\n", i, i_temp ); */ MGINF.p_spu_attr[i].i_caption = i_temp & 0xff; @@ -584,15 +584,15 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) MGINF.i_title_inf_start_sector ); i_start = p_ifo->i_pos; - + /*fprintf( stderr, "VTS PTR\n" ); */ - + TITINF.i_title_nb = ReadWord( p_ifo, p_buf, &p_tmp ); /*fprintf( stderr, "VTS title_inf nb: %d\n", TITINF.i_title_nb ); */ DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); TITINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); - TITINF.pi_start_byte = malloc( TITINF.i_title_nb * sizeof(u32) ); + TITINF.pi_start_byte = malloc( TITINF.i_title_nb * sizeof(uint32_t) ); if( TITINF.pi_start_byte == NULL ) { return -1; @@ -655,7 +655,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) #define TIMINF p_ifo->vts.time_inf if( MGINF.i_time_inf_start_sector ) { - u8 p_buf[DVD_LB_SIZE]; + uint8_t p_buf[DVD_LB_SIZE]; p_tmp = FillBuffer( p_ifo, p_buf, p_ifo->vts.i_pos + MGINF.i_time_inf_start_sector ); @@ -666,14 +666,14 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) DumpBytes( p_ifo, p_buf, &p_tmp, 2 ); TIMINF.i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); - TIMINF.pi_start_byte = malloc( TIMINF.i_nb * sizeof(u32) ); + TIMINF.pi_start_byte = malloc( TIMINF.i_nb * sizeof(uint32_t) ); if( TIMINF.pi_start_byte == NULL ) { return -1; } for( i = 0 ; i < TIMINF.i_nb ; i++ ) - { + { TIMINF.pi_start_byte[i] = ReadDouble( p_ifo, p_buf, &p_tmp ); } @@ -684,7 +684,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) } for( i = 0 ; i < TIMINF.i_nb ; i++ ) - { + { TIMINF.p_time_map[i].i_time_unit = ReadByte( p_ifo, p_buf, &p_tmp ); DumpBytes( p_ifo, p_buf, &p_tmp, 1 ); TIMINF.p_time_map[i].i_entry_nb = ReadWord( p_ifo, p_buf, &p_tmp ); @@ -692,7 +692,7 @@ int IfoTitleSet( ifo_t * p_ifo, int i_title ) if( TIMINF.p_time_map[i].i_entry_nb ) { TIMINF.p_time_map[i].pi_sector = - malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(u32) ); + malloc( TIMINF.p_time_map[i].i_entry_nb * sizeof(uint32_t) ); if( TIMINF.p_time_map[i].pi_sector == NULL ) { return -1; @@ -805,7 +805,7 @@ static int FreeTitleSet( vts_t * p_vts ) } p_vts->b_initialized = 0; - + return 0; } @@ -882,11 +882,11 @@ void IfoDestroy( ifo_t * p_ifo ) *****************************************************************************/ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i_start; - u16 i_audio; - u32 i_spu; + uint16_t i_audio; + uint32_t i_spu; int i; p_tmp = FillBuffer( p_ifo, p_buf, i_block ) + i_bytes; @@ -1032,10 +1032,10 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes p_ifo->i_pos = dvdcss_seek( p_ifo->dvdhandle, OFF2LB( i_start + p_title->i_chapter_map_start_byte ), DVDCSS_NOFLAGS ); - + p_title->chapter_map.pi_start_cell = malloc( p_title->i_chapter_nb * sizeof(chapter_map_t) ); - + if( p_title->chapter_map.pi_start_cell == NULL ) { return -1; @@ -1046,7 +1046,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes } else { - p_title->chapter_map.pi_start_cell = NULL; + p_title->chapter_map.pi_start_cell = NULL; } /* parsing of cell_play_t */ @@ -1058,7 +1058,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes p_title->p_cell_play = malloc( p_title->i_cell_nb * sizeof(cell_play_t) ); - + if( p_title->p_cell_play == NULL ) { return -1; @@ -1100,7 +1100,7 @@ static int ReadTitle( ifo_t * p_ifo, title_t * p_title, int i_block, int i_bytes DumpBytes( p_ifo, p_buf, &p_tmp, 1 ); p_title->p_cell_pos[i].i_cell_id = ReadByte( p_ifo, p_buf, &p_tmp ); } - } + } return 0; } @@ -1152,8 +1152,8 @@ static int FreeTitle( title_t * p_title ) static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf, int i_block, int i_bytes ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i_start; int i; @@ -1198,18 +1198,18 @@ static int ReadUnitInf( ifo_t * p_ifo, unit_inf_t * p_unit_inf, /***************************************************************************** * FreeUnitInf : frees a structure allocated by ReadUnit - *****************************************************************************/ + *****************************************************************************/ static int FreeUnitInf( unit_inf_t * p_unit_inf ) { int i; - + if( p_unit_inf->p_title != NULL ) { for( i = 0 ; i < p_unit_inf->i_title_nb ; i++ ) { FreeTitle( &p_unit_inf->p_title[i].title ); } - + free( p_unit_inf->p_title ); } @@ -1223,8 +1223,8 @@ static int FreeUnitInf( unit_inf_t * p_unit_inf ) static int ReadTitleUnit( ifo_t * p_ifo, title_unit_t * p_title_unit, int i_block ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i; int i_start; @@ -1298,8 +1298,8 @@ static int FreeTitleUnit( title_unit_t * p_title_unit ) *****************************************************************************/ static int ReadCellInf( ifo_t * p_ifo, cell_inf_t * p_cell_inf, int i_block ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i_start; int i; @@ -1329,11 +1329,11 @@ static int ReadCellInf( ifo_t * p_ifo, cell_inf_t * p_cell_inf, int i_block ) MAP.i_cell_id = ReadByte( p_ifo, p_buf, &p_tmp ); DumpBytes( p_ifo, p_buf, &p_tmp, 1 ); MAP.i_first_sector = ReadDouble( p_ifo, p_buf, &p_tmp ); -/* fprintf(stderr, "sector[%d] %d (%d)\n", i,ntohl(*(u32*)(p_tmp)), p_ifo->i_pos);*/ +/* fprintf(stderr, "sector[%d] %d (%d)\n", i,ntohl(*(uint32_t*)(p_tmp)), p_ifo->i_pos);*/ MAP.i_last_sector = ReadDouble( p_ifo, p_buf, &p_tmp ); #undef MAP } - + return 0; } @@ -1352,20 +1352,20 @@ static int FreeCellInf( cell_inf_t * p_cell_inf ) *****************************************************************************/ static int ReadVobuMap( ifo_t * p_ifo, vobu_map_t * p_vobu_map, int i_block ) { - u8 p_buf[DVD_LB_SIZE]; - u8 * p_tmp; + uint8_t p_buf[DVD_LB_SIZE]; + uint8_t * p_tmp; int i_start; int i, i_max; - + p_tmp = FillBuffer( p_ifo, p_buf, i_block ); i_start = p_ifo->i_pos; /*fprintf( stderr, "VOBU ADMAP\n" ); */ p_vobu_map->i_last_byte = ReadDouble( p_ifo, p_buf, &p_tmp ); i_max = ( i_start + p_vobu_map->i_last_byte + 1 - p_ifo->i_pos ) - / sizeof(u32); + / sizeof(uint32_t); - p_vobu_map->pi_vobu_start_sector = malloc( i_max * sizeof(u32) ); + p_vobu_map->pi_vobu_start_sector = malloc( i_max * sizeof(uint32_t) ); if( p_vobu_map->pi_vobu_start_sector == NULL ) { return -1; @@ -1431,7 +1431,7 @@ static char * IfoMath( char val ) static char math_op[][10] = { "none", - "=", + "=", "<->", /* swap */ "+=", "-=", @@ -1493,7 +1493,7 @@ char * IfoMenuName( char index ) return ifo_menu_id[index&0x07]; } -static void IfoRegister( u16 i_data, u8 i_direct) +static void IfoRegister( uint16_t i_data, uint8_t i_direct) { if( i_direct ) { @@ -1537,9 +1537,8 @@ static void IfoRegister( u16 i_data, u8 i_direct) } } -static void IfoAdvanced( u8 *pi_code ) -{ - u8 i_cmd = pi_code[0]; +static void IfoAdvanced( uint8_t *pi_code ){ + uint8_t i_cmd = pi_code[0]; printf(" { "); @@ -1614,7 +1613,7 @@ static void IfoJmp( ifo_command_t com ) { case 0x00: printf( "to play first PGC" ); - break; + break; case 0x01: printf( "to VMG title menu (?)" ); break; @@ -1623,7 +1622,7 @@ static void IfoJmp( ifo_command_t com ) OP_VAL_8(2), OP_VAL_8(1), IfoMenuName( OP_VAL_8(3)&0xF ) ); - break; + break; case 0x03: printf( "vmg pgc 0x%04x (?)", ( OP_VAL_8(0)<<8) | OP_VAL_8(1) ); break; @@ -1657,7 +1656,7 @@ static void IfoJmp( ifo_command_t com ) /* it is processed BEFORE switch */ /* under some conditions, it is ignored */ /* I don't understand exactly what it means */ - printf( " ( spec cell 0x%02X ) ", OP_VAL_8(2) ); + printf( " ( spec cell 0x%02X ) ", OP_VAL_8(2) ); switch( OP_VAL_8(3)>>6 ) { @@ -1670,11 +1669,11 @@ static void IfoJmp( ifo_command_t com ) case 2: printf( "to VTS menu \"%s\" (?)", IfoMenuName(OP_VAL_8(3)&0xF) ); - break; + break; case 3: printf( "vmg pgc 0x%02x (?)", (OP_VAL_8(0)<<8)|OP_VAL_8(1) ); break; - } + } #endif break; } @@ -1682,7 +1681,7 @@ static void IfoJmp( ifo_command_t com ) static void IfoLnk( ifo_command_t com ) { - u16 i_button=OP_VAL_8(4)>>2; + uint16_t i_button = OP_VAL_8(4)>>2; printf ("lnk to "); @@ -1694,11 +1693,11 @@ static void IfoLnk( ifo_command_t com ) case 0x04: printf( "PGC 0x%02x", OP_VAL_16(2) ); - break; + break; case 0x05: printf( "PTT 0x%02x", OP_VAL_16(2) ); - break; + break; case 0x06: printf( "Program 0x%02x this PGC", OP_VAL_8(5) ); @@ -1715,7 +1714,7 @@ static void IfoLnk( ifo_command_t com ) { printf( ", Highlight 0x%02x", OP_VAL_8(4)>>2 ); } - + } void IfoSetSystem( ifo_command_t com ) @@ -1769,7 +1768,7 @@ void IfoSetSystem( ifo_command_t com ) printf( "s[%s] = r[0x%02x]", ifo_reg[9], OP_VAL_8(1)&0x0f ); } - printf( "s[%s] = (s[%s]&0x7FFF)|0x%02x", + printf( "s[%s] = (s[%s]&0x7FFF)|0x%02x", ifo_reg[10], ifo_reg[10], OP_VAL_16(1)&0x8000); break; case 3: @@ -1825,7 +1824,7 @@ static void IfoSet( ifo_command_t com ) *****************************************************************************/ void CommandRead( ifo_command_t com ) { - u8* pi_code = (u8*)(&com); + uint8_t * pi_code = (uint8_t*)(&com); switch( com.i_type ) { @@ -1845,24 +1844,24 @@ void CommandRead( ifo_command_t com ) IfoRegister (OP_VAL_16(1), com.i_dir_cmp); printf (") "); } - + /* Sub command */ switch( com.i_sub_cmd ) { case 1: printf( "goto Line 0x%02x", OP_VAL_16(2) ); break; - + case 2: printf( "stop VM" ); break; - + case 3: printf( "Set Parental Level To %s and goto Line 0x%02x", ifo_parental[OP_VAL_8(4)&0x7], OP_VAL_8(5) ); break; - + default: printf( "Illegal" ); break; @@ -1893,7 +1892,7 @@ void CommandRead( ifo_command_t com ) IfoJmp( com ); } else - { + { if( com.i_cmp ) { printf( "if (r[0x%02x] %s ", OP_VAL_8(1)&0x0f, @@ -1960,7 +1959,7 @@ void CommandRead( ifo_command_t com ) } break; - /* + /* * math command on r[opcode[1]] and * direct?be2me_16(OP_VAL_8(0)):reg[OP_VAL_8(1)] is executed * ( unless command is swap; then r[opcode[1]] and r[OP_VAL_8(1)] @@ -2072,7 +2071,7 @@ void CommandPrint( ifo_t ifo ) /***************************************************************************** * ReadByte and so *****************************************************************************/ -static u8* FillBuffer( ifo_t* p_ifo, u8* p_buf, int i_pos ) +static uint8_t* FillBuffer( ifo_t* p_ifo, uint8_t* p_buf, int i_pos ) { p_ifo->i_pos = dvdcss_seek( p_ifo->dvdhandle, i_pos, DVDCSS_NOFLAGS ); dvdcss_read( p_ifo->dvdhandle, p_buf, 1, DVDCSS_NOFLAGS ); @@ -2080,8 +2079,8 @@ static u8* FillBuffer( ifo_t* p_ifo, u8* p_buf, int i_pos ) return p_buf; } -static void ReadBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, - u8* pi_dest, int i_nb ) +static void ReadBytes( ifo_t* p_ifo, uint8_t* p_buf, uint8_t** pp_tmp, + uint8_t* pi_dest, int i_nb ) { if( i_nb > DVD_LB_SIZE ) { @@ -2109,7 +2108,7 @@ static void ReadBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, return; } -static void DumpBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, int i_nb ) +static void DumpBytes( ifo_t* p_ifo, uint8_t* p_buf, uint8_t** pp_tmp, int i_nb ) { if( i_nb > DVD_LB_SIZE ) { @@ -2137,30 +2136,30 @@ static void DumpBytes( ifo_t* p_ifo, u8* p_buf, u8** pp_tmp, int i_nb ) } \ i_ret <<= 8; i_ret |= **pp_tmp; (*pp_tmp)++; -static u8 ReadByte( ifo_t * p_ifo, u8* p_buf, u8** pp_tmp ) +static uint8_t ReadByte( ifo_t * p_ifo, uint8_t* p_buf, uint8_t** pp_tmp ) { - u8 i_ret = 0; + uint8_t i_ret = 0; ADDBYTE; return i_ret; } -static u16 ReadWord( ifo_t * p_ifo, u8* p_buf, u8** pp_tmp ) +static uint16_t ReadWord( ifo_t * p_ifo, uint8_t* p_buf, uint8_t** pp_tmp ) { - u16 i_ret = 0; + uint16_t i_ret = 0; ADDBYTE; ADDBYTE; return i_ret; } -static u32 ReadDouble( ifo_t * p_ifo, u8* p_buf, u8** pp_tmp ) +static uint32_t ReadDouble( ifo_t * p_ifo, uint8_t* p_buf, uint8_t** pp_tmp ) { - u32 i_ret = 0; + uint32_t i_ret = 0; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; return i_ret; } -static u64 ReadQuad( ifo_t * p_ifo, u8* p_buf, u8** pp_tmp ) +static uint64_t ReadQuad( ifo_t * p_ifo, uint8_t* p_buf, uint8_t** pp_tmp ) { - u64 i_ret = 0; + uint64_t i_ret = 0; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; ADDBYTE; return i_ret; } diff --git a/modules/access/dvd/ifo.h b/modules/access/dvd/ifo.h index 015f273d43..5ac0ccb782 100644 --- a/modules/access/dvd/ifo.h +++ b/modules/access/dvd/ifo.h @@ -2,7 +2,7 @@ * dvd_ifo.h: Structures for ifo parsing ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ifo.h,v 1.3 2002/08/08 22:28:22 sam Exp $ + * $Id: ifo.h,v 1.4 2003/10/25 00:49:13 sam Exp $ * * Author: Stéphane Borel * @@ -10,7 +10,7 @@ * - libifo by Thomas Mirlacher * - IFO structure documentation by Thomas Mirlacher, Björn Englund, * Håkan Hjort - * + * * 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 * the Free Software Foundation; either version 2 of the License, or @@ -35,60 +35,60 @@ */ typedef struct ifo_video_s { - u8 i_compression ;/* 2; */ - u8 i_system ;/* 2; */ - u8 i_ratio ;/* 2; */ - u8 i_perm_displ ;/* 2; */ + uint8_t i_compression ;/* 2; */ + uint8_t i_system ;/* 2; */ + uint8_t i_ratio ;/* 2; */ + uint8_t i_perm_displ ;/* 2; */ - u8 i_line21_1 ;/* 1; */ - u8 i_line21_2 ;/* 1; */ - u8 i_source_res ;/* 2; */ - u8 i_letterboxed ;/* 1; */ - u8 i_mode ;/* 1; */ + uint8_t i_line21_1 ;/* 1; */ + uint8_t i_line21_2 ;/* 1; */ + uint8_t i_source_res ;/* 2; */ + uint8_t i_letterboxed ;/* 1; */ + uint8_t i_mode ;/* 1; */ } ifo_video_t; /* Audio type information */ typedef struct ifo_audio_s { - u8 i_coding_mode ;/* 3; */ - u8 i_multichannel_extension ;/* 1; */ - u8 i_type ;/* 2; */ - u8 i_appl_mode ;/* 2; */ - - u8 i_quantization ;/* 2; */ - u8 i_sample_freq ;/* 2; */ - u8 i_test ;/* 1; */ - u8 i_num_channels ;/* 3; */ - u16 i_lang_code ;/* 16; // description */ - u8 i_foo ;/* 8; // 0x00000000 ? */ - u8 i_caption ;/* 8; */ - u8 i_bar ;/* 8; // 0x00000000 ? */ + uint8_t i_coding_mode ;/* 3; */ + uint8_t i_multichannel_extension ;/* 1; */ + uint8_t i_type ;/* 2; */ + uint8_t i_appl_mode ;/* 2; */ + + uint8_t i_quantization ;/* 2; */ + uint8_t i_sample_freq ;/* 2; */ + uint8_t i_test ;/* 1; */ + uint8_t i_num_channels ;/* 3; */ + uint16_t i_lang_code ;/* 16; // description */ + uint8_t i_foo ;/* 8; // 0x00000000 ? */ + uint8_t i_caption ;/* 8; */ + uint8_t i_bar ;/* 8; // 0x00000000 ? */ } ifo_audio_t; /* Audio Status */ typedef struct audio_status_s { - u8 i_available; /* 1 */ - u8 i_position; /* 7 */ - u8 i_foo; /* 8 */ + uint8_t i_available; /* 1 */ + uint8_t i_position; /* 7 */ + uint8_t i_foo; /* 8 */ } audio_status_t; typedef struct ifo_spu_t { - u16 i_prefix ;/* 16; // 0x0100 ? */ - u16 i_lang_code ;/* 16; // description */ - u8 i_foo ;/* 8; // dont know */ - u8 i_caption ;/* 8; // 0x00 ? */ + uint16_t i_prefix ;/* 16; // 0x0100 ? */ + uint16_t i_lang_code ;/* 16; // description */ + uint8_t i_foo ;/* 8; // dont know */ + uint8_t i_caption ;/* 8; // 0x00 ? */ } ifo_spu_t; /* Subpicture status */ typedef struct spu_status_s { - u8 i_available; /*1*/ - u8 i_position_43; /*7*/ - u8 i_position_wide; /*8*/ - u8 i_position_letter; /*8*/ - u8 i_position_pan; /*8*/ + uint8_t i_available; /*1*/ + uint8_t i_position_43; /*7*/ + uint8_t i_position_wide; /*8*/ + uint8_t i_position_letter; /*8*/ + uint8_t i_position_pan; /*8*/ } spu_status_t; @@ -103,8 +103,8 @@ typedef struct command_desc_s unsigned int i_sub_cmd :4; union { - u8 pi_8[6]; - u16 pi_16[3]; + uint8_t pi_8[6]; + uint16_t pi_16[3]; } data; } command_desc_t; @@ -112,13 +112,13 @@ typedef struct command_desc_s - start at i_pgc_com_tab_sbyte */ typedef struct command_s { - u16 i_pre_command_nb; /* 2 bytes */ - u16 i_post_command_nb; /* 2 bytes */ - u16 i_cell_command_nb; /* 2 bytes */ + uint16_t i_pre_command_nb; /* 2 bytes */ + uint16_t i_post_command_nb; /* 2 bytes */ + uint16_t i_cell_command_nb; /* 2 bytes */ /* char[2] ??? */ - u64* p_pre_command; /* i_pre_com_nb * 8 bytes */ - u64* p_post_command; /* i_post_com_nb * 8 bytes */ - u64* p_cell_command; /* i_pre_com_nb * 8 bytes */ + uint64_t * p_pre_command; /* i_pre_com_nb * 8 bytes */ + uint64_t * p_post_command; /* i_post_com_nb * 8 bytes */ + uint64_t * p_cell_command; /* i_pre_com_nb * 8 bytes */ /* command_desc_t* p_cell_command; // i_cell_com_nb * 8 bytes */ /* command_desc_t* p_post_command; // i_post_com_nb * 8 bytes */ @@ -129,34 +129,34 @@ typedef struct command_s * - start at "i_pgc_prg_map_sbyte" */ typedef struct chapter_map_s { - u8* pi_start_cell; /* i_prg_nb * 1 byte */ + uint8_t * pi_start_cell; /* i_prg_nb * 1 byte */ } chapter_map_t; /* Cell Playback Information Table - * we have a pointer to such a structure for each cell + * we have a pointer to such a structure for each cell * - first start at "i_cell_play_inf_sbyte" */ typedef struct cell_play_s { /* This information concerns the currently selected cell */ - u16 i_category; /* 2 bytes */ - u8 i_still_time; /* 1 byte; in seconds; ff=inf */ - u8 i_command_nb; /* 1 byte; 0 = no com */ - u32 i_play_time; /* 4 bytes */ - u32 i_first_sector; /* 4 bytes */ - u32 i_first_ilvu_vobu_esector; /* 4 bytes; ??? */ - u32 i_last_vobu_start_sector; /* 4 bytes */ - u32 i_last_sector; /* 4 bytes */ + uint16_t i_category; /* 2 bytes */ + uint8_t i_still_time; /* 1 byte; in seconds; ff=inf */ + uint8_t i_command_nb; /* 1 byte; 0 = no com */ + uint32_t i_play_time; /* 4 bytes */ + uint32_t i_first_sector; /* 4 bytes */ + uint32_t i_first_ilvu_vobu_esector; /* 4 bytes; ??? */ + uint32_t i_last_vobu_start_sector; /* 4 bytes */ + uint32_t i_last_sector; /* 4 bytes */ } cell_play_t; /* Cell Position Information Table - * we have a pointer to such a structure for each cell + * we have a pointer to such a structure for each cell * - first start at "i_cell_pos_inf_sbyte" */ typedef struct cell_pos_s { /* This information concerns the currently selected cell */ - u16 i_vob_id; /* 2 bytes */ + uint16_t i_vob_id; /* 2 bytes */ /* char ??? */ - u8 i_cell_id; /* 1 byte */ + uint8_t i_cell_id; /* 1 byte */ } cell_pos_t; /* Main structure for Program Chain @@ -166,25 +166,25 @@ typedef struct title_s { /* Global features of program chain */ /* char[2] ??? */ - u8 i_chapter_nb; /* 1 byte */ - u8 i_cell_nb; /* 1 byte */ - u32 i_play_time; /* 4 bytes */ - u32 i_prohibited_user_op; /* 4 bytes */ + uint8_t i_chapter_nb; /* 1 byte */ + uint8_t i_cell_nb; /* 1 byte */ + uint32_t i_play_time; /* 4 bytes */ + uint32_t i_prohibited_user_op; /* 4 bytes */ audio_status_t pi_audio_status[8]; /* 8*2 bytes */ spu_status_t pi_spu_status[32]; /* 32*4 bytes */ - u16 i_next_title_num; /* 2 bytes */ - u16 i_prev_title_num; /* 2 bytes */ - u16 i_go_up_title_num; /* 2 bytes */ - u8 i_still_time; /* 1 byte ; in seconds */ - u8 i_play_mode; /* 1 byte */ + uint16_t i_next_title_num; /* 2 bytes */ + uint16_t i_prev_title_num; /* 2 bytes */ + uint16_t i_go_up_title_num; /* 2 bytes */ + uint8_t i_still_time; /* 1 byte ; in seconds */ + uint8_t i_play_mode; /* 1 byte */ /* In video_ts.ifo, the 3 significant bytes of each color are * preceded by 1 unsignificant byte */ - u32 pi_yuv_color[16]; /* 16*3 bytes */ + uint32_t pi_yuv_color[16]; /* 16*3 bytes */ /* Here come the start bytes of the following structures */ - u16 i_command_start_byte; /* 2 bytes */ - u16 i_chapter_map_start_byte; /* 2 bytes */ - u16 i_cell_play_start_byte; /* 2 bytes */ - u16 i_cell_pos_start_byte; /* 2 bytes */ + uint16_t i_command_start_byte; /* 2 bytes */ + uint16_t i_chapter_map_start_byte; /* 2 bytes */ + uint16_t i_cell_play_start_byte; /* 2 bytes */ + uint16_t i_cell_pos_start_byte; /* 2 bytes */ /* Predefined structures */ command_t command; chapter_map_t chapter_map; @@ -199,28 +199,28 @@ typedef struct title_s /* Menu PGCI Language unit Descriptor */ typedef struct unit_s { - u16 i_lang_code; /* 2 bytes (ISO-xx) */ + uint16_t i_lang_code; /* 2 bytes (ISO-xx) */ /* char ??? */ - u8 i_existence_mask; /* 1 byte */ - u32 i_unit_inf_start_byte; /* 4 bytes */ + uint8_t i_existence_mask; /* 1 byte */ + uint32_t i_unit_inf_start_byte; /* 4 bytes */ } unit_t; typedef struct unit_title_s { - u8 i_category_mask; /* 1 byte */ - u8 i_category; /* 1 byte */ - u16 i_parental_mask; /* 2 bytes */ - u32 i_title_start_byte; /* 4 bytes */ + uint8_t i_category_mask; /* 1 byte */ + uint8_t i_category; /* 1 byte */ + uint16_t i_parental_mask; /* 2 bytes */ + uint32_t i_title_start_byte; /* 4 bytes */ title_t title; } unit_title_t; -/* Menu PGCI Language Unit Table +/* Menu PGCI Language Unit Table * - start at i_lu_sbyte */ typedef struct unit_inf_s { - u16 i_title_nb; /* 2 bytes */ + uint16_t i_title_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ unit_title_t * p_title; /* i_srp_nb * 8 bytes */ } unit_inf_t; @@ -228,9 +228,9 @@ typedef struct unit_inf_s * - start at i_*_pgci_ut_ssector */ typedef struct title_unit_s { - u16 i_unit_nb; /* 2 bytes; ??? */ + uint16_t i_unit_nb; /* 2 bytes; ??? */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ unit_t* p_unit; /* i_lu_nb * 8 bytes */ unit_inf_t* p_unit_inf; /* i_lu_nb * 8 bytes */ } title_unit_t; @@ -240,19 +240,19 @@ typedef struct title_unit_s */ typedef struct cell_map_s { - u16 i_vob_id; /* 2 bytes */ - u8 i_cell_id; /* 1 byte */ + uint16_t i_vob_id; /* 2 bytes */ + uint8_t i_cell_id; /* 1 byte */ /* char ??? */ - u32 i_first_sector; /* 4 bytes */ - u32 i_last_sector; /* 4 bytes */ + uint32_t i_first_sector; /* 4 bytes */ + uint32_t i_last_sector; /* 4 bytes */ } cell_map_t; typedef struct cell_inf_s { - u16 i_vob_nb; /* 2 bytes */ + uint16_t i_vob_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ - u16 i_cell_nb; /* not in ifo; computed */ + uint32_t i_last_byte; /* 4 bytes */ + uint16_t i_cell_nb; /* not in ifo; computed */ /* with e_byte */ cell_map_t* p_cell_map; } cell_inf_t; @@ -263,57 +263,57 @@ typedef struct cell_inf_s */ typedef struct vobu_map_s { - u32 i_last_byte; /* 4 bytes */ - u32* pi_vobu_start_sector; /* (nb of vobu) * 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ + uint32_t * pi_vobu_start_sector; /* (nb of vobu) * 4 bytes */ } vobu_map_t; /***************************************************************************** * Structures for Video Management (cf video_ts.ifo) *****************************************************************************/ -/* +/* * Video Manager Information Management Table - */ + */ typedef struct manager_inf_s { byte_t psz_id[13]; /* 12 bytes (DVDVIDEO-VMG) */ - u32 i_vmg_end_sector; /* 4 bytes */ + uint32_t i_vmg_end_sector; /* 4 bytes */ /* char[12] ??? */ - u32 i_vmg_inf_end_sector; /* 4 bytes */ + uint32_t i_vmg_inf_end_sector; /* 4 bytes */ /* char ??? */ - u8 i_spec_ver; /* 1 byte */ - u32 i_cat; /* 4 bytes */ - u16 i_volume_nb; /* 2 bytes */ - u16 i_volume; /* 2 bytes */ - u8 i_disc_side; /* 1 bytes */ + uint8_t i_spec_ver; /* 1 byte */ + uint32_t i_cat; /* 4 bytes */ + uint16_t i_volume_nb; /* 2 bytes */ + uint16_t i_volume; /* 2 bytes */ + uint8_t i_disc_side; /* 1 bytes */ /* char[20] ??? */ - u16 i_title_set_nb; /* 2 bytes */ + uint16_t i_title_set_nb; /* 2 bytes */ byte_t ps_provider_id[32]; /* 32 bytes */ - u64 i_pos_code; /* 8 bytes */ + uint64_t i_pos_code; /* 8 bytes */ /* char[24] ??? */ - u32 i_vmg_inf_end_byte; /* 4 bytes */ - u32 i_first_play_title_start_byte; /* 4 bytes */ + uint32_t i_vmg_inf_end_byte; /* 4 bytes */ + uint32_t i_first_play_title_start_byte; /* 4 bytes */ /* char[56] ??? */ - u32 i_vob_start_sector; /* 4 bytes */ - u32 i_title_inf_start_sector; /* 4 bytes */ - u32 i_title_unit_start_sector; /* 4 bytes */ - u32 i_parental_inf_start_sector; /* 4 bytes */ - u32 i_vts_inf_start_sector; /* 4 bytes */ - u32 i_text_data_start_sector; /* 4 bytes */ - u32 i_cell_inf_start_sector; /* 4 bytes */ - u32 i_vobu_map_start_sector; /* 4 bytes */ + uint32_t i_vob_start_sector; /* 4 bytes */ + uint32_t i_title_inf_start_sector; /* 4 bytes */ + uint32_t i_title_unit_start_sector; /* 4 bytes */ + uint32_t i_parental_inf_start_sector; /* 4 bytes */ + uint32_t i_vts_inf_start_sector; /* 4 bytes */ + uint32_t i_text_data_start_sector; /* 4 bytes */ + uint32_t i_cell_inf_start_sector; /* 4 bytes */ + uint32_t i_vobu_map_start_sector; /* 4 bytes */ /* char[2] ??? */ ifo_video_t video_attr; /* 2 bytes */ /* char ??? */ - u8 i_audio_nb; /* 1 byte */ + uint8_t i_audio_nb; /* 1 byte */ ifo_audio_t p_audio_attr[8]; /* i_vmgm_audio_nb * 8 bytes */ /* char[16] ??? */ - u8 i_spu_nb; /* 1 byte */ + uint8_t i_spu_nb; /* 1 byte */ ifo_spu_t p_spu_attr[32]; /* i_subpic_nb * 6 bytes */ } manager_inf_t; -/* +/* * Part Of Title Search Pointer Table Information */ @@ -321,22 +321,22 @@ typedef struct manager_inf_s * we have a pointer to this structure for each tts */ typedef struct title_attr_s { - u8 i_play_type; /* 1 byte */ - u8 i_angle_nb; /* 1 byte */ - u16 i_chapter_nb; /* 2 bytes; Chapters/PGs */ - u16 i_parental_id; /* 2 bytes */ - u8 i_title_set_num; /* 1 byte (VTS#) */ - u8 i_title_num; /* 1 byte ??? */ - u32 i_start_sector; /* 4 bytes */ + uint8_t i_play_type; /* 1 byte */ + uint8_t i_angle_nb; /* 1 byte */ + uint16_t i_chapter_nb; /* 2 bytes; Chapters/PGs */ + uint16_t i_parental_id; /* 2 bytes */ + uint8_t i_title_set_num; /* 1 byte (VTS#) */ + uint8_t i_title_num; /* 1 byte ??? */ + uint32_t i_start_sector; /* 4 bytes */ } title_attr_t; /* Main struct for tts * - start at "i_vmg_ptt_srpt_ssector" */ typedef struct title_inf_s { - u16 i_title_nb; /* 2 bytes */ + uint16_t i_title_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ title_attr_t * p_attr; /* i_ttu_nb * 12 bytes */ } title_inf_t; @@ -347,22 +347,22 @@ typedef struct parental_desc_s { byte_t ps_country_code[2]; /* 2 bytes */ /* char[2] ??? */ - u16 i_parental_mask_start_byte; /* 2 bytes */ + uint16_t i_parental_mask_start_byte; /* 2 bytes */ /* char[2] ??? */ } parental_desc_t; typedef struct parental_mask_s { - u16* ppi_mask[8]; /* (i_vts_nb +1) * 8 * 2 bytes */ + uint16_t * ppi_mask[8]; /* (i_vts_nb +1) * 8 * 2 bytes */ } parental_mask_t; /* Main struct for parental management * - start at i_vmg_ptl_mait_ssector */ typedef struct parental_inf_s { - u16 i_country_nb; /* 2 bytes */ - u16 i_vts_nb; /* 2 bytes */ - u32 i_last_byte; /* 4 bytes */ + uint16_t i_country_nb; /* 2 bytes */ + uint16_t i_vts_nb; /* 2 bytes */ + uint32_t i_last_byte; /* 4 bytes */ parental_desc_t* p_parental_desc; /* i_country_nb * 8 bytes */ parental_mask_t* p_parental_mask; /* i_country_nb * sizeof(vmg_ptl_mask_t) */ } parental_inf_t; @@ -375,22 +375,22 @@ typedef struct parental_inf_s * - start at pi_atrt_sbyte */ typedef struct vts_attr_s { - u32 i_last_byte; /* 4 bytes */ - u32 i_cat_app_type; /* 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ + uint32_t i_cat_app_type; /* 4 bytes */ ifo_video_t vts_menu_video_attr; /* 2 bytes */ /* char ??? */ - u8 i_vts_menu_audio_nb; /* 1 byte */ + uint8_t i_vts_menu_audio_nb; /* 1 byte */ ifo_audio_t p_vts_menu_audio_attr[8]; /* 8 * 8 bytes */ /* char[17] ??? */ - u8 i_vts_menu_spu_nb; /* 1 byte */ + uint8_t i_vts_menu_spu_nb; /* 1 byte */ ifo_spu_t p_vts_menu_spu_attr[28]; /* i_vtsm_subpic_nb * 6 bytes */ /* char[2] ??? */ ifo_video_t vts_title_video_attr; /* 2 bytes */ /* char ??? */ - u8 i_vts_title_audio_nb; /* 1 byte */ + uint8_t i_vts_title_audio_nb; /* 1 byte */ ifo_audio_t p_vts_title_audio_attr[8]; /* 8 * 8 bytes */ /* char[17] ??? */ - u8 i_vts_title_spu_nb; /* 1 byte */ + uint8_t i_vts_title_spu_nb; /* 1 byte */ ifo_spu_t p_vts_title_spu_attr[28]; /* i_vtstt_subpic_nb * 6 bytes */ } vts_attr_t; @@ -398,17 +398,17 @@ typedef struct vts_attr_s * - start at i_vmg_vts_atrt_ssector */ typedef struct vts_inf_s { - u16 i_vts_nb; /* 2 bytes */ + uint16_t i_vts_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ - u32* pi_vts_attr_start_byte; /* i_vts_nb * 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ + uint32_t * pi_vts_attr_start_byte; /* i_vts_nb * 4 bytes */ vts_attr_t* p_vts_attr; } vts_inf_t; -/* +/* * Global Structure for Video Manager */ -typedef struct vmg_s +typedef struct vmg_s { manager_inf_t manager_inf; title_t title; @@ -424,51 +424,51 @@ typedef struct vmg_s * Structures for Video Title Sets (cf vts_*.ifo) ****************************************************************************/ -/* +/* * Video Title Sets Information Management Table - */ + */ typedef struct vts_manager_s { byte_t psz_id[13]; /* 12 bytes (DVDVIDEO-VTS) */ - u32 i_last_sector; /* 4 bytes */ + uint32_t i_last_sector; /* 4 bytes */ /* char[12] ??? */ - u32 i_inf_last_sector; /* 4 bytes */ + uint32_t i_inf_last_sector; /* 4 bytes */ /* char ??? */ - u8 i_spec_ver; /* 1 byte */ - u32 i_cat; /* 4 bytes */ + uint8_t i_spec_ver; /* 1 byte */ + uint32_t i_cat; /* 4 bytes */ /* char[90] ??? */ - u32 i_inf_end_byte; /* 4 bytes */ + uint32_t i_inf_end_byte; /* 4 bytes */ /* char[60] ??? */ - u32 i_menu_vob_start_sector; /* 4 bytes */ - u32 i_title_vob_start_sector; /* 4 bytes */ - u32 i_title_inf_start_sector; /* 4 bytes */ - u32 i_title_unit_start_sector; /* 4 bytes */ - u32 i_menu_unit_start_sector; /* 4 bytes */ - u32 i_time_inf_start_sector; /* 4 bytes */ - u32 i_menu_cell_inf_start_sector; /* 4 bytes */ - u32 i_menu_vobu_map_start_sector; /* 4 bytes */ - u32 i_cell_inf_start_sector; /* 4 bytes */ - u32 i_vobu_map_start_sector; /* 4 bytes */ + uint32_t i_menu_vob_start_sector; /* 4 bytes */ + uint32_t i_title_vob_start_sector; /* 4 bytes */ + uint32_t i_title_inf_start_sector; /* 4 bytes */ + uint32_t i_title_unit_start_sector; /* 4 bytes */ + uint32_t i_menu_unit_start_sector; /* 4 bytes */ + uint32_t i_time_inf_start_sector; /* 4 bytes */ + uint32_t i_menu_cell_inf_start_sector; /* 4 bytes */ + uint32_t i_menu_vobu_map_start_sector; /* 4 bytes */ + uint32_t i_cell_inf_start_sector; /* 4 bytes */ + uint32_t i_vobu_map_start_sector; /* 4 bytes */ /* char[24] ??? */ ifo_video_t menu_video_attr; /* 2 bytes */ /* char ??? */ - u8 i_menu_audio_nb; /* 1 byte */ + uint8_t i_menu_audio_nb; /* 1 byte */ ifo_audio_t p_menu_audio_attr[8]; /* i_vmgm_audio_nb * 8 bytes */ /* char[16] ??? */ - u8 i_menu_spu_nb; /* 1 byte */ + uint8_t i_menu_spu_nb; /* 1 byte */ ifo_spu_t p_menu_spu_attr[32]; /* i_subpic_nb * 6 bytes */ /* !!! only 28 subpics ??? */ /* char[2] ??? */ ifo_video_t video_attr; /* 2 bytes */ /* char ??? */ - u8 i_audio_nb; /* 1 byte */ + uint8_t i_audio_nb; /* 1 byte */ ifo_audio_t p_audio_attr[8]; /* i_vmgm_audio_nb * 8 bytes */ /* char[16] ??? */ - u8 i_spu_nb; /* 1 byte */ + uint8_t i_spu_nb; /* 1 byte */ ifo_spu_t p_spu_attr[32]; /* i_subpic_nb * 6 bytes */ } vts_manager_t; -/* +/* * Part Of Title Search Pointer Table Information */ @@ -476,18 +476,18 @@ typedef struct vts_manager_s * we have a pointer to this structure for each tts */ typedef struct title_start_s { - u16 i_title_id; /* 2 bytes; Chapters/PGs */ - u16 i_chapter; /* 2 bytes */ + uint16_t i_title_id; /* 2 bytes; Chapters/PGs */ + uint16_t i_chapter; /* 2 bytes */ } title_start_t; /* Main struct for tts * - start at "i_vts_ptt_srpt_ssector" */ typedef struct vts_title_s { - u16 i_title_nb; /* 2 bytes */ + uint16_t i_title_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ - u32* pi_start_byte; + uint32_t i_last_byte; /* 4 bytes */ + uint32_t * pi_start_byte; title_start_t * p_title_start; /* i_ttu_nb * 4 bytes */ } vts_title_t; @@ -498,25 +498,25 @@ typedef struct vts_title_s /* Time Map structure */ typedef struct time_map_s { - u8 i_time_unit; /* 1 byte */ + uint8_t i_time_unit; /* 1 byte */ /* char ??? */ - u16 i_entry_nb; /* 2 bytes */ - u32* pi_sector; /* i_entry_nb * 4 bytes */ + uint16_t i_entry_nb; /* 2 bytes */ + uint32_t * pi_sector; /* i_entry_nb * 4 bytes */ } time_map_t; /* Main structure for tmap_ti * - start at "i_tmap_ti_ssector" */ typedef struct time_inf_s { - u16 i_nb; /* 2 bytes */ + uint16_t i_nb; /* 2 bytes */ /* char[2] ??? */ - u32 i_last_byte; /* 4 bytes */ - u32* pi_start_byte; /* i_tmap_nb * 4 bytes */ + uint32_t i_last_byte; /* 4 bytes */ + uint32_t * pi_start_byte; /* i_tmap_nb * 4 bytes */ time_map_t* p_time_map; } time_inf_t; /* - * Video Title Set + * Video Title Set */ typedef struct vts_s { @@ -544,9 +544,9 @@ typedef struct ifo_s vlc_bool_t b_error; /* Error Management */ vmg_t vmg; /* Structure described in video_ts */ vts_t vts; /* Vts ifo for current title set */ - + /* Remap buffer for unaligned reads */ - u8 p_remap[ 2 * DVD_LB_SIZE ]; + uint8_t p_remap[ 2 * DVD_LB_SIZE ]; } ifo_t; diff --git a/modules/access/dvd/udf.h b/modules/access/dvd/udf.h index 84b35f266f..70ee6447ad 100644 --- a/modules/access/dvd/udf.h +++ b/modules/access/dvd/udf.h @@ -2,7 +2,7 @@ * dvd_udf.h: structures for udf filesystem tools. ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: udf.h,v 1.1 2002/08/04 17:23:41 sam Exp $ + * $Id: udf.h,v 1.2 2003/10/25 00:49:13 sam Exp $ * * Author: Stéphane Borel * @@ -13,7 +13,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -27,5 +27,5 @@ /* * Fonctions in dvd_udf.c */ -u32 DVDUDFFindFile( dvdcss_handle, char * ); +uint32_t DVDUDFFindFile( dvdcss_handle, char * ); diff --git a/modules/access/dvdplay/es.c b/modules/access/dvdplay/es.c index 9fdb502674..496e3e5da3 100644 --- a/modules/access/dvdplay/es.c +++ b/modules/access/dvdplay/es.c @@ -2,7 +2,7 @@ * es.c: functions to handle elementary streams. ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: es.c,v 1.6 2003/05/05 22:23:32 gbazin Exp $ + * $Id: es.c,v 1.7 2003/10/25 00:49:13 sam Exp $ * * Author: Stéphane Borel * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -58,7 +58,7 @@ void dvdplay_DeleteES( input_thread_t* p_input ) p_input->stream.pp_selected_es = NULL; p_input->stream.i_selected_es_number = 0; - + while( p_input->stream.i_es_number ) { input_DelES( p_input, p_input->stream.pp_es[0] ); @@ -98,10 +98,10 @@ void dvdplay_Video( input_thread_t * p_input ) p_dvd = (dvd_data_t*)(p_input->p_access_data); p_attr = dvdplay_video_attr( p_dvd->vmg ); - + /* ES 0 -> video MPEG2 */ i_id = 0xe0; - + if( p_attr->display_aspect_ratio ) { ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, @@ -112,7 +112,7 @@ void dvdplay_Video( input_thread_t * p_input ) { ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, "", 0 ); } - + } /***************************************************************************** @@ -133,7 +133,7 @@ void dvdplay_Audio( input_thread_t * p_input ) p_dvd = (dvd_data_t*)(p_input->p_access_data); p_dvd->i_audio_nb = 0; dvdplay_audio_info( p_dvd->vmg, &i_audio_nr, &i_audio ); - + /* Audio ES, in the order they appear in .ifo */ for( i = 1 ; i <= i_audio_nr ; i++ ) { @@ -190,7 +190,7 @@ void dvdplay_Subp( input_thread_t * p_input ) dvd_data_t * p_dvd; es_descriptor_t * p_es; subp_attr_t * p_attr; - u32 * pi_palette; + uint32_t * pi_palette; int i_subp_nr = -1; int i_subp = -1; int i_id; @@ -212,10 +212,10 @@ void dvdplay_Subp( input_thread_t * p_input ) if( pi_palette ) { ADDES( i_id, VLC_FOURCC('s','p','u','b'), SPU_ES, - p_attr->lang_code, "", sizeof(int) + 16*sizeof(u32) ); + p_attr->lang_code, "", sizeof(int) + 16*sizeof(uint32_t) ); *(int*)p_es->p_demux_data = 0xBeeF; memcpy( (void*)p_es->p_demux_data + sizeof(int), - pi_palette, 16*sizeof(u32) ); + pi_palette, 16*sizeof(uint32_t) ); } else { diff --git a/modules/access/v4l/v4l.c b/modules/access/v4l/v4l.c index 6760836fd8..65aba7ca0b 100644 --- a/modules/access/v4l/v4l.c +++ b/modules/access/v4l/v4l.c @@ -2,7 +2,7 @@ * v4l.c : Video4Linux input module for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: v4l.c,v 1.25 2003/10/24 21:27:06 gbazin Exp $ + * $Id: v4l.c,v 1.26 2003/10/25 00:49:13 sam Exp $ * * Author: Laurent Aimar * Paul Forgey @@ -399,10 +399,10 @@ static int AccessOpen( vlc_object_t *p_this ) p_sys->b_mjpeg = VLC_TRUE; } - else if( !strncmp( psz_parser, "decimation=", + else if( !strncmp( psz_parser, "decimation=", strlen( "decimation=" ) ) ) { - p_sys->i_decimation = + p_sys->i_decimation = strtol( psz_parser + strlen( "decimation=" ), &psz_parser, 0 ); } @@ -559,7 +559,7 @@ static int AccessOpen( vlc_object_t *p_this ) #endif // show a warning if frequency is < than 30000. User is certainly usint old syntax. - + /* set frequency */ if( p_sys->i_frequency >= 0 ) @@ -1127,7 +1127,7 @@ static uint8_t *GrabMJPEG( input_thread_t *p_input ) p_app1 = (struct quicktime_mjpeg_app1 *)(p_field + 6); tag = 0xffd9; tag = hton16( tag ); - p = memmem( p_field, sync.length - (size_t)(p_field - p_frame), + p = memmem( p_field, sync.length - (size_t)(p_field - p_frame), &tag, 2 ); if( !p ) diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c index 2d2c9f10ba..2165bc39e9 100644 --- a/modules/audio_filter/channel_mixer/trivial.c +++ b/modules/audio_filter/channel_mixer/trivial.c @@ -2,7 +2,7 @@ * trivial.c : trivial channel mixer plug-in (drops unwanted channels) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: trivial.c,v 1.11 2003/01/23 11:48:18 massiot Exp $ + * $Id: trivial.c,v 1.12 2003/10/25 00:49:13 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -72,12 +72,12 @@ static int Create( vlc_object_t *p_this ) > aout_FormatNbChannels( &p_filter->output ) ) { /* Downmixing */ - p_filter->b_in_place = 1; + p_filter->b_in_place = 1; } else { /* Upmixing */ - p_filter->b_in_place = 0; + p_filter->b_in_place = 0; } return 0; @@ -86,7 +86,7 @@ static int Create( vlc_object_t *p_this ) /***************************************************************************** * SparseCopy: trivially downmix or upmix a buffer *****************************************************************************/ -static void SparseCopy( s32 * p_dest, const s32 * p_src, size_t i_len, +static void SparseCopy( int32_t * p_dest, const int32_t * p_src, size_t i_len, int i_output_stride, int i_input_stride ) { int i; @@ -110,8 +110,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i_input_nb = aout_FormatNbChannels( &p_filter->input ); int i_output_nb = aout_FormatNbChannels( &p_filter->output ); - s32 * p_dest = (s32 *)p_out_buf->p_buffer; - s32 * p_src = (s32 *)p_in_buf->p_buffer; + int32_t * p_dest = (int32_t *)p_out_buf->p_buffer; + int32_t * p_src = (int32_t *)p_in_buf->p_buffer; p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes * i_output_nb / i_input_nb; @@ -120,7 +120,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, != (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK) && (p_filter->input.i_original_channels & AOUT_CHAN_PHYSMASK) == (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT) ) - { + { int i; /* This is a bit special. */ if ( !(p_filter->output.i_original_channels & AOUT_CHAN_LEFT) ) diff --git a/modules/audio_filter/converter/fixed32tos16.c b/modules/audio_filter/converter/fixed32tos16.c index 1cbd18cb9d..50094e1b71 100644 --- a/modules/audio_filter/converter/fixed32tos16.c +++ b/modules/audio_filter/converter/fixed32tos16.c @@ -2,7 +2,7 @@ * fixed32tos16.c : converter from fixed32 to signed 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: fixed32tos16.c,v 1.10 2002/12/24 19:09:12 jpsaman Exp $ + * $Id: fixed32tos16.c,v 1.11 2003/10/25 00:49:13 sam Exp $ * * Authors: Jean-Paul Saman * @@ -92,10 +92,10 @@ static int Create( vlc_object_t *p_this ) #define VLC_F_FRACBITS 28 # if VLC_F_FRACBITS == 28 -# define VLC_F(x) ((vlc_fixed_t) (x##L)) +# define VLC_F(x) ((vlc_fixed_t) (x##L)) # endif -# define VLC_F_ONE VLC_F(0x10000000) +# define VLC_F_ONE VLC_F(0x10000000) struct audio_dither { vlc_fixed_t error[3]; @@ -115,8 +115,8 @@ static inline unsigned long prng(unsigned long state) * NAME: mpg321_s24_to_s16_pcm() * DESCRIPTION: generic linear sample quantize and dither routine ********************************************************************/ -static inline s16 mpg321_s24_to_s16_pcm(unsigned int bits, vlc_fixed_t sample, - struct audio_dither *dither) +static inline int16_t mpg321_s24_to_s16_pcm(unsigned int bits, vlc_fixed_t sample, + struct audio_dither *dither) { unsigned int scalebits; vlc_fixed_t output, mask, random; @@ -171,7 +171,7 @@ static inline s16 mpg321_s24_to_s16_pcm(unsigned int bits, vlc_fixed_t sample, /***************************************************************************** * s24_to_s16_pcm: Scale a 24 bit pcm sample to a 16 bit pcm sample. *****************************************************************************/ -static inline s16 s24_to_s16_pcm(vlc_fixed_t sample) +static inline int16_t s24_to_s16_pcm(vlc_fixed_t sample) { /* round */ sample += (1L << (VLC_F_FRACBITS - 16)); @@ -194,7 +194,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i; vlc_fixed_t * p_in = (vlc_fixed_t *)p_in_buf->p_buffer; - s16 * p_out = (s16 *)p_out_buf->p_buffer; + int16_t * p_out = (int16_t *)p_out_buf->p_buffer; #if 0 static struct audio_dither dither; #endif diff --git a/modules/audio_filter/converter/float32tos16.c b/modules/audio_filter/converter/float32tos16.c index f5254684df..e18ad0077d 100644 --- a/modules/audio_filter/converter/float32tos16.c +++ b/modules/audio_filter/converter/float32tos16.c @@ -2,7 +2,7 @@ * float32tos16.c : converter from float32 to signed 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tos16.c,v 1.12 2002/11/20 16:43:32 sam Exp $ + * $Id: float32tos16.c,v 1.13 2003/10/25 00:49:13 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -80,7 +80,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i; float * p_in = (float *)p_in_buf->p_buffer; - s16 * p_out = (s16 *)p_out_buf->p_buffer; + int16_t * p_out = (int16_t *)p_out_buf->p_buffer; for ( i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); i-- ; ) @@ -93,8 +93,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, #else /* This is walken's trick based on IEEE float format. */ float f_in = *p_in + 384.0; - s32 i_in; - i_in = *(s32 *)&f_in; + int32_t i_in; + i_in = *(int32_t *)&f_in; if ( i_in > 0x43c07fff ) *p_out = 32767; else if ( i_in < 0x43bf8000 ) *p_out = -32768; else *p_out = i_in - 0x43c00000; diff --git a/modules/audio_filter/converter/float32tos8.c b/modules/audio_filter/converter/float32tos8.c index 06d30eef4d..3bca9e0f98 100644 --- a/modules/audio_filter/converter/float32tos8.c +++ b/modules/audio_filter/converter/float32tos8.c @@ -2,7 +2,7 @@ * float32tos8.c : converter from float32 to signed 8 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tos8.c,v 1.7 2002/11/20 16:43:32 sam Exp $ + * $Id: float32tos8.c,v 1.8 2003/10/25 00:49:13 sam Exp $ * * Authors: Xavier Maillard * @@ -82,14 +82,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i; float * p_in = (float *)p_in_buf->p_buffer; - s8 * p_out = (s8 *)p_out_buf->p_buffer; + int8_t * p_out = (int8_t *)p_out_buf->p_buffer; for ( i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); i-- ; ) { if ( *p_in >= 1.0 ) *p_out = 127; else if ( *p_in < -1.0 ) *p_out = -128; - else *p_out = (s8)(*p_in * 128); + else *p_out = (int8_t)(*p_in * 128); p_in++; p_out++; } diff --git a/modules/audio_filter/converter/float32tou16.c b/modules/audio_filter/converter/float32tou16.c index 5af35da75a..f2637f0944 100644 --- a/modules/audio_filter/converter/float32tou16.c +++ b/modules/audio_filter/converter/float32tou16.c @@ -2,7 +2,7 @@ * float32tou16.c : converter from float32 to unsigned 16 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tou16.c,v 1.7 2002/11/20 16:43:32 sam Exp $ + * $Id: float32tou16.c,v 1.8 2003/10/25 00:49:13 sam Exp $ * * Authors: Xavier Maillard * @@ -82,14 +82,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i; float * p_in = (float *)p_in_buf->p_buffer; - u16 * p_out = (u16 *)p_out_buf->p_buffer; + uint16_t * p_out = (uint16_t *)p_out_buf->p_buffer; for ( i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); i-- ; ) { if ( *p_in >= 1.0 ) *p_out = 65535; else if ( *p_in < -1.0 ) *p_out = 0; - else *p_out = (u16)(32768 + *p_in * 32768); + else *p_out = (uint16_t)(32768 + *p_in * 32768); p_in++; p_out++; } diff --git a/modules/audio_filter/converter/float32tou8.c b/modules/audio_filter/converter/float32tou8.c index 5567818b59..93492185eb 100644 --- a/modules/audio_filter/converter/float32tou8.c +++ b/modules/audio_filter/converter/float32tou8.c @@ -2,7 +2,7 @@ * float32tou8.c : converter from float32 to unsigned 8 bits integer ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: float32tou8.c,v 1.7 2002/11/20 16:43:32 sam Exp $ + * $Id: float32tou8.c,v 1.8 2003/10/25 00:49:13 sam Exp $ * * Authors: Xavier Maillard * @@ -82,14 +82,14 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, { int i; float * p_in = (float *)p_in_buf->p_buffer; - u8 * p_out = (u8 *)p_out_buf->p_buffer; + uint8_t * p_out = (uint8_t *)p_out_buf->p_buffer; for ( i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); i-- ; ) { if ( *p_in >= 1.0 ) *p_out = 255; else if ( *p_in < -1.0 ) *p_out = 0; - else *p_out = (u8)(128 + *p_in * 128); + else *p_out = (uint8_t)(128 + *p_in * 128); p_in++; p_out++; } diff --git a/modules/audio_filter/converter/s16tofixed32.c b/modules/audio_filter/converter/s16tofixed32.c index 8fe67ee018..2a8b34fd30 100644 --- a/modules/audio_filter/converter/s16tofixed32.c +++ b/modules/audio_filter/converter/s16tofixed32.c @@ -2,7 +2,7 @@ * s16tofixed32.c : converter from signed 16 bits integer to fixed 32 ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s16tofixed32.c,v 1.1 2003/03/12 23:59:19 marcari Exp $ + * $Id: s16tofixed32.c,v 1.2 2003/10/25 00:49:13 sam Exp $ * * Authors: Marc Ariberti * @@ -84,7 +84,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - s16 * p_in = (s16 *)p_in_buf->p_buffer + i - 1; + int16_t * p_in = (int16_t *)p_in_buf->p_buffer + i - 1; vlc_fixed_t * p_out = (vlc_fixed_t *)p_out_buf->p_buffer + i - 1; while( i-- ) @@ -94,6 +94,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, } p_out_buf->i_nb_samples = p_in_buf->i_nb_samples; - p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes - * sizeof(vlc_fixed_t) / sizeof(s16); + p_out_buf->i_nb_bytes = p_in_buf->i_nb_bytes + * sizeof(vlc_fixed_t) / sizeof(int16_t); } diff --git a/modules/audio_filter/converter/s16tofloat32.c b/modules/audio_filter/converter/s16tofloat32.c index 5b7f75f471..62f6c25036 100644 --- a/modules/audio_filter/converter/s16tofloat32.c +++ b/modules/audio_filter/converter/s16tofloat32.c @@ -2,7 +2,7 @@ * s16tofloat32.c : converter from signed 16 bits integer to float32 ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s16tofloat32.c,v 1.5 2002/11/20 16:43:32 sam Exp $ + * $Id: s16tofloat32.c,v 1.6 2003/10/25 00:49:13 sam Exp $ * * Authors: Samuel Hocevar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -83,7 +83,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - s16 * p_in = (s16 *)p_in_buf->p_buffer + i - 1; + int16_t * p_in = (int16_t *)p_in_buf->p_buffer + i - 1; float * p_out = (float *)p_out_buf->p_buffer + i - 1; while( i-- ) @@ -95,7 +95,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, /* This is walken's trick based on IEEE float format. On my PIII * this takes 16 seconds to perform one billion conversions, instead * of 19 seconds for the above division. */ - s32 i_out = *p_in + 0x43c00000; + int32_t i_out = *p_in + 0x43c00000; float f_out = *(float *)&i_out; *p_out = f_out - 384.0; #endif diff --git a/modules/audio_filter/converter/s16tofloat32swab.c b/modules/audio_filter/converter/s16tofloat32swab.c index 8d132d4217..07d9a2fce2 100644 --- a/modules/audio_filter/converter/s16tofloat32swab.c +++ b/modules/audio_filter/converter/s16tofloat32swab.c @@ -3,16 +3,16 @@ * with endianness change ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s16tofloat32swab.c,v 1.9 2003/04/22 22:25:09 gbazin Exp $ + * $Id: s16tofloat32swab.c,v 1.10 2003/10/25 00:49:13 sam Exp $ * * Authors: Samuel Hocevar * Henri Fallon - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -54,7 +54,7 @@ static void DoWork ( aout_instance_t *, aout_filter_t *, aout_buffer_t *, * Module descriptor *****************************************************************************/ vlc_module_begin(); - set_description( + set_description( _("audio filter for s16->float32 with endianness conversion") ); set_capability( "audio filter", 1 ); set_callbacks( Create, NULL ); @@ -68,7 +68,7 @@ vlc_module_end(); static int Create( vlc_object_t *p_this ) { aout_filter_t * p_filter = (aout_filter_t *)p_this; - + if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) ) { return -1; @@ -97,30 +97,30 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - s16 * p_in; + int16_t * p_in; float * p_out = (float *)p_out_buf->p_buffer + i - 1; #ifdef HAVE_SWAB # ifdef HAVE_ALLOCA - s16 * p_swabbed = alloca( i * sizeof(s16) ); + int16_t * p_swabbed = alloca( i * sizeof(int16_t) ); # else - s16 * p_swabbed = malloc( i * sizeof(s16) ); + int16_t * p_swabbed = malloc( i * sizeof(int16_t) ); # endif - swab( p_in_buf->p_buffer, (void *)p_swabbed, i * sizeof(s16) ); + swab( p_in_buf->p_buffer, (void *)p_swabbed, i * sizeof(int16_t) ); p_in = p_swabbed + i - 1; #else byte_t p_tmp[2]; - p_in = (s16 *)p_in_buf->p_buffer + i - 1; + 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_out = (float)( *(s16 *)p_tmp ) / 32768.0; + *p_out = (float)( *(int16_t *)p_tmp ) / 32768.0; #else *p_out = (float)*p_in / 32768.0; #endif diff --git a/modules/audio_filter/converter/s8tofloat32.c b/modules/audio_filter/converter/s8tofloat32.c index 0ee3a6dd04..31fd41ce16 100644 --- a/modules/audio_filter/converter/s8tofloat32.c +++ b/modules/audio_filter/converter/s8tofloat32.c @@ -2,7 +2,7 @@ * s8tofloat32.c : converter from signed 8 bits integer to float32. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: s8tofloat32.c,v 1.2 2002/11/20 16:43:32 sam Exp $ + * $Id: s8tofloat32.c,v 1.3 2003/10/25 00:49:13 sam Exp $ * * Authors: Gildas Bazin * @@ -81,7 +81,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - s8 * p_in = (s8 *)p_in_buf->p_buffer + i - 1; + int8_t * p_in = (int8_t *)p_in_buf->p_buffer + i - 1; float * p_out = (float *)p_out_buf->p_buffer + i - 1; while( i-- ) diff --git a/modules/audio_filter/converter/u8tofixed32.c b/modules/audio_filter/converter/u8tofixed32.c index e76c515a1f..13a2b2796e 100644 --- a/modules/audio_filter/converter/u8tofixed32.c +++ b/modules/audio_filter/converter/u8tofixed32.c @@ -2,7 +2,7 @@ * u8tofixed32.c : converter from unsigned 8 bits integer to fixed32. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: u8tofixed32.c,v 1.1 2002/11/21 13:53:32 sam Exp $ + * $Id: u8tofixed32.c,v 1.2 2003/10/25 00:49:13 sam Exp $ * * Authors: Samuel Hocevar * @@ -81,7 +81,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - u8 * p_in = (u8 *)p_in_buf->p_buffer + i - 1; + uint8_t * p_in = (uint8_t *)p_in_buf->p_buffer + i - 1; vlc_fixed_t * p_out = (vlc_fixed_t *)p_out_buf->p_buffer + i - 1; while( i-- ) diff --git a/modules/audio_filter/converter/u8tofloat32.c b/modules/audio_filter/converter/u8tofloat32.c index 9957a499bb..cb9c53c332 100644 --- a/modules/audio_filter/converter/u8tofloat32.c +++ b/modules/audio_filter/converter/u8tofloat32.c @@ -2,7 +2,7 @@ * u8tofloat32.c : converter from unsigned 8 bits integer to float32. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: u8tofloat32.c,v 1.3 2002/11/20 16:43:32 sam Exp $ + * $Id: u8tofloat32.c,v 1.4 2003/10/25 00:49:13 sam Exp $ * * Authors: Gildas Bazin * @@ -81,7 +81,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter, int i = p_in_buf->i_nb_samples * aout_FormatNbChannels( &p_filter->input ); /* We start from the end because b_in_place is true */ - u8 * p_in = (u8 *)p_in_buf->p_buffer + i - 1; + uint8_t * p_in = (uint8_t *)p_in_buf->p_buffer + i - 1; float * p_out = (float *)p_out_buf->p_buffer + i - 1; while( i-- ) diff --git a/modules/audio_mixer/trivial.c b/modules/audio_mixer/trivial.c index d8213216bf..16de37a1cd 100644 --- a/modules/audio_mixer/trivial.c +++ b/modules/audio_mixer/trivial.c @@ -2,7 +2,7 @@ * trivial.c : trivial mixer plug-in (1 input, no downmixing) ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: trivial.c,v 1.12 2003/03/30 18:14:36 gbazin Exp $ + * $Id: trivial.c,v 1.13 2003/10/25 00:49:13 sam Exp $ * * Authors: Christophe Massiot * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -73,7 +73,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) int i = 0; aout_input_t * p_input = p_aout->pp_inputs[i]; int i_nb_channels = aout_FormatNbChannels( &p_aout->mixer.mixer ); - int i_nb_bytes = p_buffer->i_nb_samples * sizeof(s32) + int i_nb_bytes = p_buffer->i_nb_samples * sizeof(int32_t) * i_nb_channels; byte_t * p_in; byte_t * p_out; @@ -92,7 +92,7 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer ) ptrdiff_t i_available_bytes = (p_input->fifo.p_first->p_buffer - p_in) + p_input->fifo.p_first->i_nb_samples - * sizeof(s32) + * sizeof(int32_t) * i_nb_channels; if ( i_available_bytes < i_nb_bytes ) diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 98d6c6e0ac..167c256cd0 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -2,7 +2,7 @@ * alsa.c : alsa plugin for vlc ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: alsa.c,v 1.35 2003/10/23 21:55:50 gbazin Exp $ + * $Id: alsa.c,v 1.36 2003/10/25 00:49:13 sam Exp $ * * Authors: Henri Fallon - Original Author * Jeffrey Baker - Port to ALSA 1.0 API @@ -70,7 +70,7 @@ struct aout_sys_t /* These values are in frames. To convert them to a number of bytes you have to multiply them by the number of channel(s) (eg. 2 for stereo) and the size of a sample (eg. - 2 for s16). */ + 2 for int16_t). */ #define ALSA_DEFAULT_PERIOD_SIZE 1024 #define ALSA_DEFAULT_BUFFER_SIZE ( ALSA_DEFAULT_PERIOD_SIZE << 8 ) #define ALSA_SPDIF_PERIOD_SIZE A52_FRAME_NB diff --git a/modules/audio_output/file.c b/modules/audio_output/file.c index 63e72093d5..268fad03b0 100644 --- a/modules/audio_output/file.c +++ b/modules/audio_output/file.c @@ -2,7 +2,7 @@ * file.c : audio output which writes the samples to a file ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: file.c,v 1.22 2003/05/15 22:27:37 massiot Exp $ + * $Id: file.c,v 1.23 2003/10/25 00:49:13 sam Exp $ * * Authors: Christophe Massiot * Gildas Bazin @@ -11,7 +11,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c index 0958063d27..7695bfd353 100644 --- a/modules/audio_output/sdl.c +++ b/modules/audio_output/sdl.c @@ -2,18 +2,18 @@ * sdl.c : SDL audio output plugin for vlc ***************************************************************************** * Copyright (C) 2000-2002 VideoLAN - * $Id: sdl.c,v 1.22 2003/05/04 22:42:15 gbazin Exp $ + * $Id: sdl.c,v 1.23 2003/10/25 00:49:13 sam Exp $ * * Authors: Michel Kaempf * Samuel Hocevar * Pierre Baillet * Christophe Massiot - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -48,7 +48,7 @@ * It describes the specific properties of an audio device. *****************************************************************************/ struct aout_sys_t -{ +{ mtime_t next_date; mtime_t buffer_time; }; @@ -82,7 +82,7 @@ static int Open ( vlc_object_t *p_this ) vlc_value_t val, text; /* Check that no one uses the DSP. */ - Uint32 i_flags = SDL_INIT_AUDIO; + uint32_t i_flags = SDL_INIT_AUDIO; if( SDL_WasInit( i_flags ) ) { return VLC_EGENERIC; diff --git a/modules/codec/araw.c b/modules/codec/araw.c index 4695178629..9263138d74 100644 --- a/modules/codec/araw.c +++ b/modules/codec/araw.c @@ -2,7 +2,7 @@ * araw.c: Pseudo audio decoder; for raw pcm data ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: araw.c,v 1.17 2003/09/02 20:19:25 gbazin Exp $ + * $Id: araw.c,v 1.18 2003/10/25 00:49:13 sam Exp $ * * Authors: Laurent Aimar * @@ -42,7 +42,7 @@ typedef struct adec_thread_s /* Input properties */ decoder_fifo_t *p_fifo; - int16_t *p_logtos16; // used with m/alaw to s16 + int16_t *p_logtos16; // used with m/alaw to int16_t /* Output properties */ aout_instance_t * p_aout; /* opaque */ @@ -379,7 +379,7 @@ static int InitThread( adec_thread_t * p_adec ) return( 0 ); } -static void GetPESData( u8 *p_buf, int i_max, pes_packet_t *p_pes ) +static void GetPESData( uint8_t *p_buf, int i_max, pes_packet_t *p_pes ) { int i_copy; int i_count; diff --git a/modules/codec/cinepak.c b/modules/codec/cinepak.c index 28ef9351f2..a9ef93bcf1 100644 --- a/modules/codec/cinepak.c +++ b/modules/codec/cinepak.c @@ -1,8 +1,8 @@ /***************************************************************************** - * cinepak.c: cinepak video decoder + * cinepak.c: cinepak video decoder ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: cinepak.c,v 1.1 2003/10/02 21:12:45 gbazin Exp $ + * $Id: cinepak.c,v 1.2 2003/10/25 00:49:13 sam Exp $ * * Authors: Laurent Aimar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,30 +36,30 @@ typedef struct cinepak_codebook_s { - u8 i_y[4]; - u8 i_u, i_v; - + uint8_t i_y[4]; + uint8_t i_u, i_v; + } cinepak_codebook_t; typedef struct cinepak_context_s { int b_grayscale; /* force to grayscale */ - + int i_width; int i_height; int i_stride_x; int i_stride_y; - - u8 *p_y, *p_u, *p_v; + + uint8_t *p_y, *p_u, *p_v; int i_stride[3]; /* our 3 planes */ int i_lines[3]; - u8 *p_pix[3]; - + uint8_t *p_pix[3]; + cinepak_codebook_t codebook_v1[CINEPAK_MAXSTRIP][256]; cinepak_codebook_t codebook_v4[CINEPAK_MAXSTRIP][256]; - + } cinepak_context_t; /***************************************************************************** @@ -86,7 +86,7 @@ static int InitDecoder( decoder_t * ); static int RunDecoder ( decoder_t *, block_t * ); static int EndDecoder ( decoder_t * ); -static int cinepak_decode_frame( cinepak_context_t *, int, u8 * ); +static int cinepak_decode_frame( cinepak_context_t *, int, uint8_t * ); /***************************************************************************** * Module descriptor @@ -100,13 +100,13 @@ vlc_module_end(); /***************************************************************************** * OpenDecoder: probe the decoder and return score ***************************************************************************** - * Tries to launch a decoder and return score so that the interface is able + * Tries to launch a decoder and return score so that the interface is able * to chose. *****************************************************************************/ static int OpenDecoder( vlc_object_t *p_this ) { decoder_t *p_dec = (decoder_t*)p_this; - + switch( p_dec->p_fifo->i_fourcc ) { case VLC_FOURCC('c','v','i','d'): @@ -166,7 +166,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) { decoder_sys_t *p_sys = p_dec->p_sys; int i_status, i_plane; - u8 *p_dst, *p_src; + uint8_t *p_dst, *p_src; picture_t *p_pic; i_status = cinepak_decode_frame( p_sys->p_context, @@ -272,21 +272,21 @@ static int EndDecoder( decoder_t *p_dec ) if( p ) free( p ) static void cinepak_LoadCodebook( cinepak_codebook_t *p_codebook, - u8 *p_data, int b_grayscale ) + uint8_t *p_data, int b_grayscale ) { int i, i_y[4], i_u, i_v, i_Cb, i_Cr; int i_uv; #define SCALEBITS 12 #define FIX( x ) ( (int)( (x) * ( 1L << SCALEBITS ) + 0.5 ) ) - + for( i = 0; i < 4; i++ ) { - i_y[i] = (u8)( *(p_data++) ); + i_y[i] = (uint8_t)( *(p_data++) ); } if( b_grayscale ) { - i_u = (s8)( *(p_data++) ); - i_v = (s8)( *(p_data++) ); + i_u = (int8_t)( *(p_data++) ); + i_v = (int8_t)( *(p_data++) ); } else { @@ -320,12 +320,12 @@ static void cinepak_LoadCodebook( cinepak_codebook_t *p_codebook, static void cinepak_Getv4( cinepak_context_t *p_context, int i_strip, int i_x, int i_y, - int i_x2, int i_y2, u8 *p_data ) + int i_x2, int i_y2, uint8_t *p_data ) { - u8 i_index[4]; + uint8_t i_index[4]; int i,j; - u8 *p_dst_y, *p_dst_u, *p_dst_v; + uint8_t *p_dst_y, *p_dst_u, *p_dst_v; #define PIX_SET_Y( x, y, v ) \ p_dst_y[(x) + (y)* p_context->i_stride[0]] = (v); @@ -346,18 +346,18 @@ static void cinepak_Getv4( cinepak_context_t *p_context, { for( j = 0; j < 2; j ++ ) { - PIX_SET_Y( 2*j + 0, 2*i + 0, + PIX_SET_Y( 2*j + 0, 2*i + 0, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_y[0]); - PIX_SET_Y( 2*j + 1, 2*i + 0, + PIX_SET_Y( 2*j + 1, 2*i + 0, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_y[1]); - PIX_SET_Y( 2*j + 0, 2*i + 1, + PIX_SET_Y( 2*j + 0, 2*i + 1, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_y[2]); - PIX_SET_Y( 2*j + 1, 2*i + 1, + PIX_SET_Y( 2*j + 1, 2*i + 1, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_y[3]); - PIX_SET_UV( 1, p_dst_u, j, i, + PIX_SET_UV( 1, p_dst_u, j, i, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_u ); - PIX_SET_UV( 2, p_dst_v, j, i, + PIX_SET_UV( 2, p_dst_v, j, i, p_context->codebook_v4[i_strip][i_index[j+2*i]].i_v ); } } @@ -367,12 +367,12 @@ static void cinepak_Getv4( cinepak_context_t *p_context, static void cinepak_Getv1( cinepak_context_t *p_context, int i_strip, int i_x, int i_y, - int i_x2, int i_y2, u8 *p_data ) + int i_x2, int i_y2, uint8_t *p_data ) { - u8 i_index; + uint8_t i_index; int i,j; - u8 *p_dst_y, *p_dst_u, *p_dst_v; + uint8_t *p_dst_y, *p_dst_u, *p_dst_v; #define PIX_SET_Y( x, y, v ) \ p_dst_y[(x) + (y)* p_context->i_stride[0]] = (v); @@ -390,18 +390,18 @@ static void cinepak_Getv1( cinepak_context_t *p_context, { for( j = 0; j < 2; j ++ ) { - PIX_SET_Y( 2*j + 0, 2*i + 0, + PIX_SET_Y( 2*j + 0, 2*i + 0, p_context->codebook_v1[i_strip][i_index].i_y[2*i+j] ); - PIX_SET_Y( 2*j + 1, 2*i + 0, + PIX_SET_Y( 2*j + 1, 2*i + 0, p_context->codebook_v1[i_strip][i_index].i_y[2*i+j] ); - PIX_SET_Y( 2*j + 0, 2*i + 1, + PIX_SET_Y( 2*j + 0, 2*i + 1, p_context->codebook_v1[i_strip][i_index].i_y[2*i+j] ); - PIX_SET_Y( 2*j + 1, 2*i + 1, + PIX_SET_Y( 2*j + 1, 2*i + 1, p_context->codebook_v1[i_strip][i_index].i_y[2*i+j] ); - PIX_SET_UV( 1,p_dst_u, j, i, + PIX_SET_UV( 1,p_dst_u, j, i, p_context->codebook_v1[i_strip][i_index].i_u ); - PIX_SET_UV( 2,p_dst_v, j, i, + PIX_SET_UV( 2,p_dst_v, j, i, p_context->codebook_v1[i_strip][i_index].i_v ); } } @@ -413,8 +413,8 @@ static void cinepak_Getv1( cinepak_context_t *p_context, /***************************************************************************** * The function that decode one frame *****************************************************************************/ -static int cinepak_decode_frame( cinepak_context_t *p_context, - int i_length, u8 *p_data ) +static int cinepak_decode_frame( cinepak_context_t *p_context, + int i_length, uint8_t *p_data ) { int i_strip; @@ -459,7 +459,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, p_context->i_height = i_height; p_context->i_stride[0] = ( i_width + 3 ) & 0xfffc; - p_context->i_stride[1] = p_context->i_stride[2] = + p_context->i_stride[1] = p_context->i_stride[2] = p_context->i_stride[0] / 2; p_context->i_lines[0] = ( i_height + 3 ) & 0xfffc; @@ -468,7 +468,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, for( i = 0; i < 3; i++ ) { - p_context->p_pix[i] = malloc( p_context->i_stride[i] * + p_context->p_pix[i] = malloc( p_context->i_stride[i] * p_context->i_lines[i] ); /* Set it to all black */ memset( p_context->p_pix[i], ( i == 0 ) ? 0 : 128 , @@ -513,11 +513,11 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, /* init codebook , if needed */ if( ( i_strip > 0 )&&( !(i_frame_flags&0x01) ) ) { - memcpy( &p_context->codebook_v1[i_strip], + memcpy( &p_context->codebook_v1[i_strip], &p_context->codebook_v1[i_strip-1], sizeof(cinepak_codebook_t[256] ) ); - memcpy( &p_context->codebook_v4[i_strip], + memcpy( &p_context->codebook_v4[i_strip], &p_context->codebook_v4[i_strip-1], sizeof(cinepak_codebook_t[256] ) ); } @@ -530,19 +530,19 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, int i_chunk_id; int i_chunk_size; - u32 i_vector_flags; + uint32_t i_vector_flags; int i_count; int i; int i_x, i_y; /* (0,0) begin in fact at (x1,y1) ... */ i_chunk_id = GET2BYTES( p_data ); i_chunk_size = GET2BYTES( p_data ); - i_chunk_size = __MIN( i_chunk_size, i_strip_size ); + i_chunk_size = __MIN( i_chunk_size, i_strip_size ); i_strip_size -= i_chunk_size; i_chunk_size -= 4; - i_x = 0; + i_x = 0; i_y = 0; if( i_chunk_size < 0 ) { @@ -564,8 +564,8 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, for( i = 0; i < i_count; i++ ) { - cinepak_LoadCodebook( &((*p_codebook)[i_strip][i]), - p_data, + cinepak_LoadCodebook( &((*p_codebook)[i_strip][i]), + p_data, i_mode&~p_context->b_grayscale ); p_data += i_mode ? 6 : 4; i_chunk_size -= i_mode ? 6 : 4; @@ -627,7 +627,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, { cinepak_Getv4( p_context, i_strip, - i_strip_x1 + i_x, + i_strip_x1 + i_x, i_strip_y1 + i_y, i_strip_x2, i_strip_y2, p_data ); @@ -638,7 +638,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, { cinepak_Getv1( p_context, i_strip, - i_strip_x1 + i_x, + i_strip_x1 + i_x, i_strip_y1 + i_y, i_strip_x2, i_strip_y2, p_data ); @@ -654,13 +654,13 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, } i_vector_flags <<= 1; } - } + } break; case( 0x3100 ): /* load image Inter */ while( ( i_chunk_size > 4 )&&( i_y < i_strip_y2 - i_strip_y1) ) { - u32 i_mask; + uint32_t i_mask; i_vector_flags = GET4BYTES( p_data ); i_chunk_size -= 4; i_mask = 0x80000000UL; @@ -676,7 +676,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, if( i_chunk_size < 4 ) { break; - } + } i_vector_flags = GET4BYTES( p_data ); i_chunk_size -= 4; i_mask = 0x80000000UL; @@ -686,7 +686,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, if( i_chunk_size < 4 ) break; cinepak_Getv4( p_context, i_strip, - i_strip_x1 + i_x, + i_strip_x1 + i_x, i_strip_y1 + i_y, i_strip_x2, i_strip_y2, p_data ); @@ -698,7 +698,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, if( i_chunk_size < 1 ) break; cinepak_Getv1( p_context, i_strip, - i_strip_x1 + i_x, + i_strip_x1 + i_x, i_strip_y1 + i_y, i_strip_x2, i_strip_y2, p_data ); @@ -715,7 +715,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, i_y += 4; } } - } + } break; case( 0x3200 ): /* load intra picture but all v1*/ @@ -724,7 +724,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, { cinepak_Getv1( p_context, i_strip, - i_strip_x1 + i_x, + i_strip_x1 + i_x, i_strip_y1 + i_y, i_strip_x2, i_strip_y2, p_data ); @@ -737,7 +737,7 @@ static int cinepak_decode_frame( cinepak_context_t *p_context, i_x = 0; i_y += 4; } - } + } break; default: diff --git a/modules/codec/ffmpeg/ffmpeg.c b/modules/codec/ffmpeg/ffmpeg.c index 9b92b2f1bb..db2347abf9 100644 --- a/modules/codec/ffmpeg/ffmpeg.c +++ b/modules/codec/ffmpeg/ffmpeg.c @@ -2,7 +2,7 @@ * ffmpeg.c: video decoder using ffmpeg library ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: ffmpeg.c,v 1.53 2003/10/02 18:07:26 hartman Exp $ + * $Id: ffmpeg.c,v 1.54 2003/10/25 00:49:13 sam Exp $ * * Authors: Laurent Aimar * @@ -368,7 +368,7 @@ static void EndThread( generic_thread_t *p_decoder ) * locales Functions *****************************************************************************/ -int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes ) +int E_( GetPESData )( uint8_t *p_buf, int i_max, pes_packet_t *p_pes ) { int i_copy; int i_count; diff --git a/modules/codec/ffmpeg/ffmpeg.h b/modules/codec/ffmpeg/ffmpeg.h index dd34e1f9b0..6cc1bc5959 100644 --- a/modules/codec/ffmpeg/ffmpeg.h +++ b/modules/codec/ffmpeg/ffmpeg.h @@ -2,15 +2,15 @@ * ffmpeg_vdec.h: video decoder using ffmpeg library ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ffmpeg.h,v 1.25 2003/10/01 22:39:43 hartman Exp $ + * $Id: ffmpeg.h,v 1.26 2003/10/25 00:49:13 sam Exp $ * * Authors: Laurent Aimar - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -38,7 +38,7 @@ mtime_t pts; \ \ /* Private stuff for frame gathering */ \ - u8 *p_buffer; /* buffer for gather pes */ \ + uint8_t *p_buffer; /* buffer for gather pes */ \ int i_buffer_size; /* size of allocated p_buffer */ \ int i_buffer; /* bytes already present in p_buffer */ @@ -57,7 +57,7 @@ typedef struct generic_thread_s #define FREE( p ) if( p ) free( p ); p = NULL -int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes ); +int E_( GetPESData )( uint8_t *p_buf, int i_max, pes_packet_t *p_pes ); /***************************************************************************** * Video codec fourcc @@ -115,7 +115,7 @@ int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes ); #define FOURCC_3IVD VLC_FOURCC('3','I','V','D') #define FOURCC_3ivd VLC_FOURCC('3','i','v','d') -/* 3ivx delta 3.5 Unsupported */ +/* 3ivx delta 3.5 Unsupported */ #define FOURCC_3IV1 VLC_FOURCC('3','I','V','1') #define FOURCC_3iv1 VLC_FOURCC('3','i','v','1') @@ -156,12 +156,12 @@ int E_( GetPESData )( u8 *p_buf, int i_max, pes_packet_t *p_pes ); #define FOURCC_JPGL VLC_FOURCC( 'J', 'P', 'G', 'L' ) /* Microsoft Video 1 */ -#define FOURCC_MSVC VLC_FOURCC('M','S','V','C') -#define FOURCC_msvc VLC_FOURCC('m','s','v','c') -#define FOURCC_CRAM VLC_FOURCC('C','R','A','M') -#define FOURCC_cram VLC_FOURCC('c','r','a','m') -#define FOURCC_WHAM VLC_FOURCC('W','H','A','M') -#define FOURCC_wham VLC_FOURCC('w','h','a','m') +#define FOURCC_MSVC VLC_FOURCC('M','S','V','C') +#define FOURCC_msvc VLC_FOURCC('m','s','v','c') +#define FOURCC_CRAM VLC_FOURCC('C','R','A','M') +#define FOURCC_cram VLC_FOURCC('c','r','a','m') +#define FOURCC_WHAM VLC_FOURCC('W','H','A','M') +#define FOURCC_wham VLC_FOURCC('w','h','a','m') /* Windows Screen Video */ #define FOURCC_MSS1 VLC_FOURCC('M','S','S','1') diff --git a/modules/codec/ffmpeg/postprocessing/postprocessing.c b/modules/codec/ffmpeg/postprocessing/postprocessing.c index dc2871c0b9..c045e49c76 100644 --- a/modules/codec/ffmpeg/postprocessing/postprocessing.c +++ b/modules/codec/ffmpeg/postprocessing/postprocessing.c @@ -2,7 +2,7 @@ * postprocessing.c ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: postprocessing.c,v 1.3 2003/03/30 18:14:36 gbazin Exp $ + * $Id: postprocessing.c,v 1.4 2003/10/25 00:49:13 sam Exp $ * * Authors: Laurent Aimar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -36,7 +36,7 @@ static int Open ( vlc_object_t *p_this ); -static u32 pp_getmode( int i_quality, int b_autolevel ); +static uint32_t pp_getmode( int i_quality, int b_autolevel ); static int pp_postprocess( picture_t *, QT_STORE_T *, unsigned int, unsigned int i_mode ); @@ -73,14 +73,14 @@ static int Open ( vlc_object_t *p_this ) p_pp->pf_getmode = pp_getmode; p_pp->pf_postprocess = pp_postprocess; - + return VLC_SUCCESS; } -static u32 pp_getmode( int i_quality, int b_autolevel ) +static uint32_t pp_getmode( int i_quality, int b_autolevel ) { - u32 i_mode; + uint32_t i_mode; i_quality = i_quality < 0 ? 0 : i_quality; i_quality = i_quality > 6 ? 6 : i_quality; @@ -125,7 +125,7 @@ static u32 pp_getmode( int i_quality, int b_autolevel ) } /***************************************************************************** - * pp_postprocess : make post-filter as defined in MPEG4-ISO + * pp_postprocess : make post-filter as defined in MPEG4-ISO ***************************************************************************** *****************************************************************************/ @@ -168,12 +168,12 @@ static int pp_postprocess( picture_t *p_pic, if( i_mode&PP_DEBLOCK_C_V ) { E_( pp_deblock_V )( p_pic->U_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->U_PITCH, p_QP_store, i_QP_stride, 1 ); E_( pp_deblock_V )( p_pic->V_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->V_PITCH, p_QP_store, i_QP_stride, 1 ); @@ -181,36 +181,36 @@ static int pp_postprocess( picture_t *p_pic, if( i_mode&PP_DEBLOCK_C_H ) { E_( pp_deblock_H )( p_pic->U_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->U_PITCH, p_QP_store, i_QP_stride, 1 ); E_( pp_deblock_H )( p_pic->V_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->V_PITCH, p_QP_store, i_QP_stride, 1 ); } - - /* After deblocking do dering */ + + /* After deblocking do dering */ /* TODO check for min size */ - + if( i_mode&PP_DERING_Y ) { E_( pp_dering_Y )( p_pic->Y_PIXELS, - p_pic->p_heap->i_width, p_pic->p_heap->i_height, + p_pic->p_heap->i_width, p_pic->p_heap->i_height, p_pic->Y_PITCH, p_QP_store, i_QP_stride ); } if( i_mode&PP_DERING_C ) { E_( pp_dering_C )( p_pic->U_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->U_PITCH, p_QP_store, i_QP_stride ); E_( pp_dering_C )( p_pic->V_PIXELS, - p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, + p_pic->p_heap->i_width >> 1, p_pic->p_heap->i_height >> 1, p_pic->V_PITCH, p_QP_store, i_QP_stride ); diff --git a/modules/codec/ffmpeg/postprocessing/postprocessing.h b/modules/codec/ffmpeg/postprocessing/postprocessing.h index cc6a72adc2..d73745c192 100644 --- a/modules/codec/ffmpeg/postprocessing/postprocessing.h +++ b/modules/codec/ffmpeg/postprocessing/postprocessing.h @@ -2,15 +2,15 @@ * postprocessing.h ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: postprocessing.h,v 1.2 2002/11/10 02:47:27 fenrir Exp $ + * $Id: postprocessing.h,v 1.3 2003/10/25 00:49:14 sam Exp $ * * Authors: Laurent Aimar - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -44,10 +44,10 @@ typedef struct postprocessing_s { VLC_COMMON_MEMBERS - + module_t * p_module; - - u32 (*pf_getmode)( int i_quality, int b_autolevel ); + + uint32_t (*pf_getmode)( int i_quality, int b_autolevel ); int (*pf_postprocess)( picture_t *p_pic, QT_STORE_T *p_QP_store, unsigned int i_QP_stride, diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c index ce3b190a50..f6d7f66269 100755 --- a/modules/codec/libmpeg2.c +++ b/modules/codec/libmpeg2.c @@ -2,7 +2,7 @@ * libmpeg2.c: mpeg2 video decoder module making use of libmpeg2. ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: libmpeg2.c,v 1.30 2003/10/08 21:03:36 gbazin Exp $ + * $Id: libmpeg2.c,v 1.31 2003/10/25 00:49:13 sam Exp $ * * Authors: Gildas Bazin * Christophe Massiot @@ -11,7 +11,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -195,7 +195,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) return VLC_SUCCESS; } - if( p_block->b_discontinuity && p_sys->p_synchro + if( p_block->b_discontinuity && p_sys->p_synchro && p_sys->p_info->sequence->width != (unsigned)-1 ) { vout_SynchroReset( p_sys->p_synchro ); @@ -315,15 +315,15 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) msg_Err( p_dec, "cannot create vout" ); block_Release( p_block ); return -1; - } + } msg_Dbg( p_dec, "%dx%d, aspect %d, %u.%03u fps", p_sys->p_info->sequence->width, p_sys->p_info->sequence->height, i_aspect, - (uint32_t)((u64)1001000000 * 27 / - p_sys->p_info->sequence->frame_period / 1001), - (uint32_t)((u64)1001000000 * 27 / - p_sys->p_info->sequence->frame_period % 1001) ); + (uint32_t)((uint64_t)1001000000 * 27 / + p_sys->p_info->sequence->frame_period / 1001), + (uint32_t)((uint64_t)1001000000 * 27 / + p_sys->p_info->sequence->frame_period % 1001) ); mpeg2_custom_fbuf( p_sys->p_mpeg2dec, 1 ); @@ -468,7 +468,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) buf[0] = buf[1] = buf[2] = NULL; msg_Warn( p_dec, "invalid picture encountered" ); - if ( ( p_sys->p_info->current_picture == NULL ) || + if ( ( p_sys->p_info->current_picture == NULL ) || ( ( p_sys->p_info->current_picture->flags & PIC_MASK_CODING_TYPE) != B_CODING_TYPE ) ) { diff --git a/modules/codec/spudec/render.c b/modules/codec/spudec/render.c index 19b6fe33b0..3c345c1deb 100644 --- a/modules/codec/spudec/render.c +++ b/modules/codec/spudec/render.c @@ -2,7 +2,7 @@ * render.c : SPU renderer ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: render.c,v 1.5 2003/07/22 20:49:10 hartman Exp $ + * $Id: render.c,v 1.6 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * Rudolf Cornelissen @@ -12,7 +12,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -95,13 +95,13 @@ static void RenderI420( vout_thread_t *p_vout, picture_t *p_pic, const subpicture_t *p_spu, vlc_bool_t b_crop ) { /* Common variables */ - u8 *p_dest; - u8 *p_destptr; - u16 *p_source = (u16 *)p_spu->p_sys->p_data; + uint8_t *p_dest; + uint8_t *p_destptr; + uint16_t *p_source = (uint16_t *)p_spu->p_sys->p_data; int i_x, i_y; int i_len, i_color; - u16 i_colprecomp, i_destalpha; + uint16_t i_colprecomp, i_destalpha; /* Crop-specific */ int i_x_start, i_y_start, i_x_end, i_y_end; @@ -147,8 +147,8 @@ static void RenderI420( vout_thread_t *p_vout, picture_t *p_pic, /* To be able to divide by 16 (>>4) we add 1 to the alpha. * This means Alpha 0 won't be completely transparent, but * that's handled in a special case above anyway. */ - i_colprecomp = (u16)p_spu->p_sys->pi_yuv[i_color][0] - * (u16)(p_spu->p_sys->pi_alpha[i_color] + 1); + i_colprecomp = (uint16_t)p_spu->p_sys->pi_yuv[i_color][0] + * (uint16_t)(p_spu->p_sys->pi_alpha[i_color] + 1); i_destalpha = 15 - p_spu->p_sys->pi_alpha[i_color]; for ( p_destptr = p_dest - i_x - i_y; @@ -156,7 +156,7 @@ static void RenderI420( vout_thread_t *p_vout, picture_t *p_pic, p_destptr++ ) { *p_destptr = ( i_colprecomp + - (u16)*p_destptr * i_destalpha ) >> 4; + (uint16_t)*p_destptr * i_destalpha ) >> 4; } break; } @@ -168,9 +168,9 @@ static void RenderRV16( vout_thread_t *p_vout, picture_t *p_pic, const subpicture_t *p_spu, vlc_bool_t b_crop ) { /* Common variables */ - u16 p_clut16[4]; - u8 *p_dest; - u16 *p_source = (u16 *)p_spu->p_sys->p_data; + uint16_t p_clut16[4]; + uint8_t *p_dest; + uint16_t *p_source = (uint16_t *)p_spu->p_sys->p_data; int i_x, i_y; int i_len, i_color; @@ -186,7 +186,7 @@ static void RenderRV16( vout_thread_t *p_vout, picture_t *p_pic, for( i_color = 0; i_color < 4; i_color++ ) { p_clut16[i_color] = 0x1111 - * ( (u16)p_spu->p_sys->pi_yuv[i_color][0] >> 4 ); + * ( (uint16_t)p_spu->p_sys->pi_yuv[i_color][0] >> 4 ); } i_xscale = ( p_vout->output.i_width << 6 ) / p_vout->render.i_width; @@ -305,9 +305,9 @@ static void RenderRV32( vout_thread_t *p_vout, picture_t *p_pic, const subpicture_t *p_spu, vlc_bool_t b_crop ) { /* Common variables */ - u32 p_clut32[4]; - u8 *p_dest; - u16 *p_source = (u16 *)p_spu->p_sys->p_data; + uint32_t p_clut32[4]; + uint8_t *p_dest; + uint16_t *p_source = (uint16_t *)p_spu->p_sys->p_data; int i_x, i_y; int i_len, i_color; @@ -323,7 +323,7 @@ static void RenderRV32( vout_thread_t *p_vout, picture_t *p_pic, for( i_color = 0; i_color < 4; i_color++ ) { p_clut32[i_color] = 0x11111111 - * ( (u16)p_spu->p_sys->pi_yuv[i_color][0] >> 4 ); + * ( (uint16_t)p_spu->p_sys->pi_yuv[i_color][0] >> 4 ); } i_xscale = ( p_vout->output.i_width << 6 ) / p_vout->render.i_width; @@ -440,12 +440,12 @@ static void RenderYUY2( vout_thread_t *p_vout, picture_t *p_pic, const subpicture_t *p_spu, vlc_bool_t b_crop ) { /* Common variables */ - u8 *p_dest; - u16 *p_source = (u16 *)p_spu->p_sys->p_data; + uint8_t *p_dest; + uint16_t *p_source = (uint16_t *)p_spu->p_sys->p_data; int i_x, i_y; int i_len, i_color; - u8 i_cnt; + uint8_t i_cnt; /* Crop-specific */ int i_x_start, i_y_start, i_x_end, i_y_end; diff --git a/modules/codec/tarkin.c b/modules/codec/tarkin.c index f2b81c217c..1c6b82c1e6 100644 --- a/modules/codec/tarkin.c +++ b/modules/codec/tarkin.c @@ -2,7 +2,7 @@ * tarkin.c: tarkin decoder module making use of libtarkin. ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: tarkin.c,v 1.5 2003/09/02 20:19:25 gbazin Exp $ + * $Id: tarkin.c,v 1.6 2003/10/25 00:49:13 sam Exp $ * * Authors: Gildas Bazin * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -334,7 +334,7 @@ static void tarkin_CopyPicture( dec_thread_t *p_dec, picture_t *p_pic, uint8_t *p_src, int i_pitch ) { int i_plane, i_line, i_src_stride, i_dst_stride; - u8 *p_dst; + uint8_t *p_dst; for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ ) { diff --git a/modules/codec/theora.c b/modules/codec/theora.c index ac2462443c..2f81c7140d 100644 --- a/modules/codec/theora.c +++ b/modules/codec/theora.c @@ -2,7 +2,7 @@ * theora.c: theora decoder module making use of libtheora. ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: theora.c,v 1.12 2003/10/09 18:53:00 gbazin Exp $ + * $Id: theora.c,v 1.13 2003/10/25 00:49:13 sam Exp $ * * Authors: Gildas Bazin * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -218,7 +218,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) } p_sys->i_headers++; - + if( p_sys->b_packetizer ) { /* add a input for the stream ouput */ @@ -290,7 +290,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) return VLC_EGENERIC; } p_sys->i_headers++; - + ParseTheoraComments( p_dec ); if( p_sys->b_packetizer ) @@ -317,7 +317,7 @@ static int RunDecoder( decoder_t *p_dec, block_t *p_block ) return VLC_EGENERIC; } p_sys->i_headers++; - + if( !p_sys->b_packetizer ) { /* We have all the headers, initialize decoder */ @@ -498,7 +498,7 @@ static void theora_CopyPicture( decoder_t *p_dec, picture_t *p_pic, { int i_plane, i_line, i_width, i_dst_stride, i_src_stride; int i_src_xoffset, i_src_yoffset; - u8 *p_dst, *p_src; + uint8_t *p_dst, *p_src; for( i_plane = 0; i_plane < p_pic->i_planes; i_plane++ ) { @@ -513,7 +513,7 @@ static void theora_CopyPicture( decoder_t *p_dec, picture_t *p_pic, { i_src_xoffset /= 2; i_src_yoffset /= 2; - } + } p_src += (i_src_yoffset * i_src_stride + i_src_yoffset); diff --git a/modules/demux/mpeg/system.c b/modules/demux/mpeg/system.c index 3cd3154300..245cb3aeae 100644 --- a/modules/demux/mpeg/system.c +++ b/modules/demux/mpeg/system.c @@ -2,7 +2,7 @@ * system.c: helper module for TS, PS and PES management ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: system.c,v 1.17 2003/09/10 11:51:00 fenrir Exp $ + * $Id: system.c,v 1.18 2003/10/25 00:49:14 sam Exp $ * * Authors: Christophe Massiot * Michel Lespinasse @@ -485,7 +485,7 @@ static void GatherPES( input_thread_t * p_input, data_packet_t * p_data, if( p_data->p_payload_end - p_data->p_payload_start >= PES_HEADER_SIZE ) { - p_es->i_pes_real_size = ((u16)p_data->p_payload_start[4] << 8) + p_es->i_pes_real_size = ((uint16_t)p_data->p_payload_start[4] << 8) + p_data->p_payload_start[5]; if ( p_es->i_pes_real_size ) { @@ -534,9 +534,9 @@ static void GatherPES( input_thread_t * p_input, data_packet_t * p_data, /***************************************************************************** * GetID: Get the ID of a stream *****************************************************************************/ -static u16 GetID( data_packet_t * p_data ) +static uint16_t GetID( data_packet_t * p_data ) { - u16 i_id; + uint16_t i_id; i_id = p_data->p_demux_start[3]; /* stream_id */ if( i_id == 0xBD ) @@ -974,13 +974,13 @@ static es_descriptor_t * ParsePS( input_thread_t * p_input, *****************************************************************************/ static void DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) { - u32 i_code; - vlc_bool_t b_trash = 0; - es_descriptor_t * p_es = NULL; + uint32_t i_code; + vlc_bool_t b_trash = 0; + es_descriptor_t * p_es = NULL; - i_code = ((u32)p_data->p_demux_start[0] << 24) - | ((u32)p_data->p_demux_start[1] << 16) - | ((u32)p_data->p_demux_start[2] << 8) + i_code = ((uint32_t)p_data->p_demux_start[0] << 24) + | ((uint32_t)p_data->p_demux_start[1] << 16) + | ((uint32_t)p_data->p_demux_start[2] << 8) | p_data->p_demux_start[3]; if( i_code <= 0x1BC ) { @@ -989,8 +989,8 @@ static void DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) case 0x1BA: /* PACK_START_CODE */ { /* Read the SCR. */ - mtime_t scr_time; - u32 i_mux_rate; + mtime_t scr_time; + uint32_t i_mux_rate; if( (p_data->p_demux_start[4] & 0xC0) == 0x40 ) { @@ -1015,7 +1015,7 @@ static void DemuxPS( input_thread_t * p_input, data_packet_t * p_data ) >> 11); /* mux_rate */ - i_mux_rate = ((u32)U16_AT(p_header + 10) << 6) + i_mux_rate = ((uint32_t)U16_AT(p_header + 10) << 6) | (p_header[12] >> 2); /* FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME * This is the biggest kludge ever ! diff --git a/modules/demux/mpeg/system.h b/modules/demux/mpeg/system.h index bf71664416..dad8697fc4 100644 --- a/modules/demux/mpeg/system.h +++ b/modules/demux/mpeg/system.h @@ -2,7 +2,7 @@ * system.h: MPEG demultiplexing. ***************************************************************************** * Copyright (C) 1999-2002 VideoLAN - * $Id: system.h,v 1.9 2003/08/14 23:32:51 fenrir Exp $ + * $Id: system.h,v 1.10 2003/10/25 00:49:14 sam Exp $ * * Authors: Christophe Massiot * @@ -78,7 +78,7 @@ * Used by TS demux to handle a PSI, either with the builtin decoder, either * with a library such as libdvbpsi ****************************************************************************/ -typedef void( * psi_callback_t )( +typedef void( * psi_callback_t )( input_thread_t * p_input, data_packet_t * p_data, es_descriptor_t * p_es, @@ -113,19 +113,19 @@ typedef struct psi_section_t { byte_t buffer[PSI_SECTION_SIZE]; - u8 i_section_number; - u8 i_last_section_number; - u8 i_version_number; - u16 i_section_length; - u16 i_read_in_section; - + uint8_t i_section_number; + uint8_t i_last_section_number; + uint8_t i_version_number; + uint16_t i_section_length; + uint16_t i_read_in_section; + /* the PSI is complete */ vlc_bool_t b_is_complete; - + /* packet missed up ? */ vlc_bool_t b_trash; - /*about sections */ + /*about sections */ vlc_bool_t b_section_complete; /* where are we currently ? */ @@ -252,7 +252,7 @@ typedef struct es_ts_data_t *****************************************************************************/ typedef struct pgrm_ts_data_t { - u16 i_pcr_pid; /* PCR ES, for TS streams */ + uint16_t i_pcr_pid; /* PCR ES, for TS streams */ int i_pmt_version; /* libdvbpsi pmt decoder handle */ void * p_pmt_handle; @@ -281,7 +281,7 @@ typedef struct stream_ps_data_t { vlc_bool_t b_has_PSM; /* very rare, in fact */ - u8 i_PSM_version; + uint8_t i_PSM_version; } stream_ps_data_t; /* PSM version is 5 bits, so -1 is not a valid value */ diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c index 9f1430bb44..f59e00c457 100644 --- a/modules/demux/ogg.c +++ b/modules/demux/ogg.c @@ -2,15 +2,15 @@ * ogg.c : ogg stream input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: ogg.c,v 1.41 2003/10/23 16:48:45 gbazin Exp $ + * $Id: ogg.c,v 1.42 2003/10/25 00:49:14 sam Exp $ * * Authors: Gildas Bazin - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -39,7 +39,7 @@ #define OGG_BLOCK_SIZE 4096 /***************************************************************************** - * Definitions of structures and functions used by this plugins + * Definitions of structures and functions used by this plugins *****************************************************************************/ typedef struct logical_stream_s { @@ -107,7 +107,7 @@ typedef struct stream_header_video ogg_int32_t width; ogg_int32_t height; } stream_header_video; - + typedef struct stream_header_audio { ogg_int16_t channels; @@ -251,7 +251,7 @@ static void Ogg_ElemStreamStop( input_thread_t *p_input, ****************************************************************************/ static int Ogg_Check( input_thread_t *p_input ) { - u8 *p_peek; + uint8_t *p_peek; int i_size = input_Peek( p_input, &p_peek, 4 ); /* Check for the Ogg capture pattern */ @@ -910,7 +910,7 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg) sprintf( title, "Stream %d", p_ogg->i_streams ); p_cat = input_InfoCategory( p_input, title ); input_AddInfo( p_cat, _("Type"), _("Audio") ); - input_AddInfo( p_cat, _("Codec"), "%.4s", + input_AddInfo( p_cat, _("Codec"), "%.4s", (char *)&p_stream->i_fourcc ); input_AddInfo( p_cat, _("Sample Rate"), "%d", p_stream->p_wf->nSamplesPerSec ); @@ -933,7 +933,7 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg) } } else if( (*oggpacket.packet & PACKET_TYPE_BITS ) - == PACKET_TYPE_HEADER && + == PACKET_TYPE_HEADER && oggpacket.bytes >= (int)sizeof(stream_header)+1 ) { stream_header *st = (stream_header *)(oggpacket.packet+1); @@ -1083,7 +1083,7 @@ static int Ogg_FindLogicalStreams( input_thread_t *p_input, demux_sys_t *p_ogg) sprintf( title, "Stream %d", p_ogg->i_streams ); p_cat = input_InfoCategory( p_input, title ); input_AddInfo( p_cat, _("Type"), _("Audio") ); - input_AddInfo( p_cat, _("Codec"), "%.4s", + input_AddInfo( p_cat, _("Codec"), "%.4s", (char *)&p_stream->i_fourcc ); input_AddInfo( p_cat, _("Sample Rate"), "%d", p_stream->p_wf->nSamplesPerSec ); @@ -1386,7 +1386,7 @@ static void Ogg_EndOfStream( input_thread_t *p_input, demux_sys_t *p_ogg ) static void Deactivate( vlc_object_t *p_this ) { input_thread_t *p_input = (input_thread_t *)p_this; - demux_sys_t *p_ogg = (demux_sys_t *)p_input->p_demux_data ; + demux_sys_t *p_ogg = (demux_sys_t *)p_input->p_demux_data ; if( p_ogg ) { diff --git a/modules/demux/util/id3.c b/modules/demux/util/id3.c index d17e16ac45..4b7e1cbdb5 100644 --- a/modules/demux/util/id3.c +++ b/modules/demux/util/id3.c @@ -2,15 +2,15 @@ * id3.c: simple id3 tag skipper ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: id3.c,v 1.4 2003/07/13 12:52:40 sigmunau Exp $ + * $Id: id3.c,v 1.5 2003/10/25 00:49:14 sam Exp $ * * Authors: Sigmund Augdal - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -52,9 +52,9 @@ vlc_module_end(); static int SkipID3Tag( vlc_object_t *p_this ) { input_thread_t *p_input; - u8 *p_peek; + uint8_t *p_peek; int i_size; - u8 version, revision; + uint8_t version, revision; int b_footer; if ( p_this->i_object_type != VLC_OBJECT_INPUT ) @@ -64,7 +64,7 @@ static int SkipID3Tag( vlc_object_t *p_this ) p_input = (input_thread_t *)p_this; msg_Dbg( p_input, "Checking for ID3 tag" ); - /* get 10 byte id3 header */ + /* get 10 byte id3 header */ if( input_Peek( p_input, &p_peek, 10 ) < 10 ) { msg_Err( p_input, "cannot peek()" ); @@ -75,7 +75,7 @@ static int SkipID3Tag( vlc_object_t *p_this ) { return( VLC_SUCCESS ); } - + version = p_peek[3]; /* These may become usfull later, */ revision = p_peek[4]; /* but we ignore them for now */ b_footer = p_peek[5] & 0x10; diff --git a/modules/demux/util/id3tag.c b/modules/demux/util/id3tag.c index a9557a6ab6..bef087ee48 100644 --- a/modules/demux/util/id3tag.c +++ b/modules/demux/util/id3tag.c @@ -2,15 +2,15 @@ * id3tag.c: id3 tag parser/skipper based on libid3tag ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: id3tag.c,v 1.12 2003/10/20 01:07:28 hartman Exp $ + * $Id: id3tag.c,v 1.13 2003/10/25 00:49:14 sam Exp $ * * Authors: Sigmund Augdal - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -51,13 +51,13 @@ set_callbacks( ParseID3Tags, NULL ); vlc_module_end(); /***************************************************************************** - * Definitions of structures and functions used by this plugins + * Definitions of structures and functions used by this plugins *****************************************************************************/ /***************************************************************************** * ParseID3Tag : parse an id3tag into the info structures *****************************************************************************/ -static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size ) +static void ParseID3Tag( input_thread_t *p_input, uint8_t *p_data, int i_size ) { playlist_t * p_playlist; struct id3_tag * p_id3_tag; @@ -67,7 +67,7 @@ static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size ) char * psz_temp; int i; vlc_value_t val; - + var_Get( p_input, "demuxed-id3", &val ); if( val.b_bool ) @@ -75,11 +75,11 @@ static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size ) msg_Dbg( p_input, "The ID3 tag was already parsed" ); return; } - + p_id3_tag = id3_tag_parse( p_data, i_size ); p_category = input_InfoCategory( p_input, "ID3" ); i = 0; - + while ( ( p_frame = id3_tag_findframe( p_id3_tag , "T", i ) ) ) { i_strings = id3_field_getnstrings( &p_frame->fields[1] ); @@ -124,7 +124,7 @@ static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size ) { input_AddInfo( p_category, (char *)p_frame->description, psz_temp ); } - free( psz_temp ); + free( psz_temp ); } i++; } @@ -140,7 +140,7 @@ static void ParseID3Tag( input_thread_t *p_input, u8 *p_data, int i_size ) static int ParseID3Tags( vlc_object_t *p_this ) { input_thread_t *p_input; - u8 *p_peek; + uint8_t *p_peek; int i_size; int i_size2; @@ -154,7 +154,7 @@ static int ParseID3Tags( vlc_object_t *p_this ) if ( p_input->stream.b_seekable && p_input->stream.i_method != INPUT_METHOD_NETWORK ) - { + { stream_position_t pos; /*look for a id3v1 tag at the end of the file*/ @@ -163,8 +163,8 @@ static int ParseID3Tags( vlc_object_t *p_this ) { input_AccessReinit( p_input ); p_input->pf_seek( p_input, pos.i_size - 128 ); - - /* get 10 byte id3 header */ + + /* get 10 byte id3 header */ if( input_Peek( p_input, &p_peek, 10 ) < 10 ) { msg_Err( p_input, "cannot peek()" ); @@ -183,7 +183,7 @@ static int ParseID3Tags( vlc_object_t *p_this ) } /* look for id3v2.4 tag at end of file */ - /* get 10 byte id3 footer */ + /* get 10 byte id3 footer */ if( input_Peek( p_input, &p_peek, 128 ) < 128 ) { msg_Err( p_input, "cannot peek()" ); @@ -203,10 +203,10 @@ static int ParseID3Tags( vlc_object_t *p_this ) ParseID3Tag( p_input, p_peek, i_size2 ); } } - input_AccessReinit( p_input ); + input_AccessReinit( p_input ); p_input->pf_seek( p_input, 0 ); } - /* get 10 byte id3 header */ + /* get 10 byte id3 header */ if( input_Peek( p_input, &p_peek, 10 ) < 10 ) { msg_Err( p_input, "cannot peek()" ); diff --git a/modules/gui/beos/VideoOutput.cpp b/modules/gui/beos/VideoOutput.cpp index e2f361b16f..865507b650 100644 --- a/modules/gui/beos/VideoOutput.cpp +++ b/modules/gui/beos/VideoOutput.cpp @@ -2,7 +2,7 @@ * vout_beos.cpp: beos video output display method ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: VideoOutput.cpp,v 1.22 2003/06/19 18:44:16 titer Exp $ + * $Id: VideoOutput.cpp,v 1.23 2003/10/25 00:49:14 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -14,7 +14,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -66,11 +66,11 @@ struct vout_sys_t { VideoWindow * p_window; - s32 i_width; - s32 i_height; + int32_t i_width; + int32_t i_height; -// u8 *pp_buffer[3]; - u32 source_chroma; +// uint8_t *pp_buffer[3]; + uint32_t source_chroma; int i_index; }; @@ -86,9 +86,9 @@ struct vout_sys_t BWindow* beos_GetAppWindow(char *name) { - int32 index; + int32_t index; BWindow *window; - + for (index = 0 ; ; index++) { window = be_app->WindowAt(index); @@ -104,7 +104,7 @@ beos_GetAppWindow(char *name) window->Unlock(); } } - return window; + return window; } /***************************************************************************** @@ -135,7 +135,7 @@ class BackgroundView : public BView // let him handle it fVideoView->MouseDown(where); } - virtual void MouseMoved(BPoint where, uint32 transit, + virtual void MouseMoved(BPoint where, uint32_t transit, const BMessage* dragMessage) { // convert coordinates @@ -164,11 +164,11 @@ VideoSettings::VideoSettings() status_t ret = load_settings( fSettings, "video_settings", "VideoLAN Client" ); if ( ret == B_OK ) { - uint32 flags; - if ( fSettings->FindInt32( "flags", (int32*)&flags ) == B_OK ) + uint32_t flags; + if ( fSettings->FindInt32( "flags", (int32_t*)&flags ) == B_OK ) SetFlags( flags ); - uint32 size; - if ( fSettings->FindInt32( "video size", (int32*)&size ) == B_OK ) + uint32_t size; + if ( fSettings->FindInt32( "video size", (int32_t*)&size ) == B_OK ) SetVideoSize( size ); } else @@ -179,10 +179,10 @@ VideoSettings::VideoSettings() BScreen screen(B_MAIN_SCREEN_ID); if (screen.IsValid()) { - display_mode mode; - screen.GetMode(&mode); + display_mode mode; + screen.GetMode(&mode); float refresh = (mode.timing.pixel_clock * 1000) - / ((mode.timing.h_total)* (mode.timing.v_total)); + / ((mode.timing.h_total)* (mode.timing.v_total)); if (refresh < MIN_AUTO_VSYNC_REFRESH) AddFlags(FLAG_SYNC_RETRACE); } @@ -234,7 +234,7 @@ VideoSettings::DefaultSettings() * VideoSettings::SetVideoSize *****************************************************************************/ void -VideoSettings::SetVideoSize( uint32 mode ) +VideoSettings::SetVideoSize( uint32_t mode ) { fVideoSize = mode; } @@ -263,7 +263,7 @@ VideoWindow::VideoWindow(int v_width, int v_height, BRect frame, fSettings(new VideoSettings(*VideoSettings::DefaultSettings())) { p_vout = p_videoout; - + // create the view to do the display view = new VLCView( Bounds(), p_vout ); @@ -273,7 +273,7 @@ VideoWindow::VideoWindow(int v_width, int v_height, BRect frame, mainView->AddChild(view); // allocate bitmap buffers - for (int32 i = 0; i < 3; i++) + for (int32_t i = 0; i < 3; i++) bitmap[i] = NULL; fInitStatus = _AllocateBuffers(v_width, v_height, &mode); @@ -288,7 +288,7 @@ VideoWindow::VideoWindow(int v_width, int v_height, BRect frame, SetSizeLimits((i_width * r.min_width_scale), i_width * r.max_width_scale, (i_height * r.min_height_scale), i_height * r.max_height_scale); } - + // vlc settings override settings from disk if (config_GetInt(p_vout, "fullscreen")) fSettings->AddFlags(VideoSettings::FLAG_FULL_SCREEN); @@ -298,19 +298,19 @@ VideoWindow::VideoWindow(int v_width, int v_height, BRect frame, AddShortcut( '1', 0, new BMessage( RESIZE_50 ) ); AddShortcut( '2', 0, new BMessage( RESIZE_100 ) ); AddShortcut( '3', 0, new BMessage( RESIZE_200 ) ); - + // workaround for french keyboards AddShortcut( '&', 0, new BMessage( RESIZE_50 ) ); AddShortcut( 'é', 0, new BMessage( RESIZE_100 ) ); // FIXME - this one doesn't work because 'é' is a multi-byte character AddShortcut( '"', 0, new BMessage( RESIZE_200 ) ); - + _SetToSettings(); } VideoWindow::~VideoWindow() { - int32 result; + int32_t result; teardownwindow = true; wait_for_thread(fDrawThreadID, &result); @@ -345,7 +345,7 @@ VideoWindow::MessageReceived( BMessage *p_message ) case WINDOW_FEEL: { window_feel winFeel; - if (p_message->FindInt32("WinFeel", (int32*)&winFeel) == B_OK) + if (p_message->FindInt32("WinFeel", (int32_t*)&winFeel) == B_OK) { SetFeel(winFeel); fCachedFeel = winFeel; @@ -371,13 +371,13 @@ VideoWindow::MessageReceived( BMessage *p_message ) BBitmap* temp = new BBitmap( current->Bounds(), current->ColorSpace() ); if ( temp && temp->IsValid() ) { - int32 height = (int32)current->Bounds().Height(); - uint8* dst = (uint8*)temp->Bits(); - uint8* src = (uint8*)current->Bits(); - int32 dstBpr = temp->BytesPerRow(); - int32 srcBpr = current->BytesPerRow(); - int32 validBytes = dstBpr > srcBpr ? srcBpr : dstBpr; - for ( int32 y = 0; y < height; y++ ) + int32_t height = (int32_t)current->Bounds().Height(); + uint8_t* dst = (uint8_t*)temp->Bits(); + uint8_t* src = (uint8_t*)current->Bits(); + int32_t dstBpr = temp->BytesPerRow(); + int32_t srcBpr = current->BytesPerRow(); + int32_t validBytes = dstBpr > srcBpr ? srcBpr : dstBpr; + for ( int32_t y = 0; y < height; y++ ) { memcpy( dst, src, validBytes ); dst += dstBpr; @@ -390,7 +390,7 @@ VideoWindow::MessageReceived( BMessage *p_message ) /* FIXME - we should check which translators are actually available */ char * psz_format = config_GetPsz( p_vout, "beos-screenshotformat" ); - int32 format = DEFAULT_SCREEN_SHOT_FORMAT; + int32_t format = DEFAULT_SCREEN_SHOT_FORMAT; if( !strcmp( psz_format, "TGA" ) ) format = 'TGA '; else if( !strcmp( psz_format, "PPM" ) ) @@ -427,7 +427,7 @@ VideoWindow::Zoom(BPoint origin, float width, float height ) * VideoWindow::FrameMoved *****************************************************************************/ void -VideoWindow::FrameMoved(BPoint origin) +VideoWindow::FrameMoved(BPoint origin) { if (IsFullScreen()) return ; @@ -440,8 +440,8 @@ VideoWindow::FrameMoved(BPoint origin) void VideoWindow::FrameResized( float width, float height ) { - int32 useWidth = CorrectAspectRatio() ? i_width : fTrueWidth; - int32 useHeight = CorrectAspectRatio() ? i_height : fTrueHeight; + int32_t useWidth = CorrectAspectRatio() ? i_width : fTrueWidth; + int32_t useHeight = CorrectAspectRatio() ? i_height : fTrueHeight; float out_width, out_height; float out_left, out_top; float width_scale = width / useWidth; @@ -451,7 +451,7 @@ VideoWindow::FrameResized( float width, float height ) { out_width = (useWidth * width_scale); out_height = (useHeight * width_scale); - out_left = 0; + out_left = 0; out_top = (height - out_height) / 2; } else /* if the height is proportionally smaller */ @@ -475,10 +475,10 @@ void VideoWindow::ScreenChanged(BRect frame, color_space format) { BScreen screen(this); - display_mode mode; - screen.GetMode(&mode); + display_mode mode; + screen.GetMode(&mode); float refresh = (mode.timing.pixel_clock * 1000) - / ((mode.timing.h_total) * (mode.timing.v_total)); + / ((mode.timing.h_total) * (mode.timing.v_total)); SetSyncToRetrace(refresh < MIN_AUTO_VSYNC_REFRESH); } @@ -510,7 +510,7 @@ VideoWindow::drawBuffer(int bufferIndex) if (mode == OVERLAY) { rgb_color key; - view->SetViewOverlay(bitmap[i_buffer], + view->SetViewOverlay(bitmap[i_buffer], bitmap[i_buffer]->Bounds() , view->Bounds(), &key, B_FOLLOW_ALL, @@ -674,12 +674,12 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode) for (int i = 0; i < COLOR_COUNT; i++) { if (noOverlay) break; - bitmap[0] = new BBitmap ( bitmapFrame, + bitmap[0] = new BBitmap ( bitmapFrame, B_BITMAP_WILL_OVERLAY | B_BITMAP_RESERVE_OVERLAY_CHANNEL, colspace[i].colspace); - if(bitmap[0] && bitmap[0]->InitCheck() == B_OK) + if(bitmap[0] && bitmap[0]->InitCheck() == B_OK) { colspace_index = i; @@ -691,7 +691,7 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode) { *mode = OVERLAY; rgb_color key; - view->SetViewOverlay(bitmap[0], + view->SetViewOverlay(bitmap[0], bitmap[0]->Bounds() , view->Bounds(), &key, B_FOLLOW_ALL, @@ -721,7 +721,7 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode) } // see if everything went well status_t status = B_ERROR; - for (int32 i = 0; i < 3; i++) + for (int32_t i = 0; i < 3; i++) { if (bitmap[i]) status = bitmap[i]->InitCheck(); @@ -731,7 +731,7 @@ VideoWindow::_AllocateBuffers(int width, int height, int* mode) if (status >= B_OK) { // clear bitmaps to black - for (int32 i = 0; i < 3; i++) + for (int32_t i = 0; i < 3; i++) _BlankBitmap(bitmap[i]); } return status; @@ -760,22 +760,22 @@ VideoWindow::_BlankBitmap(BBitmap* bitmap) const { // no error checking (we do that earlier on and since it's a private function... - // YCbCr: + // YCbCr: // Loss/Saturation points are Y 16-235 (absoulte); Cb/Cr 16-240 (center 128) - // YUV: + // YUV: // Extrema points are Y 0 - 207 (absolute) U -91 - 91 (offset 128) V -127 - 127 (offset 128) // we only handle weird colorspaces with special care switch (bitmap->ColorSpace()) { case B_YCbCr422: { // Y0[7:0] Cb0[7:0] Y1[7:0] Cr0[7:0] Y2[7:0] Cb2[7:0] Y3[7:0] Cr2[7:0] - int32 height = bitmap->Bounds().IntegerHeight() + 1; - uint8* bits = (uint8*)bitmap->Bits(); - int32 bpr = bitmap->BytesPerRow(); - for (int32 y = 0; y < height; y++) { + int32_t height = bitmap->Bounds().IntegerHeight() + 1; + uint8_t* bits = (uint8_t*)bitmap->Bits(); + int32_t bpr = bitmap->BytesPerRow(); + for (int32_t y = 0; y < height; y++) { // handle 2 bytes at a time - for (int32 i = 0; i < bpr; i += 2) { + for (int32_t i = 0; i < bpr; i += 2) { // offset into line bits[i] = 16; bits[i + 1] = 128; @@ -789,12 +789,12 @@ VideoWindow::_BlankBitmap(BBitmap* bitmap) const // TODO: untested!! // Non-interlaced only, Cb0 Y0 Y1 Cb2 Y2 Y3 on even scan lines ... // Cr0 Y0 Y1 Cr2 Y2 Y3 on odd scan lines - int32 height = bitmap->Bounds().IntegerHeight() + 1; - uint8* bits = (uint8*)bitmap->Bits(); - int32 bpr = bitmap->BytesPerRow(); - for (int32 y = 0; y < height; y += 1) { + int32_t height = bitmap->Bounds().IntegerHeight() + 1; + uint8_t* bits = (uint8_t*)bitmap->Bits(); + int32_t bpr = bitmap->BytesPerRow(); + for (int32_t y = 0; y < height; y += 1) { // handle 3 bytes at a time - for (int32 i = 0; i < bpr; i += 3) { + for (int32_t i = 0; i < bpr; i += 3) { // offset into line bits[i] = 128; bits[i + 1] = 16; @@ -808,12 +808,12 @@ VideoWindow::_BlankBitmap(BBitmap* bitmap) const case B_YUV422: { // TODO: untested!! // U0[7:0] Y0[7:0] V0[7:0] Y1[7:0] U2[7:0] Y2[7:0] V2[7:0] Y3[7:0] - int32 height = bitmap->Bounds().IntegerHeight() + 1; - uint8* bits = (uint8*)bitmap->Bits(); - int32 bpr = bitmap->BytesPerRow(); - for (int32 y = 0; y < height; y += 1) { + int32_t height = bitmap->Bounds().IntegerHeight() + 1; + uint8_t* bits = (uint8_t*)bitmap->Bits(); + int32_t bpr = bitmap->BytesPerRow(); + for (int32_t y = 0; y < height; y += 1) { // handle 2 bytes at a time - for (int32 i = 0; i < bpr; i += 2) { + for (int32_t i = 0; i < bpr; i += 2) { // offset into line bits[i] = 128; bits[i + 1] = 0; @@ -833,11 +833,11 @@ VideoWindow::_BlankBitmap(BBitmap* bitmap) const * VideoWindow::_SetVideoSize *****************************************************************************/ void -VideoWindow::_SetVideoSize(uint32 mode) +VideoWindow::_SetVideoSize(uint32_t mode) { // let size depend on aspect correction - int32 width = CorrectAspectRatio() ? i_width : fTrueWidth; - int32 height = CorrectAspectRatio() ? i_height : fTrueHeight; + int32_t width = CorrectAspectRatio() ? i_width : fTrueWidth; + int32_t height = CorrectAspectRatio() ? i_height : fTrueHeight; switch (mode) { case RESIZE_50: @@ -863,7 +863,7 @@ void VideoWindow::_SetToSettings() { // adjust dimensions - uint32 mode = RESIZE_100; + uint32_t mode = RESIZE_100; switch (fSettings->VideoSize()) { case VideoSettings::SIZE_50: @@ -895,7 +895,7 @@ VideoWindow::_SetToSettings() *****************************************************************************/ void VideoWindow::_SaveScreenShot( BBitmap* bitmap, char* path, - uint32 translatorID ) const + uint32_t translatorID ) const { // make the info object from the parameters screen_shot_info* info = new screen_shot_info; @@ -916,7 +916,7 @@ VideoWindow::_SaveScreenShot( BBitmap* bitmap, char* path, /***************************************************************************** * VideoWindow::_save_screen_shot *****************************************************************************/ -int32 +int32_t VideoWindow::_save_screen_shot( void* cookie ) { screen_shot_info* info = (screen_shot_info*)cookie; @@ -931,7 +931,7 @@ VideoWindow::_save_screen_shot( void* cookie ) create_directory( folder.String(), 0777 ); path << "/vlc screenshot"; BEntry entry( path.String() ); - int32 appendedNumber = 0; + int32_t appendedNumber = 0; if ( entry.Exists() && !entry.IsSymLink() ) { // we would clobber an existing entry @@ -962,42 +962,42 @@ VideoWindow::_save_screen_shot( void* cookie ) if ( status == B_OK ) { BTranslatorRoster* roster = BTranslatorRoster::Default(); - uint32 imageFormat = 0; + uint32_t imageFormat = 0; translator_id translator = 0; bool found = false; // find suitable translator translator_id* ids = NULL; - int32 count = 0; + int32_t count = 0; status = roster->GetAllTranslators( &ids, &count ); if ( status >= B_OK ) { for ( int tix = 0; tix < count; tix++ ) - { - const translation_format *formats = NULL; - int32 num_formats = 0; - bool ok = false; + { + const translation_format *formats = NULL; + int32_t num_formats = 0; + bool ok = false; status = roster->GetInputFormats( ids[tix], &formats, &num_formats ); if (status >= B_OK) { for ( int iix = 0; iix < num_formats; iix++ ) - { + { if ( formats[iix].type == B_TRANSLATOR_BITMAP ) - { - ok = true; - break; + { + ok = true; + break; } } } if ( !ok ) - continue; + continue; status = roster->GetOutputFormats( ids[tix], - &formats, &num_formats); + &formats, &num_formats); if ( status >= B_OK ) { - for ( int32 oix = 0; oix < num_formats; oix++ ) + for ( int32_t oix = 0; oix < num_formats; oix++ ) { if ( formats[oix].type != B_TRANSLATOR_BITMAP ) { @@ -1028,20 +1028,20 @@ VideoWindow::_save_screen_shot( void* cookie ) BNodeInfo nodeInfo( &outFile ); if ( nodeInfo.InitCheck() == B_OK ) { - translation_format* formats; - int32 count; + translation_format* formats; + int32_t count; status = roster->GetOutputFormats( translator, (const translation_format **) &formats, &count); if ( status >= B_OK ) { - const char * mime = NULL; + const char * mime = NULL; for ( int ix = 0; ix < count; ix++ ) { if ( formats[ix].type == imageFormat ) { mime = formats[ix].MIME; break; } - } + } if ( mime ) nodeInfo.SetType( mime ); } @@ -1105,10 +1105,10 @@ VLCView::MouseDown(BPoint where) { VideoWindow* videoWindow = dynamic_cast(Window()); BMessage* msg = Window()->CurrentMessage(); - int32 clicks; - uint32 buttons; + int32_t clicks; + uint32_t buttons; msg->FindInt32("clicks", &clicks); - msg->FindInt32("buttons", (int32*)&buttons); + msg->FindInt32("buttons", (int32_t*)&buttons); if (videoWindow) { @@ -1122,7 +1122,7 @@ VLCView::MouseDown(BPoint where) } else { - if (buttons & B_SECONDARY_MOUSE_BUTTON) + if (buttons & B_SECONDARY_MOUSE_BUTTON) { // clicks will be 2 next time (if interval short enough) // even if the first click and the second @@ -1167,19 +1167,19 @@ VLCView::MouseDown(BPoint where) // Windwo Feel Items /* BMessage *winNormFeel = new BMessage(WINDOW_FEEL); - winNormFeel->AddInt32("WinFeel", (int32)B_NORMAL_WINDOW_FEEL); + winNormFeel->AddInt32("WinFeel", (int32_t)B_NORMAL_WINDOW_FEEL); BMenuItem *normWindItem = new BMenuItem("Normal Window", winNormFeel); normWindItem->SetMarked(videoWindow->Feel() == B_NORMAL_WINDOW_FEEL); menu->AddItem(normWindItem); BMessage *winFloatFeel = new BMessage(WINDOW_FEEL); - winFloatFeel->AddInt32("WinFeel", (int32)B_FLOATING_APP_WINDOW_FEEL); + winFloatFeel->AddInt32("WinFeel", (int32_t)B_FLOATING_APP_WINDOW_FEEL); BMenuItem *onTopWindItem = new BMenuItem("App Top", winFloatFeel); onTopWindItem->SetMarked(videoWindow->Feel() == B_FLOATING_APP_WINDOW_FEEL); menu->AddItem(onTopWindItem); BMessage *winAllFeel = new BMessage(WINDOW_FEEL); - winAllFeel->AddInt32("WinFeel", (int32)B_FLOATING_ALL_WINDOW_FEEL); + winAllFeel->AddInt32("WinFeel", (int32_t)B_FLOATING_ALL_WINDOW_FEEL); BMenuItem *allSpacesWindItem = new BMenuItem("On Top All Workspaces", winAllFeel); allSpacesWindItem->SetMarked(videoWindow->Feel() == B_FLOATING_ALL_WINDOW_FEEL); menu->AddItem(allSpacesWindItem);*/ @@ -1187,7 +1187,7 @@ VLCView::MouseDown(BPoint where) BMessage *windowFeelMsg = new BMessage( WINDOW_FEEL ); bool onTop = videoWindow->Feel() == B_FLOATING_ALL_WINDOW_FEEL; window_feel feel = onTop ? B_NORMAL_WINDOW_FEEL : B_FLOATING_ALL_WINDOW_FEEL; - windowFeelMsg->AddInt32( "WinFeel", (int32)feel ); + windowFeelMsg->AddInt32( "WinFeel", (int32_t)feel ); BMenuItem *windowFeelItem = new BMenuItem( _("Stay On Top"), windowFeelMsg ); windowFeelItem->SetMarked( onTop ); menu->AddItem( windowFeelItem ); @@ -1225,7 +1225,7 @@ VLCView::MouseUp( BPoint where ) * VLCVIew::MouseMoved *****************************************************************************/ void -VLCView::MouseMoved(BPoint point, uint32 transit, const BMessage* dragMessage) +VLCView::MouseMoved(BPoint point, uint32_t transit, const BMessage* dragMessage) { fLastMouseMovedTime = system_time(); fCursorHidden = false; @@ -1247,7 +1247,7 @@ VLCView::MouseMoved(BPoint point, uint32 transit, const BMessage* dragMessage) /***************************************************************************** * VLCVIew::Pulse *****************************************************************************/ -void +void VLCView::Pulse() { // We are getting the pulse messages no matter if the mouse is over @@ -1274,10 +1274,10 @@ VLCView::Pulse() system_time() - fLastMouseMovedTime > 29000000 ) { BPoint where; - uint32 buttons; + uint32_t buttons; GetMouse(&where, &buttons, false); ConvertToScreen(&where); - set_mouse_position((int32) where.x, (int32) where.y); + set_mouse_position((int32_t) where.x, (int32_t) where.y); } } @@ -1285,12 +1285,12 @@ VLCView::Pulse() * VLCVIew::KeyDown *****************************************************************************/ void -VLCView::KeyDown(const char *bytes, int32 numBytes) +VLCView::KeyDown(const char *bytes, int32_t numBytes) { VideoWindow *videoWindow = dynamic_cast(Window()); BWindow* interfaceWindow = get_interface_window(); if (videoWindow && numBytes > 0) { - uint32 mods = modifiers(); + uint32_t mods = modifiers(); switch (*bytes) { case B_TAB: case 'f': @@ -1356,7 +1356,7 @@ VLCView::KeyDown(const char *bytes, int32 numBytes) * VLCVIew::Draw *****************************************************************************/ void -VLCView::Draw(BRect updateRect) +VLCView::Draw(BRect updateRect) { VideoWindow* window = dynamic_cast( Window() ); if ( window && window->mode == BITMAP ) @@ -1452,17 +1452,17 @@ int Init( vout_thread_t *p_vout ) { return 0; } - p_pic->p->p_pixels = (u8*)p_vout->p_sys->p_window->bitmap[buffer_index]->Bits(); + p_pic->p->p_pixels = (uint8_t*)p_vout->p_sys->p_window->bitmap[buffer_index]->Bits(); p_pic->p->i_lines = p_vout->p_sys->i_height; p_pic->p->i_pixel_pitch = colspace[p_vout->p_sys->p_window->colspace_index].pixel_bytes; p_pic->i_planes = colspace[p_vout->p_sys->p_window->colspace_index].planes; - p_pic->p->i_pitch = p_vout->p_sys->p_window->bitmap[buffer_index]->BytesPerRow(); + p_pic->p->i_pitch = p_vout->p_sys->p_window->bitmap[buffer_index]->BytesPerRow(); p_pic->p->i_visible_pitch = p_pic->p->i_pixel_pitch * ( p_vout->p_sys->p_window->bitmap[buffer_index]->Bounds().IntegerWidth() + 1 ); p_pic->i_status = DESTROYED_PICTURE; p_pic->i_type = DIRECT_PICTURE; - + PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; I_OUTPUTPICTURES++; @@ -1501,14 +1501,14 @@ void Display( vout_thread_t *p_vout, picture_t *p_pic ) { VideoWindow * p_win = p_vout->p_sys->p_window; - /* draw buffer if required */ + /* draw buffer if required */ if (!p_win->teardownwindow) - { + { p_win->drawBuffer(p_vout->p_sys->i_index); } /* change buffer */ p_vout->p_sys->i_index = ++p_vout->p_sys->i_index % 3; - p_pic->p->p_pixels = (u8*)p_vout->p_sys->p_window->bitmap[p_vout->p_sys->i_index]->Bits(); + p_pic->p->p_pixels = (uint8_t*)p_vout->p_sys->p_window->bitmap[p_vout->p_sys->i_index]->Bits(); } /* following functions are local */ @@ -1517,12 +1517,12 @@ void Display( vout_thread_t *p_vout, picture_t *p_pic ) * BeosOpenDisplay: open and initialize BeOS device *****************************************************************************/ static int BeosOpenDisplay( vout_thread_t *p_vout ) -{ +{ p_vout->p_sys->p_window = new VideoWindow( p_vout->p_sys->i_width - 1, p_vout->p_sys->i_height - 1, BRect( 20, 50, - 20 + p_vout->i_window_width - 1, + 20 + p_vout->i_window_width - 1, 50 + p_vout->i_window_height - 1 ), p_vout ); if( p_vout->p_sys->p_window == NULL ) @@ -1534,7 +1534,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) { p_vout->p_sys->p_window->Show(); } - + return( 0 ); } @@ -1545,7 +1545,7 @@ static int BeosOpenDisplay( vout_thread_t *p_vout ) * state of the device. *****************************************************************************/ static void BeosCloseDisplay( vout_thread_t *p_vout ) -{ +{ VideoWindow * p_win = p_vout->p_sys->p_window; /* Destroy the video window */ if( p_win != NULL && !p_win->teardownwindow) diff --git a/modules/gui/beos/VideoWindow.h b/modules/gui/beos/VideoWindow.h index a9d185f4cc..2222fa3efa 100644 --- a/modules/gui/beos/VideoWindow.h +++ b/modules/gui/beos/VideoWindow.h @@ -2,7 +2,7 @@ * VideoWindow.h: BeOS video window class prototype ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: VideoWindow.h,v 1.6 2003/02/01 12:01:11 stippi Exp $ + * $Id: VideoWindow.h,v 1.7 2003/10/25 00:49:14 sam Exp $ * * Authors: Jean-Marc Dressler * Tony Castley @@ -13,7 +13,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -38,7 +38,7 @@ typedef struct colorcombo { color_space colspace; const char *name; - u32 chroma; + uint32_t chroma; int planes; int pixel_bytes; } colorcombo; @@ -71,8 +71,8 @@ class VideoSettings SIZE_200 = 3, }; - void SetVideoSize( uint32 mode ); - inline uint32 VideoSize() const + void SetVideoSize( uint32_t mode ); + inline uint32_t VideoSize() const { return fVideoSize; } enum { @@ -82,15 +82,15 @@ class VideoSettings FLAG_FULL_SCREEN = 0x0008, }; - inline void SetFlags( uint32 flags ) + inline void SetFlags( uint32_t flags ) { fFlags = flags; } - inline void AddFlags( uint32 flags ) + inline void AddFlags( uint32_t flags ) { fFlags |= flags; } - inline void ClearFlags( uint32 flags ) + inline void ClearFlags( uint32_t flags ) { fFlags &= ~flags; } - inline bool HasFlags( uint32 flags ) const + inline bool HasFlags( uint32_t flags ) const { return fFlags & flags; } - inline uint32 Flags() const + inline uint32_t Flags() const { return fFlags; } private: @@ -98,8 +98,8 @@ class VideoSettings static VideoSettings fDefaultSettings; - uint32 fVideoSize; - uint32 fFlags; + uint32_t fVideoSize; + uint32_t fFlags; BMessage* fSettings; }; @@ -113,15 +113,15 @@ class VLCView : public BView virtual void AttachedToWindow(); virtual void MouseDown(BPoint where); virtual void MouseUp(BPoint where); - virtual void MouseMoved(BPoint where, uint32 transit, + virtual void MouseMoved(BPoint where, uint32_t transit, const BMessage* dragMessage); virtual void Pulse(); virtual void Draw(BRect updateRect); - virtual void KeyDown(const char* bytes, int32 numBytes); + virtual void KeyDown(const char* bytes, int32_t numBytes); private: vout_thread_t *p_vout; - + bigtime_t fLastMouseMovedTime; bool fCursorHidden; bool fCursorInside; @@ -132,13 +132,13 @@ class VLCView : public BView class VideoWindow : public BWindow { public: - VideoWindow(int v_width, + VideoWindow(int v_width, int v_height, BRect frame, - vout_thread_t *p_vout); + vout_thread_t *p_vout); virtual ~VideoWindow(); - // BWindow + // BWindow virtual void MessageReceived(BMessage* message); virtual void Zoom(BPoint origin, float width, float height); @@ -168,8 +168,8 @@ public: // this is the hook controling direct screen connection - int32 i_width; // aspect corrected bitmap size - int32 i_height; + int32_t i_width; // aspect corrected bitmap size + int32_t i_height; BRect winSize; // current window size BBitmap *bitmap[3]; // BBitmap *overlaybitmap; @@ -186,27 +186,27 @@ private: int* mode); void _FreeBuffers(); void _BlankBitmap(BBitmap* bitmap) const; - void _SetVideoSize(uint32 mode); + void _SetVideoSize(uint32_t mode); void _SetToSettings(); void _SaveScreenShot( BBitmap* bitmap, char* path, - uint32 translatorID ) const; - static int32 _save_screen_shot( void* cookie ); + uint32_t translatorID ) const; + static int32_t _save_screen_shot( void* cookie ); struct screen_shot_info { BBitmap* bitmap; char* path; - uint32 translatorID; - int32 width; - int32 height; + uint32_t translatorID; + int32_t width; + int32_t height; }; vout_thread_t *p_vout; - int32 fTrueWidth; // incomming bitmap size - int32 fTrueHeight; + int32_t fTrueWidth; // incomming bitmap size + int32_t fTrueHeight; window_feel fCachedFeel; bool fInterfaceShowing; status_t fInitStatus; @@ -214,4 +214,4 @@ private: }; #endif // BEOS_VIDEO_WINDOW_H - + diff --git a/modules/gui/qnx/vout.c b/modules/gui/qnx/vout.c index 99ed6f8700..c60861f3ee 100644 --- a/modules/gui/qnx/vout.c +++ b/modules/gui/qnx/vout.c @@ -119,7 +119,7 @@ static int QNXDestroyWnd ( vout_thread_t * ); static int NewPicture ( vout_thread_t *, picture_t *, int ); static void FreePicture ( vout_thread_t *, picture_t * ); static int ResizeOverlayOutput ( vout_thread_t * ); -static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); +static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * ); /***************************************************************************** * OpenVideo: allocate QNX video thread output method @@ -1071,7 +1071,8 @@ static int ResizeOverlayOutput(vout_thread_t *p_vout) * anything, but could later send information on which colors it was unable * to set. *****************************************************************************/ -static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) +static void SetPalette( vout_thread_t *p_vout, + uint16_t *red, uint16_t *green, uint16_t *blue ) { int i; diff --git a/modules/misc/dummy/decoder.c b/modules/misc/dummy/decoder.c index 8c2c0aeee6..cbd400a890 100644 --- a/modules/misc/dummy/decoder.c +++ b/modules/misc/dummy/decoder.c @@ -2,15 +2,15 @@ * dec_dummy.c: dummy decoder plugin for vlc. ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: decoder.c,v 1.6 2003/09/02 20:19:26 gbazin Exp $ + * $Id: decoder.c,v 1.7 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -66,7 +66,7 @@ int E_(OpenDecoder) ( vlc_object_t *p_this ) *****************************************************************************/ static int Run ( decoder_fifo_t *p_fifo ) { - u8 p_buffer[1024]; + uint8_t p_buffer[1024]; bit_stream_t bit_stream; mtime_t last_date = mdate(); diff --git a/modules/misc/dummy/vout.c b/modules/misc/dummy/vout.c index 96269ef22c..7cadb13a71 100644 --- a/modules/misc/dummy/vout.c +++ b/modules/misc/dummy/vout.c @@ -2,7 +2,7 @@ * vout_dummy.c: Dummy video output display method for testing purposes ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: vout.c,v 1.5 2003/10/24 21:27:06 gbazin Exp $ + * $Id: vout.c,v 1.6 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -42,7 +42,7 @@ static void End ( vout_thread_t * ); static int Manage ( vout_thread_t * ); static void Render ( vout_thread_t *, picture_t * ); static void Display ( vout_thread_t *, picture_t * ); -static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); +static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * ); /***************************************************************************** * OpenVideo: activates dummy video thread output method @@ -198,8 +198,8 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) /***************************************************************************** * SetPalette: set the palette for the picture *****************************************************************************/ -static void SetPalette ( vout_thread_t *p_vout, u16 *red, u16 *green, - u16 *blue ) +static void SetPalette ( vout_thread_t *p_vout, + uint16_t *red, uint16_t *green, uint16_t *blue ) { /* No need to do anything, the fake direct buffers stay as they are */ -} +} diff --git a/modules/video_chroma/i420_yuy2.c b/modules/video_chroma/i420_yuy2.c index 03ac21ff48..10a7cf5e6e 100644 --- a/modules/video_chroma/i420_yuy2.c +++ b/modules/video_chroma/i420_yuy2.c @@ -2,7 +2,7 @@ * i420_yuy2.c : YUV to YUV conversion module for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: i420_yuy2.c,v 1.3 2003/08/29 18:58:05 fenrir Exp $ + * $Id: i420_yuy2.c,v 1.4 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * @@ -55,8 +55,8 @@ static void I420_Y211 ( vout_thread_t *, picture_t *, picture_t * ); #endif #ifdef MODULE_NAME_IS_i420_yuy2_mmx -static unsigned long long i_00ffw; -static unsigned long long i_80w; +static uint64_t i_00ffw; +static uint64_t i_80w; #endif /***************************************************************************** diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c index 8fc268bd91..b3ceaa1afa 100644 --- a/modules/video_output/aa.c +++ b/modules/video_output/aa.c @@ -2,7 +2,7 @@ * vout_aa.c: Aa video output display method for testing purposes ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: aa.c,v 1.2 2003/03/30 18:14:38 gbazin Exp $ + * $Id: aa.c,v 1.3 2003/10/25 00:49:14 sam Exp $ * * Authors: Sigmund Augdal * @@ -46,7 +46,7 @@ static int Manage ( vout_thread_t * ); static void Render ( vout_thread_t *, picture_t * ); static void Display ( vout_thread_t *, picture_t * ); -static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); +static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * ); /***************************************************************************** * Module descriptor @@ -246,7 +246,8 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) /***************************************************************************** * SetPalette: set the 8bpp palette *****************************************************************************/ -static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) +static void SetPalette( vout_thread_t *p_vout, + uint16_t *red, uint16_t *green, uint16_t *blue ) { int i; diff --git a/modules/video_output/directx/vout.h b/modules/video_output/directx/vout.h index 1522d9ccfe..85232425f8 100644 --- a/modules/video_output/directx/vout.h +++ b/modules/video_output/directx/vout.h @@ -2,7 +2,7 @@ * vout.h: Windows DirectX video output header file ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vout.h,v 1.6 2003/09/26 16:03:21 gbazin Exp $ + * $Id: vout.h,v 1.7 2003/10/25 00:49:14 sam Exp $ * * Authors: Gildas Bazin * @@ -77,8 +77,8 @@ struct vout_sys_t int i_rgb_colorkey; /* colorkey in RGB used by the overlay */ int i_colorkey; /* colorkey used by the overlay */ - - volatile u16 i_changes; /* changes made to the video display */ + + volatile uint16_t i_changes; /* changes made to the video display */ /* Mouse */ volatile vlc_bool_t b_cursor_hidden; diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c index 927dea6f72..3da78ff4d3 100644 --- a/modules/video_output/fb.c +++ b/modules/video_output/fb.c @@ -2,7 +2,7 @@ * fb.c : framebuffer plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: fb.c,v 1.6 2003/04/20 21:15:31 sam Exp $ + * $Id: fb.c,v 1.7 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * @@ -337,7 +337,7 @@ static void End( vout_thread_t *p_vout ) static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; - + CloseDisplay( p_vout ); /* Reset the terminal */ @@ -366,7 +366,7 @@ static void Destroy( vlc_object_t *p_this ) static int Manage( vout_thread_t *p_vout ) { #if 0 - u8 buf; + uint8_t buf; if ( read(0, &buf, 1) == 1) { @@ -427,7 +427,7 @@ static int panned=0; { p_vout->p_sys->var_info.yoffset = 0; /*p_vout->p_sys->var_info.yoffset = p_vout->p_sys->var_info.yres; */ - + /* the X offset should be 0, but who knows ... * some other app might have played with the framebuffer */ p_vout->p_sys->var_info.xoffset = 0; @@ -441,8 +441,8 @@ panned++; } #if 0 -static void SetPalette( vout_thread_t *p_vout, - u16 *red, u16 *green, u16 *blue, u16 *transp ) +static void SetPalette( vout_thread_t *p_vout, uint16_t *red, uint16_t *green, + uint16_t *blue, uint16_t *transp ) { struct fb_cmap cmap = { 0, 256, red, green, blue, transp }; @@ -536,13 +536,13 @@ static int OpenDisplay( vout_thread_t *p_vout ) switch( p_vout->p_sys->var_info.bits_per_pixel ) { case 8: - p_vout->p_sys->p_palette = malloc( 8 * 256 * sizeof( u16 ) ); + p_vout->p_sys->p_palette = malloc( 8 * 256 * sizeof( uint16_t ) ); p_vout->p_sys->fb_cmap.start = 0; p_vout->p_sys->fb_cmap.len = 256; p_vout->p_sys->fb_cmap.red = p_vout->p_sys->p_palette; - p_vout->p_sys->fb_cmap.green = p_vout->p_sys->p_palette + 256 * sizeof( u16 ); - p_vout->p_sys->fb_cmap.blue = p_vout->p_sys->p_palette + 2 * 256 * sizeof( u16 ); - p_vout->p_sys->fb_cmap.transp = p_vout->p_sys->p_palette + 3 * 256 * sizeof( u16 ); + p_vout->p_sys->fb_cmap.green = p_vout->p_sys->p_palette + 256 * sizeof( uint16_t ); + p_vout->p_sys->fb_cmap.blue = p_vout->p_sys->p_palette + 2 * 256 * sizeof( uint16_t ); + p_vout->p_sys->fb_cmap.transp = p_vout->p_sys->p_palette + 3 * 256 * sizeof( uint16_t ); /* Save the colormap */ ioctl( p_vout->p_sys->i_fd, FBIOGETCMAP, &p_vout->p_sys->fb_cmap ); diff --git a/modules/video_output/ggi.c b/modules/video_output/ggi.c index 9a45bfbedc..392d7ad649 100644 --- a/modules/video_output/ggi.c +++ b/modules/video_output/ggi.c @@ -2,16 +2,16 @@ * ggi.c : GGI plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: ggi.c,v 1.4 2003/02/20 01:52:46 sigmunau Exp $ + * $Id: ggi.c,v 1.5 2003/10/25 00:49:14 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar - * + * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -42,13 +42,13 @@ static int Create ( vlc_object_t * ); static void Destroy ( vlc_object_t * ); static int Init ( vout_thread_t * ); -static void End ( vout_thread_t * ); -static int Manage ( vout_thread_t * ); -static void Display ( vout_thread_t *, picture_t * ); +static void End ( vout_thread_t * ); +static int Manage ( vout_thread_t * ); +static void Display ( vout_thread_t *, picture_t * ); static int OpenDisplay ( vout_thread_t * ); static void CloseDisplay ( vout_thread_t * ); -static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); +static void SetPalette ( vout_thread_t *, uint16_t *, uint16_t *, uint16_t * ); /***************************************************************************** * Module descriptor @@ -58,7 +58,7 @@ static void SetPalette ( vout_thread_t *, u16 *, u16 *, u16 * ); "\nBy default VLC will use the value of the DISPLAY"\ " environment variable.") -vlc_module_begin(); +vlc_module_begin(); add_category_hint( N_("Miscellaneous"), NULL, VLC_FALSE ); add_string( "ggi-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE ); set_description( "General Graphics Interface video output" ); @@ -254,9 +254,9 @@ static void End( vout_thread_t *p_vout ) * Terminate an output method created by Create *****************************************************************************/ static void Destroy( vlc_object_t *p_this ) -{ - vout_thread_t *p_vout = (vout_thread_t *)p_this; - +{ + vout_thread_t *p_vout = (vout_thread_t *)p_this; + CloseDisplay( p_vout ); free( p_vout->p_sys ); @@ -278,7 +278,7 @@ static int Manage( vout_thread_t *p_vout ) mask = emKeyboard | emPtrButtonPress | emPtrButtonRelease; ggiEventPoll( p_vout->p_sys->p_display, mask, &tv ); - + while( ggiEventsQueued( p_vout->p_sys->p_display, mask) ) { ggiEventRead( p_vout->p_sys->p_display, &event, mask); @@ -511,11 +511,12 @@ static void CloseDisplay( vout_thread_t *p_vout ) /***************************************************************************** * SetPalette: sets an 8 bpp palette *****************************************************************************/ -static void SetPalette( vout_thread_t *p_vout, u16 *red, u16 *green, u16 *blue ) +static void SetPalette( vout_thread_t *p_vout, + uint16_t *red, uint16_t *green, uint16_t *blue ) { ggi_color colors[256]; int i; - + /* Fill colors with color information */ for( i = 0; i < 256; i++ ) { diff --git a/modules/video_output/glide.c b/modules/video_output/glide.c index 900686c6da..28b2dd5f9d 100644 --- a/modules/video_output/glide.c +++ b/modules/video_output/glide.c @@ -2,7 +2,7 @@ * glide.c : 3dfx Glide plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: glide.c,v 1.2 2003/03/30 18:14:38 gbazin Exp $ + * $Id: glide.c,v 1.3 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -77,7 +77,7 @@ struct vout_sys_t { GrLfbInfo_t p_buffer_info; /* back buffer info */ - u8* pp_buffer[2]; + uint8_t * pp_buffer[2]; int i_index; }; @@ -107,8 +107,8 @@ static int Create( vlc_object_t *p_this ) } p_vout->pf_init = Init; - p_vout->pf_end = End; - p_vout->pf_manage = Manage; + p_vout->pf_end = End; + p_vout->pf_manage = Manage; p_vout->pf_render = NULL; p_vout->pf_display = Display; @@ -298,7 +298,7 @@ static int OpenDisplay( vout_thread_t *p_vout ) return( 1 ); } grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); - + grBufferClear( 0, 0, 0 ); p_vout->p_sys->pp_buffer[0] = p_vout->p_sys->p_buffer_info.lfbPtr; diff --git a/modules/video_output/mga/mga.c b/modules/video_output/mga/mga.c index 12b642afc8..9096b50b82 100644 --- a/modules/video_output/mga/mga.c +++ b/modules/video_output/mga/mga.c @@ -2,7 +2,7 @@ * mga.c : Matrox Graphic Array plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: mga.c,v 1.2 2003/03/30 18:14:39 gbazin Exp $ + * $Id: mga.c,v 1.3 2003/10/25 00:49:14 sam Exp $ * * Authors: Aaron Holtzman * Samuel Hocevar @@ -11,7 +11,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -47,15 +47,15 @@ static int Create ( vlc_object_t * ); static void Destroy ( vlc_object_t * ); static int Init ( vout_thread_t * ); -static void End ( vout_thread_t * ); -static void Display ( vout_thread_t *, picture_t * ); +static void End ( vout_thread_t * ); +static void Display ( vout_thread_t *, picture_t * ); static int NewPicture ( vout_thread_t *, picture_t * ); /***************************************************************************** * Module descriptor *****************************************************************************/ -vlc_module_begin(); +vlc_module_begin(); set_description( _("Matrox Graphic Array video output") ); set_capability( "video output", 10 ); set_callbacks( Create, Destroy ); @@ -89,22 +89,22 @@ vlc_module_end(); typedef struct mga_vid_config_t { - u16 version; - u16 card_type; - u32 ram_size; - u32 src_width; - u32 src_height; - u32 dest_width; - u32 dest_height; - u32 x_org; - u32 y_org; - u8 colkey_on; - u8 colkey_red; - u8 colkey_green; - u8 colkey_blue; - u32 format; - u32 frame_size; - u32 num_frames; + uint16_t version; + uint16_t card_type; + uint32_t ram_size; + uint32_t src_width; + uint32_t src_height; + uint32_t dest_width; + uint32_t dest_height; + uint32_t x_org; + uint32_t y_org; + uint8_t colkey_on; + uint8_t colkey_red; + uint8_t colkey_green; + uint8_t colkey_blue; + uint32_t format; + uint32_t frame_size; + uint32_t num_frames; } mga_vid_config_t; #endif @@ -190,7 +190,7 @@ static int Init( vout_thread_t *p_vout ) * YV12, but it's actually some strange format with packed UV. */ p_vout->output.i_chroma = VLC_FOURCC('Y','M','G','A'); p_vout->p_sys->mga.format = MGA_VID_FORMAT_YV12; - + if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) ) { msg_Err( p_vout, "MGA config ioctl failed" ); @@ -281,8 +281,8 @@ static void End( vout_thread_t *p_vout ) * Terminate an output method created by DummyCreateOutputMethod *****************************************************************************/ static void Destroy( vlc_object_t *p_this ) -{ - vout_thread_t *p_vout = (vout_thread_t *)p_this; +{ + vout_thread_t *p_vout = (vout_thread_t *)p_this; close( p_vout->p_sys->i_fd ); free( p_vout->p_sys ); } diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index 3bc53842fa..97ad9cb9d5 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -2,7 +2,7 @@ * sdl.c: SDL video output display method ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: sdl.c,v 1.13 2003/05/05 16:09:37 gbazin Exp $ + * $Id: sdl.c,v 1.14 2003/10/25 00:49:14 sam Exp $ * * Authors: Samuel Hocevar * Pierre Baillet @@ -612,8 +612,8 @@ static void Display( vout_thread_t *p_vout, picture_t *p_pic ) *****************************************************************************/ static int OpenDisplay( vout_thread_t *p_vout ) { - Uint32 i_flags; - int i_bpp; + uint32_t i_flags; + int i_bpp; /* SDL fucked up fourcc definitions on bigendian machines */ uint32_t i_sdl_chroma; diff --git a/modules/video_output/x11/xcommon.h b/modules/video_output/x11/xcommon.h index e66cd82300..cd945d11bb 100644 --- a/modules/video_output/x11/xcommon.h +++ b/modules/video_output/x11/xcommon.h @@ -2,7 +2,7 @@ * xcommon.h: Defines common to the X11 and XVideo plugins ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: xcommon.h,v 1.9 2003/10/24 21:27:06 gbazin Exp $ + * $Id: xcommon.h,v 1.10 2003/10/25 00:49:14 sam Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -166,11 +166,11 @@ struct picture_sys_t #define PROP_MWM_HINTS_ELEMENTS 5 typedef struct mwmhints_t { - u32 flags; - u32 functions; - u32 decorations; - s32 input_mode; - u32 status; + uint32_t flags; + uint32_t functions; + uint32_t decorations; + int32_t input_mode; + uint32_t status; } mwmhints_t; /***************************************************************************** diff --git a/src/misc/beos_specific.cpp b/src/misc/beos_specific.cpp index e8d80a0212..dfe0af5d83 100644 --- a/src/misc/beos_specific.cpp +++ b/src/misc/beos_specific.cpp @@ -1,8 +1,8 @@ /***************************************************************************** - * beos_init.cpp: Initialization for BeOS specific features + * beos_init.cpp: Initialization for BeOS specific features ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: beos_specific.cpp,v 1.32 2003/09/29 17:36:35 gbazin Exp $ + * $Id: beos_specific.cpp,v 1.33 2003/10/25 00:49:14 sam Exp $ * * Authors: Jean-Marc Dressler * @@ -10,7 +10,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -52,7 +52,7 @@ public: virtual void RefsReceived(BMessage* message); virtual void MessageReceived(BMessage* message); virtual bool QuitRequested(); - + private: BWindow* fInterfaceWindow; BMessage* fRefsMessage; @@ -62,7 +62,7 @@ private: * Static vars *****************************************************************************/ -//const uint32 INTERFACE_CREATED = 'ifcr'; /* message sent from interface */ +//const uint32_t INTERFACE_CREATED = 'ifcr'; /* message sent from interface */ #include "../../modules/gui/beos/MsgVals.h" extern "C" @@ -163,12 +163,12 @@ void VlcApplication::AboutRequested( ) void VlcApplication::ReadyToRun( ) { BPath path; - app_info info; + app_info info; /* Get the program path */ - be_app->GetAppInfo( &info ); - BEntry entry( &info.ref ); - entry.GetPath( &path ); + be_app->GetAppInfo( &info ); + BEntry entry( &info.ref ); + entry.GetPath( &path ); path.GetParent( &path ); p_this->p_libvlc->psz_vlcpath = strdup( path.Path() ); @@ -224,7 +224,7 @@ void VlcApplication::MessageReceived(BMessage* message) bool VlcApplication::QuitRequested() { - if( CurrentMessage() && CurrentMessage()->FindBool( "shortcut" ) ) + if( CurrentMessage() && CurrentMessage()->FindBool( "shortcut" ) ) { /* The user hit Alt+Q, don't let the be_app exit without cleaning. Let the interface do the job */ diff --git a/src/misc/threads.c b/src/misc/threads.c index a9e39701cf..d214c93899 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -2,7 +2,7 @@ * threads.c : threads implementation for the VideoLAN client ***************************************************************************** * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN - * $Id: threads.c,v 1.41 2003/08/28 17:19:41 sam Exp $ + * $Id: threads.c,v 1.42 2003/10/25 00:49:14 sam Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -705,7 +705,7 @@ void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line ) i_ret = 1; #elif defined( HAVE_KERNEL_SCHEDULER_H ) - int32 exit_value; + int32_t exit_value; wait_for_thread( p_this->thread_id, &exit_value ); #endif -- 2.39.5