Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
8dca232e
Commit
8dca232e
authored
Jan 01, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taglib: read and write some APE tags.
parent
a9200b77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+29
-2
No files found.
modules/meta_engine/taglib.cpp
View file @
8dca232e
...
@@ -259,6 +259,16 @@ static void DetectImage( FileRef f, demux_t *p_demux )
...
@@ -259,6 +259,16 @@ static void DetectImage( FileRef f, demux_t *p_demux )
*/
*/
static
int
ReadMetaFromAPE
(
APE
::
Tag
*
tag
,
vlc_meta_t
*
p_meta
)
static
int
ReadMetaFromAPE
(
APE
::
Tag
*
tag
,
vlc_meta_t
*
p_meta
)
{
{
APE
::
Item
item
;
#define SET( keyName, metaName ) \
item = tag->itemListMap()[keyName]; \
vlc_meta_Set##metaName( p_meta, item.toString().toCString( true ) );\
SET
(
"COPYRIGHT"
,
Copyright
);
SET
(
"LANGUAGE"
,
Language
);
SET
(
"PUBLISHER"
,
Publisher
);
#undef SET
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -450,11 +460,28 @@ static int ReadMeta( vlc_object_t* p_this)
...
@@ -450,11 +460,28 @@ static int ReadMeta( vlc_object_t* p_this)
/**
/**
* Write meta informations to APE tags
* Write meta informations to APE tags
* @param tag: the APE tag
* @param tag: the APE tag
* @param p_i
nput
: the input item
* @param p_i
tem
: the input item
* @return VLC_SUCCESS if everything goes ok
* @return VLC_SUCCESS if everything goes ok
*/
*/
static
int
WriteMetaToAPE
(
APE
::
Tag
*
tag
,
input_item_t
*
p_i
nput
)
static
int
WriteMetaToAPE
(
APE
::
Tag
*
tag
,
input_item_t
*
p_i
tem
)
{
{
char
*
psz_meta
;
#define WRITE( metaName, keyName ) \
psz_meta = input_item_Get##metaName( p_item ); \
if( psz_meta ) \
{ \
String key( keyName, String::UTF8 ); \
String value( psz_meta, String::UTF8 ); \
tag->addValue( key, value, true ); \
} \
free( psz_meta );
WRITE
(
Copyright
,
"COPYRIGHT"
);
WRITE
(
Language
,
"LANGUAGE"
);
WRITE
(
Publisher
,
"PUBLISHER"
);
#undef WRITE
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
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