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
cb4a20b9
Commit
cb4a20b9
authored
Jun 13, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MP3: support TRCK total number
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
42a7f46d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+19
-0
No files found.
modules/meta_engine/taglib.cpp
View file @
cb4a20b9
...
...
@@ -108,6 +108,18 @@ vlc_module_end ()
using
namespace
TagLib
;
static
void
ExtractTrackNumberValues
(
vlc_meta_t
*
p_meta
,
const
char
*
psz_value
)
{
unsigned
int
i_trknum
,
i_trktot
;
if
(
sscanf
(
psz_value
,
"%u/%u"
,
&
i_trknum
,
&
i_trktot
)
==
2
)
{
char
psz_trck
[
11
];
snprintf
(
psz_trck
,
sizeof
(
psz_trck
),
"%u"
,
i_trknum
);
vlc_meta_SetTrackNum
(
p_meta
,
psz_trck
);
snprintf
(
psz_trck
,
sizeof
(
psz_trck
),
"%u"
,
i_trktot
);
vlc_meta_Set
(
p_meta
,
vlc_meta_TrackTotal
,
psz_trck
);
}
}
/**
* Read meta information from APE tags
...
...
@@ -244,6 +256,13 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_meta_t* p_demux_meta, vlc_
#undef SET
/* */
list
=
tag
->
frameListMap
()[
"TRCK"
];
if
(
!
list
.
isEmpty
()
)
{
ExtractTrackNumberValues
(
p_meta
,
(
*
list
.
begin
())
->
toString
().
toCString
(
true
)
);
}
/* Preferred type of image
* The 21 types are defined in id3v2 standard:
* http://www.id3.org/id3v2.4.0-frames */
...
...
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