Commit 4f7a9d3d authored by Francois Cartegnie's avatar Francois Cartegnie

demux: libmp4: add clcp sample desc

parent 8d2fd6f4
......@@ -2206,6 +2206,24 @@ static int MP4_ReadBox_sample_text( stream_t *p_stream, MP4_Box_t *p_box )
MP4_READBOX_EXIT( 1 );
}
static int MP4_ReadBox_sample_clcp( stream_t *p_stream, MP4_Box_t *p_box )
{
p_box->i_handler = ATOM_clcp;
MP4_READBOX_ENTER( MP4_Box_data_sample_clcp_t, NULL );
if( i_read < 8 )
MP4_READBOX_EXIT( 0 );
for( int i=0; i<6; i++ )
MP4_GET1BYTE( p_box->data.p_sample_clcp->i_reserved1[i] );
MP4_GET2BYTES( p_box->data.p_sample_clcp->i_data_reference_index );
#ifdef MP4_VERBOSE
msg_Dbg( p_stream, "read box: \"clcp\" in stsd" );
#endif
MP4_READBOX_EXIT( 1 );
}
static int MP4_ReadBox_sample_tx3g( stream_t *p_stream, MP4_Box_t *p_box )
{
p_box->i_handler = ATOM_text;
......@@ -3684,6 +3702,7 @@ static const struct
/* Subtitles */
{ ATOM_tx3g, MP4_ReadBox_sample_tx3g, 0 },
{ ATOM_c608, MP4_ReadBox_sample_clcp, ATOM_stsd },
//{ ATOM_text, MP4_ReadBox_sample_text, 0 },
/* for codecs */
......
......@@ -670,6 +670,13 @@ typedef struct
// TODO to complete
} MP4_Box_data_sample_text_t;
typedef struct
{
uint8_t i_reserved1[6];
uint16_t i_data_reference_index;
} MP4_Box_data_sample_clcp_t;
typedef struct MP4_Box_data_sample_hint_s
{
uint8_t i_reserved1[6];
......@@ -1410,6 +1417,7 @@ typedef union MP4_Box_data_s
MP4_Box_data_sample_vide_t *p_sample_vide;
MP4_Box_data_sample_soun_t *p_sample_soun;
MP4_Box_data_sample_text_t *p_sample_text;
MP4_Box_data_sample_clcp_t *p_sample_clcp;
MP4_Box_data_sample_hint_t *p_sample_hint;
MP4_Box_data_esds_t *p_esds;
......
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