Commit 1ef00c88 authored by Laurent Aimar's avatar Laurent Aimar

* ffmpeg: disable direct rendering by default. I have too many files

that don't work with it (I don't see why it doesn't work :(
 * mp4: fix a bug in timestamp calculation. Replace s/u* by s/uint*_t
 * avi : remove an useless debug message.
 * src/misc/objects.c : fix stream output object allocation.
parent 2c91229a
......@@ -2,7 +2,7 @@
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ffmpeg.c,v 1.15 2002/11/10 02:47:27 fenrir Exp $
* $Id: ffmpeg.c,v 1.16 2002/11/17 06:46:55 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -98,7 +98,7 @@ static int ffmpeg_GetFfmpegCodec( vlc_fourcc_t, int *, int *, char ** );
vlc_module_begin();
add_category_hint( N_("Ffmpeg"), NULL );
#if LIBAVCODEC_BUILD >= 4615
add_bool( "ffmpeg-dr", 1, NULL,
add_bool( "ffmpeg-dr", 0, NULL,
"direct rendering",
"direct rendering" );
#endif
......
......@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.13 2002/11/16 22:25:07 fenrir Exp $
* $Id: avi.c,v 1.14 2002/11/17 06:46:56 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -1108,8 +1108,6 @@ static int AVIInit( vlc_object_t * p_this )
{
// already at begining of p_movi
}
msg_Info( p_input, "skipping 12 bytes" );
AVI_SkipBytes( p_input, 12 ); // enter in p_movi
p_avi->i_movi_begin = p_movi->i_chunk_pos;
......
......@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.8 2002/10/26 19:14:45 fenrir Exp $
* $Id: libmp4.c,v 1.9 2002/11/17 06:46:56 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -87,8 +87,8 @@
#define MP4_READBOX_ENTER( MP4_Box_data_TYPE_t ) \
s64 i_read = p_box->i_size; \
u8 *p_peek, *p_buff; \
int64_t i_read = p_box->i_size; \
uint8_t *p_peek, *p_buff; \
i_read = p_box->i_size; \
if( !( p_peek = p_buff = malloc( i_read ) ) ) \
{ \
......@@ -126,48 +126,48 @@
*/
/* Some functions to manipulate memory */
static u16 GetWLE( u8 *p_buff )
static uint16_t GetWLE( uint8_t *p_buff )
{
return( (p_buff[0]) + ( p_buff[1] <<8 ) );
}
static u32 GetDWLE( u8 *p_buff )
static uint32_t GetDWLE( uint8_t *p_buff )
{
return( p_buff[0] + ( p_buff[1] <<8 ) +
( p_buff[2] <<16 ) + ( p_buff[3] <<24 ) );
}
static u16 GetWBE( u8 *p_buff )
static uint16_t GetWBE( uint8_t *p_buff )
{
return( (p_buff[0]<<8) + p_buff[1] );
}
static u32 Get24bBE( u8 *p_buff )
static uint32_t Get24bBE( uint8_t *p_buff )
{
return( ( p_buff[0] <<16 ) + ( p_buff[1] <<8 ) + p_buff[2] );
}
static u32 GetDWBE( u8 *p_buff )
static uint32_t GetDWBE( uint8_t *p_buff )
{
return( (p_buff[0] << 24) + ( p_buff[1] <<16 ) +
( p_buff[2] <<8 ) + p_buff[3] );
}
static u64 GetQWBE( u8 *p_buff )
static uint64_t GetQWBE( uint8_t *p_buff )
{
return( ( (u64)GetDWBE( p_buff ) << 32 )|( (u64)GetDWBE( p_buff + 4 ) ) );
return( ( (uint64_t)GetDWBE( p_buff ) << 32 )|( (uint64_t)GetDWBE( p_buff + 4 ) ) );
}
static void GetUUID( UUID_t *p_uuid, u8 *p_buff )
static void GetUUID( UUID_t *p_uuid, uint8_t *p_buff )
{
memcpy( p_uuid,
p_buff,
16 );
}
static void CreateUUID( UUID_t *p_uuid, u32 i_fourcc )
static void CreateUUID( UUID_t *p_uuid, uint32_t i_fourcc )
{
/* made by 0xXXXXXXXX-0011-0010-8000-00aa00389b71
where XXXXXXXX is the fourcc */
......@@ -176,7 +176,7 @@ static void CreateUUID( UUID_t *p_uuid, u32 i_fourcc )
/* some functions for mp4 encoding of variables */
void MP4_ConvertDate2Str( char *psz, u64 i_date )
void MP4_ConvertDate2Str( char *psz, uint64_t i_date )
{
int i_day;
int i_hour;
......@@ -238,7 +238,7 @@ int MP4_SeekAbsolute( input_thread_t *p_input,
}
/* return 1 if success, 0 if fail */
int MP4_ReadData( input_thread_t *p_input, u8 *p_buff, int i_size )
int MP4_ReadData( input_thread_t *p_input, uint8_t *p_buff, int i_size )
{
data_packet_t *p_data;
......@@ -304,7 +304,7 @@ MP4_Stream_t *MP4_InputStream( input_thread_t *p_input )
*
****************************************************************************/
MP4_Stream_t *MP4_MemoryStream( input_thread_t *p_input,
int i_size, u8 *p_buffer )
int i_size, uint8_t *p_buffer )
{
MP4_Stream_t *p_stream;
......@@ -335,7 +335,7 @@ MP4_Stream_t *MP4_MemoryStream( input_thread_t *p_input,
* MP4_ReadStream read from a MP4_Stream_t
*
****************************************************************************/
int MP4_ReadStream( MP4_Stream_t *p_stream, u8 *p_buff, int i_size )
int MP4_ReadStream( MP4_Stream_t *p_stream, uint8_t *p_buff, int i_size )
{
if( p_stream->b_memory )
{
......@@ -359,7 +359,7 @@ int MP4_ReadStream( MP4_Stream_t *p_stream, u8 *p_buff, int i_size )
* MP4_PeekStream peek from a MP4_Stream_t
*
****************************************************************************/
int MP4_PeekStream( MP4_Stream_t *p_stream, u8 **pp_peek, int i_size )
int MP4_PeekStream( MP4_Stream_t *p_stream, uint8_t **pp_peek, int i_size )
{
if( p_stream->b_memory )
{
......@@ -426,7 +426,7 @@ int MP4_SeekStream( MP4_Stream_t *p_stream, off_t i_pos)
int MP4_ReadBoxCommon( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
{
int i_read;
u8 *p_peek;
uint8_t *p_peek;
if( ( ( i_read = MP4_PeekStream( p_stream, &p_peek, 32 ) ) < 8 ) )
{
......@@ -467,13 +467,13 @@ int MP4_ReadBoxCommon( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
CreateUUID( &p_box->i_uuid, p_box->i_type );
}
#ifdef MP4_VERBOSE
/* FIXME how to write u64 ??? */
/* FIXME how to write uint64_t ??? */
if( p_box->i_size )
{
msg_Dbg( p_stream->p_input, "Found Box: %c%c%c%c size %d",
(p_box->i_type)&0xff, (p_box->i_type>>8)&0xff,
(p_box->i_type>>16)&0xff, (p_box->i_type>>24)&0xff,
(u32)p_box->i_size );
(uint32_t)p_box->i_size );
}
#endif
......@@ -614,7 +614,7 @@ int MP4_ReadBox_ftyp( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
{
int i;
p_box->data.p_ftyp->i_compatible_brands =
calloc( p_box->data.p_ftyp->i_compatible_brands_count, sizeof(u32));
calloc( p_box->data.p_ftyp->i_compatible_brands_count, sizeof(uint32_t));
for( i =0; i < p_box->data.p_ftyp->i_compatible_brands_count; i++ )
{
......@@ -698,11 +698,11 @@ int MP4_ReadBox_mvhd( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
msg_Dbg( p_stream->p_input, "Read Box: \"mvhd\" creation %s modification %s time scale %d duration %s rate %f volume %f next track id %d",
s_creation_time,
s_modification_time,
(u32)p_box->data.p_mvhd->i_timescale,
(uint32_t)p_box->data.p_mvhd->i_timescale,
s_duration,
(float)p_box->data.p_mvhd->i_rate / (1<<16 ),
(float)p_box->data.p_mvhd->i_volume / 256 ,
(u32)p_box->data.p_mvhd->i_next_track_id );
(uint32_t)p_box->data.p_mvhd->i_next_track_id );
#endif
MP4_READBOX_EXIT( 1 );
}
......@@ -798,7 +798,7 @@ int MP4_ReadBox_tref( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
int MP4_ReadBox_mdhd( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
{
int i;
u16 i_language;
uint16_t i_language;
#ifdef MP4_VERBOSE
char s_creation_time[128];
char s_modification_time[128];
......@@ -838,7 +838,7 @@ int MP4_ReadBox_mdhd( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
msg_Dbg( p_stream->p_input, "Read Box: \"mdhd\" creation %s modification %s time scale %d duration %s language %c%c%c",
s_creation_time,
s_modification_time,
(u32)p_box->data.p_mdhd->i_timescale,
(uint32_t)p_box->data.p_mdhd->i_timescale,
s_duration,
p_box->data.p_mdhd->i_language[0],
p_box->data.p_mdhd->i_language[1],
......@@ -1021,9 +1021,9 @@ int MP4_ReadBox_stts( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_stts->i_entry_count );
p_box->data.p_stts->i_sample_count =
calloc( sizeof( u32 ), p_box->data.p_stts->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stts->i_entry_count );
p_box->data.p_stts->i_sample_delta =
calloc( sizeof( u32 ), p_box->data.p_stts->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stts->i_entry_count );
for( i = 0; (i < p_box->data.p_stts->i_entry_count )&&( i_read >=8 ); i++ )
{
......@@ -1057,9 +1057,9 @@ int MP4_ReadBox_ctts( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_ctts->i_entry_count );
p_box->data.p_ctts->i_sample_count =
calloc( sizeof( u32 ), p_box->data.p_ctts->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_ctts->i_entry_count );
p_box->data.p_ctts->i_sample_offset =
calloc( sizeof( u32 ), p_box->data.p_ctts->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_ctts->i_entry_count );
for( i = 0; (i < p_box->data.p_ctts->i_entry_count )&&( i_read >=8 ); i++ )
{
......@@ -1082,7 +1082,7 @@ void MP4_FreeBox_ctts( input_thread_t *p_input, MP4_Box_t *p_box )
FREE( p_box->data.p_ctts->i_sample_offset );
}
static int MP4_ReadLengthDescriptor( u8 **pp_peek, s64 *i_read )
static int MP4_ReadLengthDescriptor( uint8_t **pp_peek, int64_t *i_read )
{
int i_b;
int i_len = 0;
......@@ -1351,7 +1351,7 @@ int MP4_ReadBox_stsz( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_stsz->i_sample_count );
p_box->data.p_stsz->i_entry_size =
calloc( sizeof( u32 ), p_box->data.p_stsz->i_sample_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsz->i_sample_count );
if( !p_box->data.p_stsz->i_sample_size )
{
......@@ -1387,11 +1387,11 @@ int MP4_ReadBox_stsc( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_stsc->i_entry_count );
p_box->data.p_stsc->i_first_chunk =
calloc( sizeof( u32 ), p_box->data.p_stsc->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsc->i_entry_count );
p_box->data.p_stsc->i_samples_per_chunk =
calloc( sizeof( u32 ), p_box->data.p_stsc->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsc->i_entry_count );
p_box->data.p_stsc->i_sample_description_index =
calloc( sizeof( u32 ), p_box->data.p_stsc->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsc->i_entry_count );
for( i = 0; (i < p_box->data.p_stsc->i_entry_count )&&( i_read >= 12 );i++ )
{
......@@ -1427,7 +1427,7 @@ int MP4_ReadBox_stco_co64( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_co64->i_entry_count );
p_box->data.p_co64->i_chunk_offset =
calloc( sizeof( u64 ), p_box->data.p_co64->i_entry_count );
calloc( sizeof( uint64_t ), p_box->data.p_co64->i_entry_count );
for( i = 0; i < p_box->data.p_co64->i_entry_count; i++ )
{
......@@ -1474,7 +1474,7 @@ int MP4_ReadBox_stss( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_stss->i_entry_count );
p_box->data.p_stss->i_sample_number =
calloc( sizeof( u32 ), p_box->data.p_stss->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stss->i_entry_count );
for( i = 0; (i < p_box->data.p_stss->i_entry_count )&&( i_read >= 4 ); i++ )
{
......@@ -1510,10 +1510,10 @@ int MP4_ReadBox_stsh( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_stsh->i_entry_count );
p_box->data.p_stsh->i_shadowed_sample_number =
calloc( sizeof( u32 ), p_box->data.p_stsh->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsh->i_entry_count );
p_box->data.p_stsh->i_sync_sample_number =
calloc( sizeof( u32 ), p_box->data.p_stsh->i_entry_count );
calloc( sizeof( uint32_t ), p_box->data.p_stsh->i_entry_count );
for( i = 0; (i < p_box->data.p_stss->i_entry_count )&&( i_read >= 8 ); i++ )
......@@ -1547,7 +1547,7 @@ int MP4_ReadBox_stdp( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GETVERSIONFLAGS( p_box->data.p_stdp );
p_box->data.p_stdp->i_priority =
calloc( sizeof( u16 ), i_read / 2 );
calloc( sizeof( uint16_t ), i_read / 2 );
for( i = 0; i < i_read / 2 ; i++ )
{
......@@ -1581,13 +1581,13 @@ int MP4_ReadBox_padb( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_padb->i_sample_count );
p_box->data.p_padb->i_reserved1 =
calloc( sizeof( u16 ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
calloc( sizeof( uint16_t ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
p_box->data.p_padb->i_pad2 =
calloc( sizeof( u16 ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
calloc( sizeof( uint16_t ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
p_box->data.p_padb->i_reserved2 =
calloc( sizeof( u16 ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
calloc( sizeof( uint16_t ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
p_box->data.p_padb->i_pad1 =
calloc( sizeof( u16 ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
calloc( sizeof( uint16_t ), ( p_box->data.p_padb->i_sample_count + 1 ) / 2 );
for( i = 0; i < i_read / 2 ; i++ )
......@@ -1629,13 +1629,13 @@ int MP4_ReadBox_elst( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_segment_duration =
calloc( sizeof( u64 ), p_box->data.p_elst->i_entry_count );
calloc( sizeof( uint64_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_time =
calloc( sizeof( u64 ), p_box->data.p_elst->i_entry_count );
calloc( sizeof( uint64_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_rate_integer =
calloc( sizeof( u16 ), p_box->data.p_elst->i_entry_count );
calloc( sizeof( uint16_t ), p_box->data.p_elst->i_entry_count );
p_box->data.p_elst->i_media_rate_fraction=
calloc( sizeof( u16 ), p_box->data.p_elst->i_entry_count );
calloc( sizeof( uint16_t ), p_box->data.p_elst->i_entry_count );
for( i = 0; i < p_box->data.p_elst->i_entry_count; i++ )
......@@ -1773,7 +1773,7 @@ int MP4_ReadBox_cmov( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
#ifdef HAVE_ZLIB_H
z_stream z_data;
#endif
u8 *p_data;
uint8_t *p_data;
int i_result;
......@@ -1906,7 +1906,7 @@ int MP4_ReadBox_cmov( MP4_Stream_t *p_stream, MP4_Box_t *p_box )
static struct
{
u32 i_type;
uint32_t i_type;
int (*MP4_ReadBox_function )( MP4_Stream_t *p_stream, MP4_Box_t *p_box );
void (*MP4_FreeBox_function )( input_thread_t *p_input, MP4_Box_t *p_box );
} MP4_Box_Function [] =
......@@ -2059,7 +2059,7 @@ int MP4_ReadBox( MP4_Stream_t *p_stream, MP4_Box_t *p_box, MP4_Box_t *p_father )
* MP4_CountBox: given a box, count how many child have the requested type
* FIXME : support GUUID
*****************************************************************************/
int MP4_CountBox( MP4_Box_t *p_box, u32 i_type )
int MP4_CountBox( MP4_Box_t *p_box, uint32_t i_type )
{
int i_count;
MP4_Box_t *p_child;
......@@ -2089,7 +2089,7 @@ int MP4_CountBox( MP4_Box_t *p_box, u32 i_type )
* return NULL if not found
*****************************************************************************/
MP4_Box_t *MP4_FindBox( MP4_Box_t *p_box, u32 i_type )
MP4_Box_t *MP4_FindBox( MP4_Box_t *p_box, uint32_t i_type )
{
MP4_Box_t *p_child;
......@@ -2140,7 +2140,7 @@ MP4_Box_t *MP4_FindNextBox( MP4_Box_t *p_box )
/*****************************************************************************
* MP4_FindNbBox: find the box i_number
*****************************************************************************/
MP4_Box_t *MP4_FindNbBox( MP4_Box_t *p_box, u32 i_number )
MP4_Box_t *MP4_FindNbBox( MP4_Box_t *p_box, uint32_t i_number )
{
MP4_Box_t *p_child = p_box->p_first;
......@@ -2299,7 +2299,7 @@ static void __MP4_BoxDumpStructure( input_thread_t *p_input,
{
char str[512];
int i;
memset( str, (u8)' ', 512 );
memset( str, (uint8_t)' ', 512 );
for( i = 0; i < i_level; i++ )
{
str[i*5] = '|';
......@@ -2309,7 +2309,7 @@ static void __MP4_BoxDumpStructure( input_thread_t *p_input,
(p_box->i_type>>8 ) &0xff,
(p_box->i_type>>16 ) &0xff,
(p_box->i_type>>24 ) &0xff,
(u32)p_box->i_size );
(uint32_t)p_box->i_size );
msg_Dbg( p_input, "%s", str );
}
......@@ -2470,7 +2470,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
else
if( strlen( psz_token ) == 4 )
{
u32 i_fourcc;
uint32_t i_fourcc;
i_fourcc = VLC_FOURCC( psz_token[0], psz_token[1],
psz_token[2], psz_token[3] );
p_box = p_box->p_first;
......
......@@ -2,7 +2,7 @@
* libmp4.h : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.h,v 1.3 2002/09/17 11:57:38 fenrir Exp $
* $Id: libmp4.h,v 1.4 2002/11/17 06:46:56 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -115,13 +115,13 @@
typedef struct MP4_Stream_s
{
int b_memory; /* do we uses a memory buffer */
int b_memory; /* do we uses a memory buffer */
input_thread_t *p_input;
off_t i_start; /* in the buffer position for memory stream */
off_t i_stop;
u8 *p_buffer;
off_t i_start; /* in the buffer position for memory stream */
off_t i_stop;
uint8_t *p_buffer;
} MP4_Stream_t;
......@@ -131,38 +131,38 @@ struct MP4_Box_s;
/* uuid Universal Unique IDentifiers */
typedef struct UUID_s
{
u8 b[16];
uint8_t b[16];
} UUID_t;
/* specific structure for all boxes */
typedef struct MP4_Box_data_ftyp_s
{
u32 i_major_brand;
u32 i_minor_version;
uint32_t i_major_brand;
uint32_t i_minor_version;
u32 i_compatible_brands_count;
u32 *i_compatible_brands;
uint32_t i_compatible_brands_count;
uint32_t *i_compatible_brands;
} MP4_Box_data_ftyp_t;
typedef struct MP4_Box_data_mvhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
u64 i_creation_time;
u64 i_modification_time;
u32 i_timescale;
u64 i_duration;
s32 i_rate;
s16 i_volume;
s16 i_reserved1;
u32 i_reserved2[2];
s32 i_matrix[9];
u32 i_predefined[6];
u32 i_next_track_id;
uint64_t i_creation_time;
uint64_t i_modification_time;
uint32_t i_timescale;
uint64_t i_duration;
int32_t i_rate;
int16_t i_volume;
int16_t i_reserved1;
uint32_t i_reserved2[2];
int32_t i_matrix[9];
uint32_t i_predefined[6];
uint32_t i_next_track_id;
} MP4_Box_data_mvhd_t;
......@@ -171,51 +171,51 @@ typedef struct MP4_Box_data_mvhd_s
#define MP4_TRACK_IN_PREVIEW 0x000004
typedef struct MP4_Box_data_tkhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
u64 i_creation_time;
u64 i_modification_time;
u32 i_track_ID;
u32 i_reserved;
u64 i_duration;
u32 i_reserved2[2];
s16 i_layer;
s16 i_predefined;
s16 i_volume;
u16 i_reserved3;
s32 i_matrix[9];
s32 i_width;
s32 i_height;
uint64_t i_creation_time;
uint64_t i_modification_time;
uint32_t i_track_ID;
uint32_t i_reserved;
uint64_t i_duration;
uint32_t i_reserved2[2];
int16_t i_layer;
int16_t i_predefined;
int16_t i_volume;
uint16_t i_reserved3;
int32_t i_matrix[9];
int32_t i_width;
int32_t i_height;
} MP4_Box_data_tkhd_t;
typedef struct MP4_Box_data_mdhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
u64 i_creation_time;
u64 i_modification_time;
u32 i_timescale;
u64 i_duration;
uint64_t i_creation_time;
uint64_t i_modification_time;
uint32_t i_timescale;
uint64_t i_duration;
/* one bit for pad */
/* unsigned int(5)[3] language difference with 0x60*/
unsigned char i_language[3];
u16 i_predefined;
uint16_t i_predefined;
} MP4_Box_data_mdhd_t;
typedef struct MP4_Box_data_hdlr_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
u32 i_predefined;
u32 i_handler_type; /* "vide" "soun" "hint" "odsm"
uint32_t i_predefined;
uint32_t i_handler_type; /* "vide" "soun" "hint" "odsm"
"crsm" "sdsm" "m7sm" "ocsm"
"ipsm" "mjsm" */
......@@ -225,41 +225,41 @@ typedef struct MP4_Box_data_hdlr_s
typedef struct MP4_Box_data_vmhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
s16 i_graphics_mode;
s16 i_opcolor[3];
int16_t i_graphics_mode;
int16_t i_opcolor[3];
} MP4_Box_data_vmhd_t;
typedef struct MP4_Box_data_smhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
s16 i_balance;
s16 i_reserved;
int16_t i_balance;
int16_t i_reserved;
} MP4_Box_data_smhd_t;
typedef struct MP4_Box_data_hmhd_s
{
u8 i_version;
u32 i_flags;
uint8_t i_version;
uint32_t i_flags;
u16 i_max_PDU_size;
u16 i_avg_PDU_size;
u32 i_max_bitrate;
u32 i_avg_bitrate;
u32 i_reserved;