Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
09680206
Commit
09680206
authored
Jan 17, 2014
by
Wieland Hoffmann
Committed by
Jean-Baptiste Kempf
Jan 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meta_engine/taglib: Read TrackID in all formats
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
987d6cf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
4 deletions
+31
-4
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+31
-4
No files found.
modules/meta_engine/taglib.cpp
View file @
09680206
...
...
@@ -177,6 +177,7 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
SET
(
"COPYRIGHT"
,
Copyright
);
SET
(
"LANGUAGE"
,
Language
);
SET
(
"PUBLISHER"
,
Publisher
);
SET
(
"MUSICBRAINZ_TRACKID"
,
TrackID
);
#undef SET
...
...
@@ -189,7 +190,6 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
}
#ifdef TAGLIB_HAVE_ASFPICTURE_H
/**
* Read meta information from APE tags
* @param tag: the APE tag
...
...
@@ -198,8 +198,22 @@ static void ReadMetaFromAPE( APE::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
*/
static
void
ReadMetaFromASF
(
ASF
::
Tag
*
tag
,
demux_meta_t
*
p_demux_meta
,
vlc_meta_t
*
p_meta
)
{
ASF
::
AttributeList
list
;
#define SET( keyName, metaName ) \
if( tag->attributeListMap().contains(keyName) ) \
{ \
list = tag->attributeListMap()[keyName]; \
vlc_meta_Set##metaName( p_meta, list.front().toString().toCString( true ) ); \
}
SET
(
"MusicBrainz/Track Id"
,
TrackID
);
#undef SET
#ifdef TAGLIB_HAVE_ASFPICTURE_H
// List the pictures
ASF
::
AttributeList
list
=
tag
->
attributeListMap
()[
"WM/Picture"
];
list
=
tag
->
attributeListMap
()[
"WM/Picture"
];
ASF
::
AttributeList
::
Iterator
iter
;
for
(
iter
=
list
.
begin
();
iter
!=
list
.
end
();
iter
++
)
{
...
...
@@ -237,8 +251,8 @@ static void ReadMetaFromASF( ASF::Tag* tag, demux_meta_t* p_demux_meta, vlc_meta
vlc_meta_SetArtURL
(
p_meta
,
psz_url
);
free
(
psz_url
);
}
}
#endif
}
/**
...
...
@@ -441,6 +455,7 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
SET
(
"ENCODER"
,
EncodedBy
);
SET
(
"RATING"
,
Rating
);
SET
(
"LANGUAGE"
,
Language
);
SET
(
"MUSICBRAINZ_TRACKID"
,
TrackID
);
#undef SET
list
=
tag
->
fieldListMap
()[
"TRACKNUMBER"
];
...
...
@@ -538,6 +553,18 @@ static void ReadMetaFromXiph( Ogg::XiphComment* tag, demux_meta_t* p_demux_meta,
*/
static
void
ReadMetaFromMP4
(
MP4
::
Tag
*
tag
,
demux_meta_t
*
p_demux_meta
,
vlc_meta_t
*
p_meta
)
{
MP4
::
Item
list
;
#define SET( keyName, metaName ) \
if( tag->itemListMap().contains(keyName) ) \
{ \
list = tag->itemListMap()[keyName]; \
vlc_meta_Set##metaName( p_meta, list.toStringList().front().toCString( true ) ); \
}
SET
(
"----:com.apple.iTunes:MusicBrainz Track Id"
,
TrackID
);
#undef SET
if
(
tag
->
itemListMap
().
contains
(
"covr"
)
)
{
MP4
::
CoverArtList
list
=
tag
->
itemListMap
()[
"covr"
].
toCoverArtList
();
...
...
@@ -639,7 +666,7 @@ static int ReadMeta( vlc_object_t* p_this)
}
else
#endif
#ifdef TAGLIB_
HAVE_ASFPICTURE_H
#ifdef TAGLIB_
WITH_ASF
if
(
ASF
::
File
*
asf
=
dynamic_cast
<
ASF
::
File
*>
(
f
.
file
())
)
{
if
(
asf
->
tag
()
)
...
...
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