Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
0beed024
Commit
0beed024
authored
Oct 16, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: libmp4: add itunes special atoms
parent
af3ab245
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
3 deletions
+32
-3
modules/demux/mp4/libmp4.c
modules/demux/mp4/libmp4.c
+3
-0
modules/demux/mp4/libmp4.h
modules/demux/mp4/libmp4.h
+3
-0
modules/demux/mp4/meta.c
modules/demux/mp4/meta.c
+26
-3
No files found.
modules/demux/mp4/libmp4.c
View file @
0beed024
...
...
@@ -3710,7 +3710,10 @@ static const struct
{
ATOM_0xa9too
,
MP4_ReadBox_0xa9xxx
,
MP4_FreeBox_0xa9xxx
,
ATOM_ilst
},
{
ATOM_0xa9trk
,
MP4_ReadBox_0xa9xxx
,
MP4_FreeBox_0xa9xxx
,
ATOM_ilst
},
{
ATOM_0xa9wrt
,
MP4_ReadBox_0xa9xxx
,
MP4_FreeBox_0xa9xxx
,
ATOM_ilst
},
{
ATOM_aART
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_atID
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
/* iTunes */
{
ATOM_chpl
,
MP4_ReadBox_chpl
,
MP4_FreeBox_chpl
,
ATOM_ilst
},
{
ATOM_cnID
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
/* iTunes */
{
ATOM_covr
,
MP4_ReadBoxContainer
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_disk
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
{
ATOM_gnre
,
MP4_ReadBox_Metadata
,
MP4_FreeBox_Common
,
ATOM_ilst
},
...
...
modules/demux/mp4/libmp4.h
View file @
0beed024
...
...
@@ -278,12 +278,15 @@
#define ATOM_0xa9thx VLC_FOURCC( 0xa9, 't', 'h', 'x' )
#define ATOM_0xa9xpd VLC_FOURCC( 0xa9, 'x', 'p', 'd' )
#define ATOM_0xa9xyz VLC_FOURCC( 0xa9, 'x', 'y', 'z' )
#define ATOM_aART VLC_FOURCC( 'a', 'A', 'R', 'T' )
#define ATOM_chpl VLC_FOURCC( 'c', 'h', 'p', 'l' )
#define ATOM_disk VLC_FOURCC( 'd', 'i', 's', 'k' )
#define ATOM_WLOC VLC_FOURCC( 'W', 'L', 'O', 'C' )
#define ATOM_meta VLC_FOURCC( 'm', 'e', 't', 'a' )
#define ATOM_atID VLC_FOURCC( 'a', 't', 'I', 'D' )
#define ATOM_ilst VLC_FOURCC( 'i', 'l', 's', 't' )
#define ATOM_cnID VLC_FOURCC( 'c', 'n', 'I', 'D' )
#define ATOM_covr VLC_FOURCC( 'c', 'o', 'v', 'r' )
#define ATOM_chap VLC_FOURCC( 'c', 'h', 'a', 'p' )
...
...
modules/demux/mp4/meta.c
View file @
0beed024
...
...
@@ -88,6 +88,7 @@ static const struct
{
ATOM_0xa9sol
,
N_
(
"Soloist"
)
},
{
ATOM_0xa9thx
,
N_
(
"Thanks"
)
},
{
ATOM_0xa9xpd
,
N_
(
"Executive Producer"
)
},
{
ATOM_aART
,
N_
(
"Album Artist"
)
},
{
ATOM_vndr
,
N_
(
"Vendor"
)
},
{
0
,
""
},
};
...
...
@@ -239,12 +240,36 @@ static bool Matchcom_apple_quicktime( vlc_meta_t *p_meta, const char *psz_naming
static
void
SetupmdirMeta
(
vlc_meta_t
*
p_meta
,
MP4_Box_t
*
p_box
)
{
bool
b_matched
=
true
;
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
/* XXX Becarefull p_udta can have box that are not 0xa9xx */
switch
(
p_box
->
i_type
)
{
case
ATOM_atID
:
{
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
4
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_BE_SIGNED
)
{
char
psz_utf
[
11
];
snprintf
(
psz_utf
,
sizeof
(
psz_utf
),
"%"
PRId32
,
GetDWBE
(
BOXDATA
(
p_data
)
->
p_blob
)
);
vlc_meta_AddExtra
(
p_meta
,
N_
(
"iTunes Account ID"
),
psz_utf
);
}
break
;
}
case
ATOM_cnID
:
{
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
4
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_BE_SIGNED
)
{
char
psz_utf
[
11
];
snprintf
(
psz_utf
,
sizeof
(
psz_utf
),
"%"
PRId32
,
GetDWBE
(
BOXDATA
(
p_data
)
->
p_blob
)
);
vlc_meta_AddExtra
(
p_meta
,
N_
(
"iTunes Catalog ID"
),
psz_utf
);
}
break
;
}
case
ATOM_disk
:
{
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
6
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_RESERVED
)
{
...
...
@@ -258,7 +283,6 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
}
case
ATOM_gnre
:
{
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
2
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_RESERVED
)
{
...
...
@@ -270,7 +294,6 @@ static void SetupmdirMeta( vlc_meta_t *p_meta, MP4_Box_t *p_box )
}
case
ATOM_trkn
:
{
const
MP4_Box_t
*
p_data
=
MP4_BoxGet
(
p_box
,
"data"
);
if
(
p_data
&&
BOXDATA
(
p_data
)
&&
BOXDATA
(
p_data
)
->
i_blob
>=
4
&&
BOXDATA
(
p_data
)
->
e_wellknowntype
==
DATA_WKT_RESERVED
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment