Commit dc437b8d authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Added more annotations boxes

* if we find the track name, then store in the fmt.
parent 0dd2458b
......@@ -2376,6 +2376,16 @@ static struct
{ FOURCC_0xa9prd,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9prf,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9src,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9alb,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9dis,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9enc,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9gen,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9trk,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9dsa,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9hst,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9url,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9ope,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
{ FOURCC_0xa9com,MP4_ReadBox_0xa9xxx, MP4_FreeBox_0xa9xxx },
/* Last entry */
{ 0, MP4_ReadBox_default, NULL }
......
......@@ -187,6 +187,18 @@
#define FOURCC_0xa9prd VLC_FOURCC( 0xa9, 'p', 'r', 'd' )
#define FOURCC_0xa9prf VLC_FOURCC( 0xa9, 'p', 'r', 'f' )
#define FOURCC_0xa9src VLC_FOURCC( 0xa9, 's', 'r', 'c' )
#define FOURCC_0xa9alb VLC_FOURCC( 0xa9, 'a', 'l', 'b' )
#define FOURCC_0xa9dis VLC_FOURCC( 0xa9, 'd', 'i', 's' )
#define FOURCC_0xa9enc VLC_FOURCC( 0xa9, 'e', 'n', 'c' )
#define FOURCC_0xa9trk VLC_FOURCC( 0xa9, 't', 'r', 'k' )
#define FOURCC_0xa9url VLC_FOURCC( 0xa9, 'u', 'r', 'l' )
#define FOURCC_0xa9dsa VLC_FOURCC( 0xa9, 'd', 's', 'a' )
#define FOURCC_0xa9hst VLC_FOURCC( 0xa9, 'h', 's', 't' )
#define FOURCC_0xa9ope VLC_FOURCC( 0xa9, 'o', 'p', 'e' )
#define FOURCC_0xa9wrt VLC_FOURCC( 0xa9, 'w', 'r', 't' )
#define FOURCC_0xa9com VLC_FOURCC( 0xa9, 'c', 'o', 'm' )
#define FOURCC_0xa9gen VLC_FOURCC( 0xa9, 'g', 'e', 'n' )
#define FOURCC_WLOC VLC_FOURCC( 'W', 'L', 'O', 'C' )
/* Do you want some debug information on all read boxes ? */
#define MP4_VERBOSE 1
......
......@@ -751,7 +751,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
{
switch( p_0xa9xxx->i_type )
{
case FOURCC_0xa9nam:
case FOURCC_0xa9nam: /* Full name */
vlc_meta_Add( meta, VLC_META_TITLE,
p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
......@@ -767,24 +767,39 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
vlc_meta_Add( meta, VLC_META_COPYRIGHT,
p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
case FOURCC_0xa9day:
case FOURCC_0xa9day: /* Creation Date */
vlc_meta_Add( meta, VLC_META_DATE,
p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
case FOURCC_0xa9des:
case FOURCC_0xa9des: /* Description */
vlc_meta_Add( meta, VLC_META_DESCRIPTION,
p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
case FOURCC_0xa9gen: /* Genre */
vlc_meta_Add( meta, VLC_META_GENRE,
p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
case FOURCC_0xa9swr:
case FOURCC_0xa9inf:
case FOURCC_0xa9dir:
case FOURCC_0xa9cmt:
case FOURCC_0xa9req:
case FOURCC_0xa9fmt:
case FOURCC_0xa9prd:
case FOURCC_0xa9prf:
case FOURCC_0xa9src:
case FOURCC_0xa9inf: /* Information */
case FOURCC_0xa9alb: /* Album */
case FOURCC_0xa9dir: /* Director */
case FOURCC_0xa9dis: /* Disclaimer */
case FOURCC_0xa9enc: /* Encoded By */
case FOURCC_0xa9trk: /* Track */
case FOURCC_0xa9cmt: /* Commment */
case FOURCC_0xa9url: /* URL */
case FOURCC_0xa9req: /* Requirements */
case FOURCC_0xa9fmt: /* Original Format */
case FOURCC_0xa9dsa: /* Display Source As */
case FOURCC_0xa9hst: /* Host Computer */
case FOURCC_0xa9prd: /* Producer */
case FOURCC_0xa9prf: /* Performers */
case FOURCC_0xa9ope: /* Original Performer */
case FOURCC_0xa9src: /* Providers Source Content */
case FOURCC_0xa9wrt: /* Writer */
case FOURCC_0xa9com: /* Composer */
case FOURCC_WLOC: /* Window Location */
/* TODO one day, but they aren't really meaningfull */
break;
......@@ -1547,6 +1562,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
MP4_Box_t *p_elst;
MP4_Box_t *p_mdhd;
MP4_Box_t *p_udta;
MP4_Box_t *p_hdlr;
MP4_Box_t *p_vmhd;
......@@ -1669,6 +1685,22 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track->fmt.psz_language = strdup( language );
}
p_udta = MP4_BoxGet( p_box_trak, "udta" );
if( p_udta )
{
MP4_Box_t *p_0xa9xxx;
for( p_0xa9xxx = p_udta->p_first; p_0xa9xxx != NULL;
p_0xa9xxx = p_0xa9xxx->p_next )
{
switch( p_0xa9xxx->i_type )
{
case FOURCC_0xa9nam:
p_track->fmt.psz_description = strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text );
break;
}
}
}
/* fxi i_timescale for AUDIO_ES with i_qt_version == 0 */
if( p_track->fmt.i_cat == AUDIO_ES ) //&& p_track->i_sample_size == 1 )
{
......
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