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
5ada985b
Commit
5ada985b
authored
Jul 01, 2012
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taglib: read a few more APE tags
Close #5558
parent
c6f802f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+35
-1
No files found.
modules/meta_engine/taglib.cpp
View file @
5ada985b
...
...
@@ -127,13 +127,47 @@ static void ExtractTrackNumberValues( vlc_meta_t* p_meta, const char *psz_value
* @param p_demux_meta: the demuxer meta
* @param p_meta: the meta
*/
static
void
ReadMetaFromAPE
(
APE
::
Tag
*
tag
,
demux_meta_t
*
,
vlc_meta_t
*
p_meta
)
static
void
ReadMetaFromAPE
(
APE
::
Tag
*
tag
,
demux_meta_t
*
p_demux_meta
,
vlc_meta_t
*
p_meta
)
{
APE
::
Item
item
;
item
=
tag
->
itemListMap
()[
"COVER ART (FRONT)"
];
if
(
!
item
.
isEmpty
()
)
{
input_attachment_t
*
p_attachment
;
const
ByteVector
picture
=
item
.
value
();
const
char
*
p_data
=
picture
.
data
();
unsigned
i_data
=
picture
.
size
();
size_t
desc_len
=
strnlen
(
p_data
,
i_data
);
if
(
desc_len
<
i_data
)
{
const
char
*
psz_name
=
p_data
;
p_data
+=
desc_len
+
1
;
/* '\0' */
i_data
-=
desc_len
+
1
;
msg_Dbg
(
p_demux_meta
,
"Found embedded art: %s (%s) is %u bytes"
,
psz_name
,
"image/jpeg"
,
i_data
);
p_attachment
=
vlc_input_attachment_New
(
"cover"
,
"image/jpeg"
,
psz_name
,
p_data
,
i_data
);
if
(
p_attachment
)
TAB_APPEND_CAST
(
(
input_attachment_t
**
),
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
,
p_attachment
);
vlc_meta_SetArtURL
(
p_meta
,
"attachment://cover"
);
}
}
#define SET( keyName, metaName ) \
item = tag->itemListMap()[keyName]; \
if( !item.isEmpty() ) vlc_meta_Set##metaName( p_meta, item.toString().toCString( true ) ); \
SET
(
"ALBUM"
,
Album
);
SET
(
"ARTIST"
,
Artist
);
SET
(
"COMMENT"
,
Description
);
SET
(
"GENRE"
,
Genre
);
SET
(
"TITLE"
,
Title
);
SET
(
"COPYRIGHT"
,
Copyright
);
SET
(
"LANGUAGE"
,
Language
);
SET
(
"PUBLISHER"
,
Publisher
);
...
...
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