[vlc-commits] demux: libmp4: split major brands from atoms
Francois Cartegnie
git at videolan.org
Thu Oct 16 20:05:23 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 16 19:50:44 2014 +0200| [0de00b2c7418586032c2fc45de42c580ca2e760a] | committer: Francois Cartegnie
demux: libmp4: split major brands from atoms
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0de00b2c7418586032c2fc45de42c580ca2e760a
---
modules/demux/mp4/libmp4.h | 10 ++++++++--
modules/demux/mp4/mp4.c | 14 +++++++-------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index bfd1219..041644c 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -28,6 +28,14 @@
#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' )
@@ -111,8 +119,6 @@
#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' )
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index c172ed4..df9fd4a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -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:
More information about the vlc-commits
mailing list