Commit 245aa586 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

mp4: support iods atom

parent 5a363831
...@@ -2648,6 +2648,40 @@ static int MP4_ReadBox_meta( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -2648,6 +2648,40 @@ static int MP4_ReadBox_meta( stream_t *p_stream, MP4_Box_t *p_box )
return MP4_ReadBoxContainerRaw( p_stream, p_box ); return MP4_ReadBoxContainerRaw( p_stream, p_box );
} }
static int MP4_ReadBox_iods( stream_t *p_stream, MP4_Box_t *p_box )
{
char i_unused;
MP4_READBOX_ENTER( MP4_Box_data_iods_t );
MP4_GETVERSIONFLAGS( p_box->data.p_iods );
MP4_GET1BYTE( i_unused ); /* tag */
MP4_GET1BYTE( i_unused ); /* length */
MP4_GET2BYTES( p_box->data.p_iods->i_object_descriptor ); /* 10bits, 6 other bits
are used for other flags */
MP4_GET1BYTE( p_box->data.p_iods->i_OD_profile_level );
MP4_GET1BYTE( p_box->data.p_iods->i_scene_profile_level );
MP4_GET1BYTE( p_box->data.p_iods->i_audio_profile_level );
MP4_GET1BYTE( p_box->data.p_iods->i_visual_profile_level );
MP4_GET1BYTE( p_box->data.p_iods->i_graphics_profile_level );
#ifdef MP4_VERBOSE
msg_Dbg( p_stream,
"read box: \"iods\" objectDescriptorId: %i, OD: %i, scene: %i, audio: %i, "
"visual: %i, graphics: %i",
p_box->data.p_iods->i_object_descriptor >> 6,
p_box->data.p_iods->i_OD_profile_level,
p_box->data.p_iods->i_scene_profile_level,
p_box->data.p_iods->i_audio_profile_level,
p_box->data.p_iods->i_visual_profile_level,
p_box->data.p_iods->i_graphics_profile_level );
#endif
MP4_READBOX_EXIT( 1 );
}
/* For generic */ /* For generic */
static int MP4_ReadBox_default( stream_t *p_stream, MP4_Box_t *p_box ) static int MP4_ReadBox_default( stream_t *p_stream, MP4_Box_t *p_box )
{ {
...@@ -2760,6 +2794,7 @@ static const struct ...@@ -2760,6 +2794,7 @@ static const struct
{ FOURCC_enda, MP4_ReadBox_enda, MP4_FreeBox_Common }, { FOURCC_enda, MP4_ReadBox_enda, MP4_FreeBox_Common },
{ FOURCC_gnre, MP4_ReadBox_gnre, MP4_FreeBox_Common }, { FOURCC_gnre, MP4_ReadBox_gnre, MP4_FreeBox_Common },
{ FOURCC_trkn, MP4_ReadBox_trkn, MP4_FreeBox_Common }, { FOURCC_trkn, MP4_ReadBox_trkn, MP4_FreeBox_Common },
{ FOURCC_iods, MP4_ReadBox_iods, MP4_FreeBox_Common },
/* Nothing to do with this box */ /* Nothing to do with this box */
{ FOURCC_mdat, MP4_ReadBoxSkip, MP4_FreeBox_Common }, { FOURCC_mdat, MP4_ReadBoxSkip, MP4_FreeBox_Common },
......
...@@ -958,6 +958,20 @@ typedef struct ...@@ -958,6 +958,20 @@ typedef struct
} MP4_Box_data_trkn_t; } MP4_Box_data_trkn_t;
typedef struct
{
uint8_t i_version;
uint32_t i_flags;
uint16_t i_object_descriptor;
uint8_t i_OD_profile_level;
uint8_t i_scene_profile_level;
uint8_t i_audio_profile_level;
uint8_t i_visual_profile_level;
uint8_t i_graphics_profile_level;
} MP4_Box_data_iods_t;
/* /*
typedef struct MP4_Box_data__s typedef struct MP4_Box_data__s
{ {
...@@ -998,6 +1012,7 @@ typedef union MP4_Box_data_s ...@@ -998,6 +1012,7 @@ typedef union MP4_Box_data_s
MP4_Box_data_enda_t *p_enda; MP4_Box_data_enda_t *p_enda;
MP4_Box_data_gnre_t *p_gnre; MP4_Box_data_gnre_t *p_gnre;
MP4_Box_data_trkn_t *p_trkn; MP4_Box_data_trkn_t *p_trkn;
MP4_Box_data_iods_t *p_iods;
MP4_Box_data_stsz_t *p_stsz; MP4_Box_data_stsz_t *p_stsz;
MP4_Box_data_stz2_t *p_stz2; MP4_Box_data_stz2_t *p_stz2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment