Commit 32272afc authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: handle ttml

parent 5b9e7009
......@@ -1174,6 +1174,10 @@ int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
/* It's a little ugly but .. there are special cases */
switch( p_sample->i_type )
{
case VLC_FOURCC('s','t','p','p'):
p_track->fmt.i_codec = VLC_CODEC_TTML;
break;
case ATOM_c608: /* EIA608 closed captions */
//case ATOM_c708: /* EIA708 closed captions */
p_track->fmt.i_codec = VLC_CODEC_EIA608_1;
......
......@@ -283,6 +283,7 @@ typedef int64_t stime_t;
#define ATOM_text VLC_FOURCC( 't', 'e', 'x', 't' )
#define ATOM_tx3g VLC_FOURCC( 't', 'x', '3', 'g' )
#define ATOM_subp VLC_FOURCC( 's', 'u', 'b', 'p' )
#define ATOM_subt VLC_FOURCC( 's', 'u', 'b', 't' )
#define ATOM_sbtl VLC_FOURCC( 's', 'b', 't', 'l' )
#define ATOM_clcp VLC_FOURCC( 'c', 'l', 'c', 'p' )
#define ATOM_c608 VLC_FOURCC( 'c', '6', '0', '8' )
......
......@@ -519,6 +519,7 @@ static block_t * MP4_Block_Convert( demux_t *p_demux, const mp4_track_t *p_track
{
switch( p_track->fmt.i_codec )
{
case VLC_CODEC_TTML:
case VLC_CODEC_TX3G:
case VLC_CODEC_SPU:
/* accept as-is */
......@@ -3098,6 +3099,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
case( ATOM_tx3g ):
case( ATOM_text ):
case( ATOM_subp ):
case( ATOM_subt ): /* ttml */
case( ATOM_sbtl ):
case( ATOM_clcp ): /* closed captions */
p_track->fmt.i_cat = SPU_ES;
......
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