]> git.sesse.net Git - vlc/commitdiff
demux: libmp4: split major brands from atoms
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 16 Oct 2014 17:50:44 +0000 (19:50 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 16 Oct 2014 18:05:02 +0000 (20:05 +0200)
modules/demux/mp4/libmp4.h
modules/demux/mp4/mp4.c

index bfd12190d6b33afe738724c57d6b90b6585d5fee..041644cf72bdc7a09faf5499fc3e2b7ec47f664c 100644 (file)
 
 #define BLOCK16x16 (1<<16)
 
+#define MAJOR_3gp4 VLC_FOURCC( '3', 'g', 'p', '4' )
+#define MAJOR_3gp5 VLC_FOURCC( '3', 'g', 'p', '5' )
+#define MAJOR_3gp6 VLC_FOURCC( '3', 'g', 'p', '6' )
+#define MAJOR_3gp7 VLC_FOURCC( '3', 'g', 'p', '7' )
+#define MAJOR_isml VLC_FOURCC( 'i', 's', 'm', 'l' )
+#define MAJOR_isom VLC_FOURCC( 'i', 's', 'o', 'm' )
+#define MAJOR_qt__ VLC_FOURCC( 'q', 't', ' ', ' ' )
+
 #define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' )
 #define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
 
 #define ATOM_hnti VLC_FOURCC( 'h', 'n', 't', 'i' )
 #define ATOM_rtp  VLC_FOURCC( 'r', 't', 'p', ' ' )
 
-#define ATOM_isom VLC_FOURCC( 'i', 's', 'o', 'm' )
-#define ATOM_3gp4 VLC_FOURCC( '3', 'g', 'p', '4' )
 #define ATOM_esds VLC_FOURCC( 'e', 's', 'd', 's' )
 
 #define ATOM_lpcm VLC_FOURCC( 'l', 'p', 'c', 'm' )
index c172ed427a4db3a5416f34a341cb874eda2c9ba1..df9fd4a1e10eee26719c28ce010cda155afebb4f 100644 (file)
@@ -632,15 +632,15 @@ static int Open( vlc_object_t * p_this )
     {
         switch( BOXDATA(p_ftyp)->i_major_brand )
         {
-            case( ATOM_isom ):
+            case MAJOR_isom:
                 msg_Dbg( p_demux,
                          "ISO Media file (isom) version %d.",
                          BOXDATA(p_ftyp)->i_minor_version );
                 break;
-            case( ATOM_3gp4 ):
-            case( VLC_FOURCC( '3', 'g', 'p', '5' ) ):
-            case( VLC_FOURCC( '3', 'g', 'p', '6' ) ):
-            case( VLC_FOURCC( '3', 'g', 'p', '7' ) ):
+            case MAJOR_3gp4:
+            case MAJOR_3gp5:
+            case MAJOR_3gp6:
+            case MAJOR_3gp7:
                 msg_Dbg( p_demux, "3GPP Media file Release: %c",
 #ifdef WORDS_BIGENDIAN
                         BOXDATA(p_ftyp)->i_major_brand
@@ -649,10 +649,10 @@ static int Open( vlc_object_t * p_this )
 #endif
                         );
                 break;
-            case( VLC_FOURCC( 'q', 't', ' ', ' ') ):
+            case MAJOR_qt__:
                 msg_Dbg( p_demux, "Apple QuickTime file" );
                 break;
-            case( VLC_FOURCC( 'i', 's', 'm', 'l') ):
+            case MAJOR_isml:
                 msg_Dbg( p_demux, "PIFF (= isml = fMP4) file" );
                 break;
             default: