Commit 0de00b2c authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: libmp4: split major brands from atoms

parent b50d8373
...@@ -28,6 +28,14 @@ ...@@ -28,6 +28,14 @@
#define BLOCK16x16 (1<<16) #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_root VLC_FOURCC( 'r', 'o', 'o', 't' )
#define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' ) #define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
...@@ -111,8 +119,6 @@ ...@@ -111,8 +119,6 @@
#define ATOM_hnti VLC_FOURCC( 'h', 'n', 't', 'i' ) #define ATOM_hnti VLC_FOURCC( 'h', 'n', 't', 'i' )
#define ATOM_rtp VLC_FOURCC( 'r', 't', 'p', ' ' ) #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_esds VLC_FOURCC( 'e', 's', 'd', 's' )
#define ATOM_lpcm VLC_FOURCC( 'l', 'p', 'c', 'm' ) #define ATOM_lpcm VLC_FOURCC( 'l', 'p', 'c', 'm' )
......
...@@ -632,15 +632,15 @@ static int Open( vlc_object_t * p_this ) ...@@ -632,15 +632,15 @@ static int Open( vlc_object_t * p_this )
{ {
switch( BOXDATA(p_ftyp)->i_major_brand ) switch( BOXDATA(p_ftyp)->i_major_brand )
{ {
case( ATOM_isom ): case MAJOR_isom:
msg_Dbg( p_demux, msg_Dbg( p_demux,
"ISO Media file (isom) version %d.", "ISO Media file (isom) version %d.",
BOXDATA(p_ftyp)->i_minor_version ); BOXDATA(p_ftyp)->i_minor_version );
break; break;
case( ATOM_3gp4 ): case MAJOR_3gp4:
case( VLC_FOURCC( '3', 'g', 'p', '5' ) ): case MAJOR_3gp5:
case( VLC_FOURCC( '3', 'g', 'p', '6' ) ): case MAJOR_3gp6:
case( VLC_FOURCC( '3', 'g', 'p', '7' ) ): case MAJOR_3gp7:
msg_Dbg( p_demux, "3GPP Media file Release: %c", msg_Dbg( p_demux, "3GPP Media file Release: %c",
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN
BOXDATA(p_ftyp)->i_major_brand BOXDATA(p_ftyp)->i_major_brand
...@@ -649,10 +649,10 @@ static int Open( vlc_object_t * p_this ) ...@@ -649,10 +649,10 @@ static int Open( vlc_object_t * p_this )
#endif #endif
); );
break; break;
case( VLC_FOURCC( 'q', 't', ' ', ' ') ): case MAJOR_qt__:
msg_Dbg( p_demux, "Apple QuickTime file" ); msg_Dbg( p_demux, "Apple QuickTime file" );
break; break;
case( VLC_FOURCC( 'i', 's', 'm', 'l') ): case MAJOR_isml:
msg_Dbg( p_demux, "PIFF (= isml = fMP4) file" ); msg_Dbg( p_demux, "PIFF (= isml = fMP4) file" );
break; break;
default: default:
......
Supports Markdown
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