[vlc-commits] demux: libmp4: rename brand defines
Francois Cartegnie
git at videolan.org
Fri Nov 9 17:05:36 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Nov 9 16:22:03 2018 +0100| [ad74c9c2556a7c6f264987e3cde7c0cb49ea2a87] | committer: Francois Cartegnie
demux: libmp4: rename brand defines
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad74c9c2556a7c6f264987e3cde7c0cb49ea2a87
---
modules/demux/mp4/heif.c | 18 ++++-----
modules/demux/mp4/libmp4.h | 44 +++++++++++-----------
modules/demux/mp4/mp4.c | 32 ++++++++--------
.../demux/smooth/playlist/ForgedInitSegment.cpp | 2 +-
modules/mux/mp4/libmp4mux.c | 10 ++---
modules/mux/mp4/mp4.c | 8 ++--
6 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/modules/demux/mp4/heif.c b/modules/demux/mp4/heif.c
index b8f07b99b7..a2cefecdc8 100644
--- a/modules/demux/mp4/heif.c
+++ b/modules/demux/mp4/heif.c
@@ -446,16 +446,16 @@ int OpenHEIF( vlc_object_t * p_this )
switch( VLC_FOURCC( p_peek[8], p_peek[9], p_peek[10], p_peek[11] ) )
{
- case MAJOR_mif1:
- case MAJOR_heic:
- case MAJOR_heix:
- case MAJOR_jpeg:
- case MAJOR_avci:
+ case BRAND_mif1:
+ case BRAND_heic:
+ case BRAND_heix:
+ case BRAND_jpeg:
+ case BRAND_avci:
break;
- case MAJOR_msf1:
- case MAJOR_hevc:
- case MAJOR_hevx:
- case MAJOR_avcs:
+ case BRAND_msf1:
+ case BRAND_hevc:
+ case BRAND_hevx:
+ case BRAND_avcs:
default:
return VLC_EGENERIC;
}
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index bb21efe785..15c00ce420 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -30,28 +30,28 @@ typedef int64_t stime_t;
#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 MAJOR_f4v VLC_FOURCC( 'f', '4', 'v', ' ' ) /* Adobe Flash */
-#define MAJOR_dash VLC_FOURCC( 'd', 'a', 's', 'h' )
-#define MAJOR_mp41 VLC_FOURCC( 'm', 'p', '4', '1' )
-#define MAJOR_avc1 VLC_FOURCC( 'a', 'v', 'c', '1' )
-#define MAJOR_M4A VLC_FOURCC( 'M', '4', 'A', ' ' )
-#define MAJOR_mif1 VLC_FOURCC( 'm', 'i', 'f', '1' ) /* heif */
-#define MAJOR_msf1 VLC_FOURCC( 'm', 's', 'f', '1' ) /* heif */
-#define MAJOR_heic VLC_FOURCC( 'h', 'e', 'i', 'c' ) /* heif */
-#define MAJOR_heix VLC_FOURCC( 'h', 'e', 'i', 'x' ) /* heif */
-#define MAJOR_hevc VLC_FOURCC( 'h', 'e', 'v', 'c' ) /* heif */
-#define MAJOR_hevx VLC_FOURCC( 'h', 'e', 'v', 'x' ) /* heif */
-#define MAJOR_jpeg VLC_FOURCC( 'j', 'p', 'e', 'g' ) /* heif */
-#define MAJOR_jpgs VLC_FOURCC( 'j', 'p', 'g', 's' ) /* heif */
-#define MAJOR_avci VLC_FOURCC( 'a', 'v', 'c', 'i' ) /* heif */
-#define MAJOR_avcs VLC_FOURCC( 'a', 'v', 'c', 's' ) /* heif */
+#define BRAND_3gp4 VLC_FOURCC( '3', 'g', 'p', '4' )
+#define BRAND_3gp5 VLC_FOURCC( '3', 'g', 'p', '5' )
+#define BRAND_3gp6 VLC_FOURCC( '3', 'g', 'p', '6' )
+#define BRAND_3gp7 VLC_FOURCC( '3', 'g', 'p', '7' )
+#define BRAND_isml VLC_FOURCC( 'i', 's', 'm', 'l' )
+#define BRAND_isom VLC_FOURCC( 'i', 's', 'o', 'm' )
+#define BRAND_qt__ VLC_FOURCC( 'q', 't', ' ', ' ' )
+#define BRAND_f4v VLC_FOURCC( 'f', '4', 'v', ' ' ) /* Adobe Flash */
+#define BRAND_dash VLC_FOURCC( 'd', 'a', 's', 'h' )
+#define BRAND_mp41 VLC_FOURCC( 'm', 'p', '4', '1' )
+#define BRAND_avc1 VLC_FOURCC( 'a', 'v', 'c', '1' )
+#define BRAND_M4A VLC_FOURCC( 'M', '4', 'A', ' ' )
+#define BRAND_mif1 VLC_FOURCC( 'm', 'i', 'f', '1' ) /* heif */
+#define BRAND_msf1 VLC_FOURCC( 'm', 's', 'f', '1' ) /* heif */
+#define BRAND_heic VLC_FOURCC( 'h', 'e', 'i', 'c' ) /* heif */
+#define BRAND_heix VLC_FOURCC( 'h', 'e', 'i', 'x' ) /* heif */
+#define BRAND_hevc VLC_FOURCC( 'h', 'e', 'v', 'c' ) /* heif */
+#define BRAND_hevx VLC_FOURCC( 'h', 'e', 'v', 'x' ) /* heif */
+#define BRAND_jpeg VLC_FOURCC( 'j', 'p', 'e', 'g' ) /* heif */
+#define BRAND_jpgs VLC_FOURCC( 'j', 'p', 'g', 's' ) /* heif */
+#define BRAND_avci VLC_FOURCC( 'a', 'v', 'c', 'i' ) /* heif */
+#define BRAND_avcs VLC_FOURCC( 'a', 'v', 'c', 's' ) /* heif */
#define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' )
#define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 7b7f03cabb..59f09a16af 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -744,13 +744,13 @@ static int Open( vlc_object_t * p_this )
switch( VLC_FOURCC(p_peek[8], p_peek[9], p_peek[10], p_peek[11]) )
{
/* HEIF pictures goes to heif demux */
- case MAJOR_heic:
- case MAJOR_heix:
- case MAJOR_mif1:
- case MAJOR_jpeg:
- case MAJOR_avci:
+ case BRAND_heic:
+ case BRAND_heix:
+ case BRAND_mif1:
+ case BRAND_jpeg:
+ case BRAND_avci:
/* We don't yet support f4v, but avformat does. */
- case MAJOR_f4v:
+ case BRAND_f4v:
return VLC_EGENERIC;
default:
break;
@@ -788,28 +788,28 @@ static int Open( vlc_object_t * p_this )
{
switch( BOXDATA(p_ftyp)->i_major_brand )
{
- case MAJOR_isom:
+ case BRAND_isom:
msg_Dbg( p_demux,
"ISO Media (isom) version %d.",
BOXDATA(p_ftyp)->i_minor_version );
break;
- case MAJOR_3gp4:
- case MAJOR_3gp5:
- case MAJOR_3gp6:
- case MAJOR_3gp7:
+ case BRAND_3gp4:
+ case BRAND_3gp5:
+ case BRAND_3gp6:
+ case BRAND_3gp7:
msg_Dbg( p_demux, "3GPP Media Release: %4.4s",
(char *)&BOXDATA(p_ftyp)->i_major_brand );
break;
- case MAJOR_qt__:
+ case BRAND_qt__:
msg_Dbg( p_demux, "Apple QuickTime media" );
break;
- case MAJOR_isml:
+ case BRAND_isml:
msg_Dbg( p_demux, "PIFF (= isml = fMP4) media" );
break;
- case MAJOR_dash:
+ case BRAND_dash:
msg_Dbg( p_demux, "DASH Stream" );
break;
- case MAJOR_M4A:
+ case BRAND_M4A:
msg_Dbg( p_demux, "iTunes audio" );
if( var_InheritBool( p_demux, CFG_PREFIX"m4a-audioonly" ) )
p_sys->hacks.es_cat_filters = AUDIO_ES;
@@ -823,7 +823,7 @@ static int Open( vlc_object_t * p_this )
/* also lookup in compatibility list */
for(uint32_t i=0; i<BOXDATA(p_ftyp)->i_compatible_brands_count; i++)
{
- if (BOXDATA(p_ftyp)->i_compatible_brands[i] == MAJOR_dash)
+ if (BOXDATA(p_ftyp)->i_compatible_brands[i] == BRAND_dash)
{
msg_Dbg( p_demux, "DASH Stream" );
}
diff --git a/modules/demux/smooth/playlist/ForgedInitSegment.cpp b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
index 13f2b8bbed..419c710643 100644
--- a/modules/demux/smooth/playlist/ForgedInitSegment.cpp
+++ b/modules/demux/smooth/playlist/ForgedInitSegment.cpp
@@ -298,7 +298,7 @@ block_t * ForgedInitSegment::buildMoovBox()
free(box);
mp4mux_SetBrand(muxh, VLC_FOURCC('i','s','m','l'), 0x01);
- mp4mux_AddExtraBrand(muxh, MAJOR_isom);
+ mp4mux_AddExtraBrand(muxh, BRAND_isom);
mp4mux_AddExtraBrand(muxh, VLC_FOURCC('p','i','f','f'));
mp4mux_AddExtraBrand(muxh, VLC_FOURCC('i','s','o','2'));
mp4mux_AddExtraBrand(muxh, VLC_FOURCC('s','m','o','o'));
diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c
index 6cc01f4744..b204c84c3e 100644
--- a/modules/mux/mp4/libmp4mux.c
+++ b/modules/mux/mp4/libmp4mux.c
@@ -88,10 +88,10 @@ static void mp4mux_AddExtraBrandForFormat(mp4mux_handle_t *h, const es_format_t
switch(fmt->i_codec)
{
case VLC_CODEC_H264:
- mp4mux_AddExtraBrand(h, MAJOR_avc1);
+ mp4mux_AddExtraBrand(h, BRAND_avc1);
break;
case VLC_CODEC_HEVC:
- mp4mux_AddExtraBrand(h, MAJOR_hevc);
+ mp4mux_AddExtraBrand(h, BRAND_hevc);
break;
case VLC_CODEC_AV1:
mp4mux_AddExtraBrand(h, VLC_FOURCC('a','v','0','1'));
@@ -102,12 +102,12 @@ static void mp4mux_AddExtraBrandForFormat(mp4mux_handle_t *h, const es_format_t
case VLC_CODEC_DIV2:
case VLC_CODEC_DIV3:
case VLC_CODEC_H263:
- mp4mux_AddExtraBrand(h, MAJOR_mp41);
+ mp4mux_AddExtraBrand(h, BRAND_mp41);
break;
case VLC_CODEC_MP4A:
- mp4mux_AddExtraBrand(h, MAJOR_mp41);
+ mp4mux_AddExtraBrand(h, BRAND_mp41);
if(vlc_array_count(&h->tracks) == 1)
- mp4mux_AddExtraBrand(h, MAJOR_M4A);
+ mp4mux_AddExtraBrand(h, BRAND_M4A);
break;
default:
break;
diff --git a/modules/mux/mp4/mp4.c b/modules/mux/mp4/mp4.c
index 99f3947d6d..ca9af19ad1 100644
--- a/modules/mux/mp4/mp4.c
+++ b/modules/mux/mp4/mp4.c
@@ -258,12 +258,12 @@ static int Open(vlc_object_t *p_this)
if(p_sys->b_3gp)
{
- mp4mux_SetBrand(p_sys->muxh, MAJOR_3gp6, 0x0);
- mp4mux_AddExtraBrand(p_sys->muxh, MAJOR_3gp4);
+ mp4mux_SetBrand(p_sys->muxh, BRAND_3gp6, 0x0);
+ mp4mux_AddExtraBrand(p_sys->muxh, BRAND_3gp4);
}
else
{
- mp4mux_SetBrand(p_sys->muxh, MAJOR_isom, 0x0);
+ mp4mux_SetBrand(p_sys->muxh, BRAND_isom, 0x0);
}
return VLC_SUCCESS;
@@ -423,7 +423,7 @@ static int AddStream(sout_mux_t *p_mux, sout_input_t *p_input)
mp4_stream_t *p_stream;
if(!mp4mux_CanMux(VLC_OBJECT(p_mux), p_input->p_fmt,
- mp4mux_Is(p_sys->muxh, QUICKTIME) ? MAJOR_qt__ : MAJOR_isom,
+ mp4mux_Is(p_sys->muxh, QUICKTIME) ? BRAND_qt__ : BRAND_isom,
mp4mux_Is(p_sys->muxh, FRAGMENTED)))
{
msg_Err(p_mux, "unsupported codec %4.4s in mp4",
More information about the vlc-commits
mailing list