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
d0043736
Commit
d0043736
authored
Apr 05, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parse embedded art in METADATA_BLOCK_PICTURE
Note: It is not yet passed to the demuxer or the core
parent
4263f5f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/demux/vorbis.h
modules/demux/vorbis.h
+16
-0
No files found.
modules/demux/vorbis.h
View file @
d0043736
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
*****************************************************************************/
*****************************************************************************/
#include <vlc_charset.h>
#include <vlc_charset.h>
#include <vlc_strings.h>
static
input_attachment_t
*
ParseFlacPicture
(
const
uint8_t
*
p_data
,
int
i_data
,
int
i_attachments
,
int
*
i_type
)
static
input_attachment_t
*
ParseFlacPicture
(
const
uint8_t
*
p_data
,
int
i_data
,
int
i_attachments
,
int
*
i_type
)
{
{
...
@@ -73,6 +74,7 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
...
@@ -73,6 +74,7 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
{
{
int
n
;
int
n
;
int
i_comment
;
int
i_comment
;
int
i_attach
=
0
;
if
(
i_data
<
8
)
if
(
i_data
<
8
)
return
;
return
;
...
@@ -154,6 +156,20 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
...
@@ -154,6 +156,20 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
else
IF_EXTRACT
(
"DESCRIPTION="
,
Description
)
else
IF_EXTRACT
(
"DESCRIPTION="
,
Description
)
else
IF_EXTRACT
(
"GENRE="
,
Genre
)
else
IF_EXTRACT
(
"GENRE="
,
Genre
)
else
IF_EXTRACT
(
"DATE="
,
Date
)
else
IF_EXTRACT
(
"DATE="
,
Date
)
else
if
(
!
strncasecmp
(
psz
,
"METADATA_BLOCK_PICTURE="
,
strlen
(
"METADATA_BLOCK_PICTURE="
)))
{
int
i
;
uint8_t
*
p_picture
;
size_t
i_size
=
vlc_b64_decode_binary
(
&
p_picture
,
&
psz
[
strlen
(
"METADATA_BLOCK_PICTURE="
)]);
input_attachment_t
*
p_attachment
=
ParseFlacPicture
(
p_picture
,
i_size
,
i_attach
,
&
i
);
if
(
p_attachment
)
{
char
psz_url
[
128
];
snprintf
(
psz_url
,
sizeof
(
psz_url
),
"attachment://%s"
,
p_attachment
->
psz_name
);
vlc_meta_Set
(
p_meta
,
vlc_meta_ArtworkURL
,
psz_url
);
i_attach
++
;
}
}
else
if
(
strchr
(
psz
,
'='
)
)
else
if
(
strchr
(
psz
,
'='
)
)
{
{
/* generic (PERFORMER/LICENSE/ORGANIZATION/LOCATION/CONTACT/ISRC,
/* generic (PERFORMER/LICENSE/ORGANIZATION/LOCATION/CONTACT/ISRC,
...
...
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