[vlc-commits] demux: libmp4: add clcp sample desc
Francois Cartegnie
git at videolan.org
Sun Jun 14 16:03:32 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jun 14 12:50:16 2015 +0200| [4f7a9d3d31a7a315c41817fbee70230bbc128695] | committer: Francois Cartegnie
demux: libmp4: add clcp sample desc
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f7a9d3d31a7a315c41817fbee70230bbc128695
---
modules/demux/mp4/libmp4.c | 19 +++++++++++++++++++
modules/demux/mp4/libmp4.h | 8 ++++++++
2 files changed, 27 insertions(+)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 79af23d..97f4290 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -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 */
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 32d4896..0818118 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -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;
More information about the vlc-commits
mailing list