Commit 05368cee authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MP4: FOURCC_* => ATOM_*

The atom names are like FOURCC, but they are not fourcc
parent 197852f8
...@@ -281,7 +281,7 @@ int drms_init( void *_p_drms, uint32_t i_type, ...@@ -281,7 +281,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
switch( i_type ) switch( i_type )
{ {
case FOURCC_user: case ATOM_user:
if( i_len < sizeof(p_drms->i_user) ) if( i_len < sizeof(p_drms->i_user) )
{ {
i_ret = -2; i_ret = -2;
...@@ -291,7 +291,7 @@ int drms_init( void *_p_drms, uint32_t i_type, ...@@ -291,7 +291,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
p_drms->i_user = U32_AT( p_info ); p_drms->i_user = U32_AT( p_info );
break; break;
case FOURCC_key: case ATOM_key:
if( i_len < sizeof(p_drms->i_key) ) if( i_len < sizeof(p_drms->i_key) )
{ {
i_ret = -2; i_ret = -2;
...@@ -301,7 +301,7 @@ int drms_init( void *_p_drms, uint32_t i_type, ...@@ -301,7 +301,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
p_drms->i_key = U32_AT( p_info ); p_drms->i_key = U32_AT( p_info );
break; break;
case FOURCC_iviv: case ATOM_iviv:
if( i_len < sizeof(p_drms->p_key) ) if( i_len < sizeof(p_drms->p_key) )
{ {
i_ret = -2; i_ret = -2;
...@@ -311,7 +311,7 @@ int drms_init( void *_p_drms, uint32_t i_type, ...@@ -311,7 +311,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
memcpy( p_drms->p_iviv, p_info, 16 ); memcpy( p_drms->p_iviv, p_info, 16 );
break; break;
case FOURCC_name: case ATOM_name:
p_drms->p_name = (uint8_t*) strdup( (char *)p_info ); p_drms->p_name = (uint8_t*) strdup( (char *)p_info );
if( p_drms->p_name == NULL ) if( p_drms->p_name == NULL )
...@@ -320,7 +320,7 @@ int drms_init( void *_p_drms, uint32_t i_type, ...@@ -320,7 +320,7 @@ int drms_init( void *_p_drms, uint32_t i_type,
} }
break; break;
case FOURCC_priv: case ATOM_priv:
{ {
uint32_t p_priv[ 64 ]; uint32_t p_priv[ 64 ];
struct md5_s md5; struct md5_s md5;
......
This diff is collapsed.
This diff is collapsed.
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "libmp4.h" #include "libmp4.h"
#include "drms.h" #include "drms.h"
#include "id3genres.h" /* for FOURCC_gnre */ #include "id3genres.h" /* for ATOM_gnre */
/***************************************************************************** /*****************************************************************************
* Module descriptor * Module descriptor
...@@ -283,15 +283,15 @@ static int Open( vlc_object_t * p_this ) ...@@ -283,15 +283,15 @@ static int Open( vlc_object_t * p_this )
switch( VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ) ) switch( VLC_FOURCC( p_peek[4], p_peek[5], p_peek[6], p_peek[7] ) )
{ {
case FOURCC_ftyp: case ATOM_ftyp:
case FOURCC_moov: case ATOM_moov:
case FOURCC_foov: case ATOM_foov:
case FOURCC_moof: case ATOM_moof:
case FOURCC_mdat: case ATOM_mdat:
case FOURCC_udta: case ATOM_udta:
case FOURCC_free: case ATOM_free:
case FOURCC_skip: case ATOM_skip:
case FOURCC_wide: case ATOM_wide:
case VLC_FOURCC( 'p', 'n', 'o', 't' ): case VLC_FOURCC( 'p', 'n', 'o', 't' ):
break; break;
default: default:
...@@ -326,12 +326,12 @@ static int Open( vlc_object_t * p_this ) ...@@ -326,12 +326,12 @@ static int Open( vlc_object_t * p_this )
{ {
switch( p_ftyp->data.p_ftyp->i_major_brand ) switch( p_ftyp->data.p_ftyp->i_major_brand )
{ {
case( FOURCC_isom ): case( ATOM_isom ):
msg_Dbg( p_demux, msg_Dbg( p_demux,
"ISO Media file (isom) version %d.", "ISO Media file (isom) version %d.",
p_ftyp->data.p_ftyp->i_minor_version ); p_ftyp->data.p_ftyp->i_minor_version );
break; break;
case( FOURCC_3gp4 ): case( ATOM_3gp4 ):
case( VLC_FOURCC( '3', 'g', 'p', '5' ) ): case( VLC_FOURCC( '3', 'g', 'p', '5' ) ):
case( VLC_FOURCC( '3', 'g', 'p', '6' ) ): case( VLC_FOURCC( '3', 'g', 'p', '6' ) ):
case( VLC_FOURCC( '3', 'g', 'p', '7' ) ): case( VLC_FOURCC( '3', 'g', 'p', '7' ) ):
...@@ -374,7 +374,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -374,7 +374,7 @@ static int Open( vlc_object_t * p_this )
} }
} }
/* we have a free box as a moov, rename it */ /* we have a free box as a moov, rename it */
p_foov->i_type = FOURCC_moov; p_foov->i_type = ATOM_moov;
} }
if( ( p_rmra = MP4_BoxGet( p_sys->p_root, "/moov/rmra" ) ) ) if( ( p_rmra = MP4_BoxGet( p_sys->p_root, "/moov/rmra" ) ) )
...@@ -899,41 +899,41 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -899,41 +899,41 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
/* XXX Becarefull p_udta can have box that are not 0xa9xx */ /* XXX Becarefull p_udta can have box that are not 0xa9xx */
switch( p_0xa9xxx->i_type ) switch( p_0xa9xxx->i_type )
{ {
case FOURCC_0xa9nam: /* Full name */ case ATOM_0xa9nam: /* Full name */
SET( vlc_meta_SetTitle ); SET( vlc_meta_SetTitle );
break; break;
case FOURCC_0xa9aut: case ATOM_0xa9aut:
SET( vlc_meta_SetArtist ); SET( vlc_meta_SetArtist );
break; break;
case FOURCC_0xa9ART: case ATOM_0xa9ART:
SET( vlc_meta_SetArtist ); SET( vlc_meta_SetArtist );
break; break;
case FOURCC_0xa9cpy: case ATOM_0xa9cpy:
SET( vlc_meta_SetCopyright ); SET( vlc_meta_SetCopyright );
break; break;
case FOURCC_0xa9day: /* Creation Date */ case ATOM_0xa9day: /* Creation Date */
SET( vlc_meta_SetDate ); SET( vlc_meta_SetDate );
break; break;
case FOURCC_0xa9des: /* Description */ case ATOM_0xa9des: /* Description */
SET( vlc_meta_SetDescription ); SET( vlc_meta_SetDescription );
break; break;
case FOURCC_0xa9gen: /* Genre */ case ATOM_0xa9gen: /* Genre */
SET( vlc_meta_SetGenre ); SET( vlc_meta_SetGenre );
break; break;
case FOURCC_gnre: case ATOM_gnre:
if( p_0xa9xxx->data.p_gnre->i_genre <= NUM_GENRES ) if( p_0xa9xxx->data.p_gnre->i_genre <= NUM_GENRES )
vlc_meta_SetGenre( p_meta, ppsz_genres[p_0xa9xxx->data.p_gnre->i_genre - 1] ); vlc_meta_SetGenre( p_meta, ppsz_genres[p_0xa9xxx->data.p_gnre->i_genre - 1] );
break; break;
case FOURCC_0xa9alb: /* Album */ case ATOM_0xa9alb: /* Album */
SET( vlc_meta_SetAlbum ); SET( vlc_meta_SetAlbum );
break; break;
case FOURCC_0xa9trk: /* Track */ case ATOM_0xa9trk: /* Track */
SET( vlc_meta_SetTrackNum ); SET( vlc_meta_SetTrackNum );
break; break;
case FOURCC_trkn: case ATOM_trkn:
{ {
char psz_trck[11]; char psz_trck[11];
snprintf( psz_trck, sizeof( psz_trck ), "%i", snprintf( psz_trck, sizeof( psz_trck ), "%i",
...@@ -941,16 +941,16 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -941,16 +941,16 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
vlc_meta_SetTrackNum( p_meta, psz_trck ); vlc_meta_SetTrackNum( p_meta, psz_trck );
break; break;
} }
case FOURCC_0xa9cmt: /* Commment */ case ATOM_0xa9cmt: /* Commment */
SET( vlc_meta_SetDescription ); SET( vlc_meta_SetDescription );
break; break;
case FOURCC_0xa9url: /* URL */ case ATOM_0xa9url: /* URL */
SET( vlc_meta_SetURL ); SET( vlc_meta_SetURL );
break; break;
case FOURCC_0xa9too: /* Encoder Tool */ case ATOM_0xa9too: /* Encoder Tool */
case FOURCC_0xa9enc: /* Encoded By */ case ATOM_0xa9enc: /* Encoded By */
SET( vlc_meta_SetEncodedBy ); SET( vlc_meta_SetEncodedBy );
break; break;
...@@ -960,26 +960,26 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) ...@@ -960,26 +960,26 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
#undef SET #undef SET
static const struct { uint32_t xa9_type; char metadata[25]; } xa9typetoextrameta[] = static const struct { uint32_t xa9_type; char metadata[25]; } xa9typetoextrameta[] =
{ {
{ FOURCC_0xa9wrt, N_("Writer") }, { ATOM_0xa9wrt, N_("Writer") },
{ FOURCC_0xa9com, N_("Composr") }, { ATOM_0xa9com, N_("Composr") },
{ FOURCC_0xa9prd, N_("Producer") }, { ATOM_0xa9prd, N_("Producer") },
{ FOURCC_0xa9inf, N_("Information") }, { ATOM_0xa9inf, N_("Information") },
{ FOURCC_0xa9dir, N_("Director") }, { ATOM_0xa9dir, N_("Director") },
{ FOURCC_0xa9dis, N_("Disclaimer") }, { ATOM_0xa9dis, N_("Disclaimer") },
{ FOURCC_0xa9req, N_("Requirements") }, { ATOM_0xa9req, N_("Requirements") },
{ FOURCC_0xa9fmt, N_("Original Format") }, { ATOM_0xa9fmt, N_("Original Format") },
{ FOURCC_0xa9dsa, N_("Display Source As") }, { ATOM_0xa9dsa, N_("Display Source As") },
{ FOURCC_0xa9hst, N_("Host Computer") }, { ATOM_0xa9hst, N_("Host Computer") },
{ FOURCC_0xa9prf, N_("Performers") }, { ATOM_0xa9prf, N_("Performers") },
{ FOURCC_0xa9ope, N_("Original Performer") }, { ATOM_0xa9ope, N_("Original Performer") },
{ FOURCC_0xa9src, N_("Providers Source Content") }, { ATOM_0xa9src, N_("Providers Source Content") },
{ FOURCC_0xa9wrn, N_("Warning") }, { ATOM_0xa9wrn, N_("Warning") },
{ FOURCC_0xa9swr, N_("Software") }, { ATOM_0xa9swr, N_("Software") },
{ FOURCC_0xa9lyr, N_("Lyrics") }, { ATOM_0xa9lyr, N_("Lyrics") },
{ FOURCC_0xa9mak, N_("Make") }, { ATOM_0xa9mak, N_("Make") },
{ FOURCC_0xa9mod, N_("Model") }, { ATOM_0xa9mod, N_("Model") },
{ FOURCC_0xa9PRD, N_("Product") }, { ATOM_0xa9PRD, N_("Product") },
{ FOURCC_0xa9grp, N_("Grouping") }, { ATOM_0xa9grp, N_("Grouping") },
{ 0, "" }, { 0, "" },
}; };
for( unsigned i = 0; xa9typetoextrameta[i].xa9_type; i++ ) for( unsigned i = 0; xa9typetoextrameta[i].xa9_type; i++ )
...@@ -2319,7 +2319,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2319,7 +2319,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
switch( p_hdlr->data.p_hdlr->i_handler_type ) switch( p_hdlr->data.p_hdlr->i_handler_type )
{ {
case( FOURCC_soun ): case( ATOM_soun ):
if( !( p_smhd = MP4_BoxGet( p_box_trak, "mdia/minf/smhd" ) ) ) if( !( p_smhd = MP4_BoxGet( p_box_trak, "mdia/minf/smhd" ) ) )
{ {
return; return;
...@@ -2327,7 +2327,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2327,7 +2327,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track->fmt.i_cat = AUDIO_ES; p_track->fmt.i_cat = AUDIO_ES;
break; break;
case( FOURCC_vide ): case( ATOM_vide ):
if( !( p_vmhd = MP4_BoxGet( p_box_trak, "mdia/minf/vmhd" ) ) ) if( !( p_vmhd = MP4_BoxGet( p_box_trak, "mdia/minf/vmhd" ) ) )
{ {
return; return;
...@@ -2335,10 +2335,10 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2335,10 +2335,10 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
p_track->fmt.i_cat = VIDEO_ES; p_track->fmt.i_cat = VIDEO_ES;
break; break;
case( FOURCC_text ): case( ATOM_text ):
case( FOURCC_subp ): case( ATOM_subp ):
case( FOURCC_tx3g ): case( ATOM_tx3g ):
case( FOURCC_sbtl ): case( ATOM_sbtl ):
p_track->fmt.i_cat = SPU_ES; p_track->fmt.i_cat = SPU_ES;
break; break;
...@@ -2409,7 +2409,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track, ...@@ -2409,7 +2409,7 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
{ {
switch( p_0xa9xxx->i_type ) switch( p_0xa9xxx->i_type )
{ {
case FOURCC_0xa9nam: case ATOM_0xa9nam:
p_track->fmt.psz_description = p_track->fmt.psz_description =
strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text ); strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text );
break; break;
......
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