+ Removed u8, s8, u16 etc. for good.
* ALL:
+ Replaced all occurrences of u8, s8, u16 etc. with uint8_t, int8_t, etc.
* 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 <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
*****************************************************************************/
/**
- * \file
+ * \file
* This file is a collection of common definitions and types
*/
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
*****************************************************************************
#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
* 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 <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
typedef struct
{
- int32 init;
+ int32_t init;
sem_id lock;
vlc_object_t * p_this;
typedef struct
{
- int32 init;
+ int32_t init;
thread_id thread;
vlc_object_t * p_this;
* 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 <gbazin@netcourrier.com>
*
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;
p_sys->p_graph->Release();
/* Uninitialize OLE/COM */
- CoUninitialize();
+ CoUninitialize();
free( p_sys->p_header );
free( p_sys->pp_streams );
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];
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 )
{
* -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 <stef@via.ecp.fr>
*
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 */
/* 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 <stef@via.ecp.fr>
*
{
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
{
* 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 <stef@via.ecp.fr>
* German Tischler <tanis@gaspode.franken.de>
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.
*****************************************************************************/
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;
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 */
}
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 );
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 )
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 )
{
#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;
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 );
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 );
}
}
}
*****************************************************************************/
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 )
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 );
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 );
i_temp = hton64( i_temp ) >> 16;
/*fprintf( stderr, "Subpic %d: "I64Fx"\n", i, i_temp ); */
MGINF.p_spu_attr[i].i_caption = i_temp & 0xff;
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;
#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 );
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 );
}
}
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 );
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;
}
p_vts->b_initialized = 0;
-
+
return 0;
}
*****************************************************************************/
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;
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;
}
else
{
- p_title->chapter_map.pi_start_cell = NULL;
+ p_title->chapter_map.pi_start_cell = NULL;
}
/* parsing of cell_play_t */
p_title->p_cell_play = malloc( p_title->i_cell_nb
* sizeof(cell_play_t) );
-
+
if( p_title->p_cell_play == NULL )
{
return -1;
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;
}
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;
/*****************************************************************************
* 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 );
}
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;
*****************************************************************************/
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;
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;
}
*****************************************************************************/
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;
static char math_op[][10] =
{
"none",
- "=",
+ "=",
"<->", /* swap */
"+=",
"-=",
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 )
{
}
}
-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(" { ");
{
case 0x00:
printf( "to play first PGC" );
- break;
+ break;
case 0x01:
printf( "to VMG title menu (?)" );
break;
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;
/* 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 )
{
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;
}
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 ");
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) );
{
printf( ", Highlight 0x%02x", OP_VAL_8(4)>>2 );
}
-
+
}
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:
*****************************************************************************/
void CommandRead( ifo_command_t com )
{
- u8* pi_code = (u8*)(&com);
+ uint8_t * pi_code = (uint8_t*)(&com);
switch( com.i_type )
{
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;
IfoJmp( com );
}
else
- {
+ {
if( com.i_cmp )
{
printf( "if (r[0x%02x] %s ", OP_VAL_8(1)&0x0f,
}
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)]
/*****************************************************************************
* 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 );
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 )
{
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 )
{
} \
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;
}
* 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 <stef@via.ecp.fr>
*
* - libifo by Thomas Mirlacher <dent@cosy.sbg.ac.at>
* - 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
*/
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; // <char> 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; // <char> 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; // <char> description */
- u8 i_foo ;/* 8; // dont know */
- u8 i_caption ;/* 8; // 0x00 ? */
+ uint16_t i_prefix ;/* 16; // 0x0100 ? */
+ uint16_t i_lang_code ;/* 16; // <char> 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;
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;
- 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 */
* - 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
{
/* 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;
/* 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;
* - 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;
*/
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;
*/
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
*/
* 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;
{
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;
* - 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;
* - 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;
* 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
*/
* 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;
/* 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
{
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;
* 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 <stef@via.ecp.fr>
*
* 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
/*
* Fonctions in dvd_udf.c
*/
-u32 DVDUDFFindFile( dvdcss_handle, char * );
+uint32_t DVDUDFFindFile( dvdcss_handle, char * );
* 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 <stef@via.ecp.fr>
*
* 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
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] );
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,
{
ADDES( 0xe0, VLC_FOURCC('m','p','g','v'), VIDEO_ES, 0, "", 0 );
}
-
+
}
/*****************************************************************************
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++ )
{
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;
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
{
* 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 <fenrir@via.ecp.fr>
* Paul Forgey <paulf at aphrodite dot com>
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 );
}
#endif
// show a warning if frequency is < than 30000. User is certainly usint old syntax.
-
+
/* set frequency */
if( p_sys->i_frequency >= 0 )
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 )
* 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 <massiot@via.ecp.fr>
*
* 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
> 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;
/*****************************************************************************
* 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;
{
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;
!= (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) )
* 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 <jpsaman@wxs.nl>
*
#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];
* 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;
/*****************************************************************************
* 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));
{
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
* 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 <massiot@via.ecp.fr>
*
* 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
{
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-- ; )
#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;
* 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 <zedek@fxgsproject.org>
*
{
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++;
}
* 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 <zedek@fxgsproject.org>
*
{
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++;
}
* 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 <zedek@fxgsproject.org>
*
{
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++;
}
* 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 <marcari@videolan.ord>
*
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-- )
}
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);
}
* 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 <sam@zoy.org>
*
* 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
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-- )
/* 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
* 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 <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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
* 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 );
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;
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
* 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 <gbazin@netcourrier.com>
*
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-- )
* 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 <sam@zoy.org>
*
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-- )
* 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 <gbazin@netcourrier.com>
*
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-- )
* 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 <massiot@via.ecp.fr>
*
* 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
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;
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 )
* 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 <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
/* 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
* 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 <massiot@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
* 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
* 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 <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
- *
+ *
* 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
* It describes the specific properties of an audio device.
*****************************************************************************/
struct aout_sys_t
-{
+{
mtime_t next_date;
mtime_t buffer_time;
};
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;
* 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 <fenrir@via.ecp.fr>
*
/* 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 */
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;
/*****************************************************************************
- * 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 <fenrir@via.ecp.fr>
*
* 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
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;
/*****************************************************************************
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
/*****************************************************************************
* 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'):
{
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,
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
{
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);
{
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 );
}
}
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);
{
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 );
}
}
/*****************************************************************************
* 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;
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;
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 ,
/* 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] ) );
}
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 )
{
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;
{
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 );
{
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 );
}
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;
if( i_chunk_size < 4 )
{
break;
- }
+ }
i_vector_flags = GET4BYTES( p_data );
i_chunk_size -= 4;
i_mask = 0x80000000UL;
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 );
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 );
i_y += 4;
}
}
- }
+ }
break;
case( 0x3200 ): /* load intra picture but all v1*/
{
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 );
i_x = 0;
i_y += 4;
}
- }
+ }
break;
default:
* 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 <fenrir@via.ecp.fr>
*
* 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;
* 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 <fenrir@via.ecp.fr>
- *
+ *
* 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
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 */
#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
#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')
#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')
* 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 <fenrir@via.ecp.fr>
*
* 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
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 );
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;
}
/*****************************************************************************
- * pp_postprocess : make post-filter as defined in MPEG4-ISO
+ * pp_postprocess : make post-filter as defined in MPEG4-ISO
*****************************************************************************
*****************************************************************************/
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 );
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 );
* 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 <fenrir@via.ecp.fr>
- *
+ *
* 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
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,
* 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 <gbazin@netcourrier.com>
* Christophe Massiot <massiot@via.ecp.fr>
* 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
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 );
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 );
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 ) )
{
* 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 <sam@zoy.org>
* Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
* 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
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;
/* 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;
p_destptr++ )
{
*p_destptr = ( i_colprecomp +
- (u16)*p_destptr * i_destalpha ) >> 4;
+ (uint16_t)*p_destptr * i_destalpha ) >> 4;
}
break;
}
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;
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;
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;
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;
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;
* 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 <gbazin@netcourrier.com>
*
* 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
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++ )
{
* 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 <gbazin@netcourrier.com>
*
* 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
}
p_sys->i_headers++;
-
+
if( p_sys->b_packetizer )
{
/* add a input for the stream ouput */
return VLC_EGENERIC;
}
p_sys->i_headers++;
-
+
ParseTheoraComments( p_dec );
if( p_sys->b_packetizer )
return VLC_EGENERIC;
}
p_sys->i_headers++;
-
+
if( !p_sys->b_packetizer )
{
/* We have all the headers, initialize decoder */
{
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++ )
{
{
i_src_xoffset /= 2;
i_src_yoffset /= 2;
- }
+ }
p_src += (i_src_yoffset * i_src_stride + i_src_yoffset);
* 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 <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
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 )
{
/*****************************************************************************
* 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 )
*****************************************************************************/
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 )
{
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 )
{
>> 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 !
* 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 <massiot@via.ecp.fr>
*
* 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,
{
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 ? */
*****************************************************************************/
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;
{
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 */
* 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 <gbazin@netcourrier.com>
- *
+ *
* 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
#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
{
ogg_int32_t width;
ogg_int32_t height;
} stream_header_video;
-
+
typedef struct stream_header_audio
{
ogg_int16_t channels;
****************************************************************************/
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 */
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 );
}
}
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);
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 );
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 )
{
* 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 <sigmunau@idi.ntnu.no>
- *
+ *
* 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
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 )
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()" );
{
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;
* 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 <sigmunau@idi.ntnu.no>
- *
+ *
* 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
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;
char * psz_temp;
int i;
vlc_value_t val;
-
+
var_Get( p_input, "demuxed-id3", &val );
if( val.b_bool )
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] );
{
input_AddInfo( p_category, (char *)p_frame->description, psz_temp );
}
- free( psz_temp );
+ free( psz_temp );
}
i++;
}
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;
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*/
{
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()" );
}
/* 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()" );
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()" );
* 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 <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* 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
{
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;
};
BWindow*
beos_GetAppWindow(char *name)
{
- int32 index;
+ int32_t index;
BWindow *window;
-
+
for (index = 0 ; ; index++)
{
window = be_app->WindowAt(index);
window->Unlock();
}
}
- return window;
+ return window;
}
/*****************************************************************************
// 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
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
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);
}
* VideoSettings::SetVideoSize
*****************************************************************************/
void
-VideoSettings::SetVideoSize( uint32 mode )
+VideoSettings::SetVideoSize( uint32_t mode )
{
fVideoSize = mode;
}
fSettings(new VideoSettings(*VideoSettings::DefaultSettings()))
{
p_vout = p_videoout;
-
+
// create the view to do the display
view = new VLCView( Bounds(), p_vout );
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);
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);
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);
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;
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;
/* 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" ) )
* VideoWindow::FrameMoved
*****************************************************************************/
void
-VideoWindow::FrameMoved(BPoint origin)
+VideoWindow::FrameMoved(BPoint origin)
{
if (IsFullScreen())
return ;
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;
{
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 */
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);
}
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,
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;
{
*mode = OVERLAY;
rgb_color key;
- view->SetViewOverlay(bitmap[0],
+ view->SetViewOverlay(bitmap[0],
bitmap[0]->Bounds() ,
view->Bounds(),
&key, B_FOLLOW_ALL,
}
// 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();
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;
{
// 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;
// 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;
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;
* 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:
VideoWindow::_SetToSettings()
{
// adjust dimensions
- uint32 mode = RESIZE_100;
+ uint32_t mode = RESIZE_100;
switch (fSettings->VideoSize())
{
case VideoSettings::SIZE_50:
*****************************************************************************/
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;
/*****************************************************************************
* VideoWindow::_save_screen_shot
*****************************************************************************/
-int32
+int32_t
VideoWindow::_save_screen_shot( void* cookie )
{
screen_shot_info* info = (screen_shot_info*)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
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 )
{
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 );
}
{
VideoWindow* videoWindow = dynamic_cast<VideoWindow*>(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)
{
}
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
// 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);*/
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 );
* 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;
/*****************************************************************************
* VLCVIew::Pulse
*****************************************************************************/
-void
+void
VLCView::Pulse()
{
// We are getting the pulse messages no matter if the mouse is over
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);
}
}
* VLCVIew::KeyDown
*****************************************************************************/
void
-VLCView::KeyDown(const char *bytes, int32 numBytes)
+VLCView::KeyDown(const char *bytes, int32_t numBytes)
{
VideoWindow *videoWindow = dynamic_cast<VideoWindow*>(Window());
BWindow* interfaceWindow = get_interface_window();
if (videoWindow && numBytes > 0) {
- uint32 mods = modifiers();
+ uint32_t mods = modifiers();
switch (*bytes) {
case B_TAB:
case 'f':
* VLCVIew::Draw
*****************************************************************************/
void
-VLCView::Draw(BRect updateRect)
+VLCView::Draw(BRect updateRect)
{
VideoWindow* window = dynamic_cast<VideoWindow*>( Window() );
if ( window && window->mode == BITMAP )
{
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++;
{
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 */
* 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 )
{
p_vout->p_sys->p_window->Show();
}
-
+
return( 0 );
}
* 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)
* 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 <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
* 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
{
color_space colspace;
const char *name;
- u32 chroma;
+ uint32_t chroma;
int planes;
int pixel_bytes;
} colorcombo;
SIZE_200 = 3,
};
- void SetVideoSize( uint32 mode );
- inline uint32 VideoSize() const
+ void SetVideoSize( uint32_t mode );
+ inline uint32_t VideoSize() const
{ return fVideoSize; }
enum
{
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:
static VideoSettings fDefaultSettings;
- uint32 fVideoSize;
- uint32 fFlags;
+ uint32_t fVideoSize;
+ uint32_t fFlags;
BMessage* fSettings;
};
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;
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);
// 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;
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;
};
#endif // BEOS_VIDEO_WINDOW_H
-
+
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
* 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;
* 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 <sam@zoy.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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
*****************************************************************************/
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();
* 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 <sam@zoy.org>
*
* 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
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
/*****************************************************************************
* 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 */
-}
+}
* 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 <sam@zoy.org>
*
#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
/*****************************************************************************
* 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 <sigmunau@idi.ntnu.no>
*
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
/*****************************************************************************
* 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;
* 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 <gbazin@netcourrier.com>
*
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;
* 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 <sam@zoy.org>
*
static void Destroy( vlc_object_t *p_this )
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
-
+
CloseDisplay( p_vout );
/* Reset the terminal */
static int Manage( vout_thread_t *p_vout )
{
#if 0
- u8 buf;
+ uint8_t buf;
if ( read(0, &buf, 1) == 1)
{
{
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;
}
#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 };
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 );
* 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 <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* 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
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
"\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" );
* 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 );
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);
/*****************************************************************************
* 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++ )
{
* 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 <sam@zoy.org>
*
* 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
{
GrLfbInfo_t p_buffer_info; /* back buffer info */
- u8* pp_buffer[2];
+ uint8_t * pp_buffer[2];
int i_index;
};
}
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;
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;
* 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 <aholtzma@ess.engr.uvic.ca>
* Samuel Hocevar <sam@zoy.org>
* 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
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 );
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
* 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" );
* 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 );
}
* 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 <sam@zoy.org>
* Pierre Baillet <oct@zoy.org>
*****************************************************************************/
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;
* 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 <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#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;
/*****************************************************************************
/*****************************************************************************
- * 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 <polux@via.ecp.fr>
*
* 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
virtual void RefsReceived(BMessage* message);
virtual void MessageReceived(BMessage* message);
virtual bool QuitRequested();
-
+
private:
BWindow* fInterfaceWindow;
BMessage* fRefsMessage;
* 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"
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() );
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 */
* 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 <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
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