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
56cc1c72
Commit
56cc1c72
authored
Dec 21, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taglib: save more meta data.
parent
d7a089ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+21
-19
No files found.
modules/meta_engine/taglib.cpp
View file @
56cc1c72
...
...
@@ -87,7 +87,6 @@ vlc_module_end ()
using
namespace
TagLib
;
/* Try detecting embedded art */
static
void
DetectImage
(
FileRef
f
,
demux_t
*
p_demux
)
{
...
...
@@ -290,8 +289,9 @@ static int ReadMetaFromId2v2( ID3v2::Tag* tag, vlc_meta_t* p_meta )
* terminated string */
char
psz_ufid
[
64
];
int
j
=
0
;
while
(
(
j
<
63
)
&&
(
j
<
p_ufid
->
identifier
().
size
()
)
)
int
max_size
=
p_ufid
->
identifier
().
size
()
<
63
?
p_ufid
->
identifier
().
size
()
:
63
;
while
(
j
<
max_size
)
psz_ufid
[
j
]
=
p_ufid
->
identifier
()[
j
++
];
psz_ufid
[
j
]
=
'\0'
;
vlc_meta_SetTrackID
(
p_meta
,
psz_ufid
);
...
...
@@ -447,7 +447,7 @@ static int WriteMeta( vlc_object_t *p_this )
meta_export_t
*
p_export
=
(
meta_export_t
*
)
p_playlist
->
p_private
;
input_item_t
*
p_item
=
p_export
->
p_item
;
if
(
p_item
==
NULL
)
if
(
!
p_item
)
{
msg_Err
(
p_this
,
"Can't save meta data of an empty input"
);
return
VLC_EGENERIC
;
...
...
@@ -467,31 +467,33 @@ static int WriteMeta( vlc_object_t *p_this )
char
*
psz_meta
;
#define SET(
a,b)
\
if(b) {
\
String *psz_##a = new String( b,
\
String::UTF8 );
\
p_tag->set##a( *psz_##a );
\
delete psz_##a;
\
}
#define SET(
a, b )
\
if( b )
\
{
\
String* psz_tmp = new String( b, String::UTF8 );
\
p_tag->set##a( *psz_tmp );
\
delete psz_tmp;
\
}
// Saving all common fields
// If the title is empty, use the name
psz_meta
=
input_item_GetTitle
(
p_item
);
if
(
!
psz_meta
)
psz_meta
=
input_item_GetName
(
p_item
);
SET
(
Title
,
psz_meta
);
free
(
psz_meta
);
psz_meta
=
input_item_GetArtist
(
p_item
);
SET
(
Artist
,
psz_meta
);
free
(
psz_meta
);
psz_meta
=
input_item_GetTitle
(
p_item
);
if
(
!
psz_meta
)
psz_meta
=
input_item_GetName
(
p_item
);
String
*
psz_title
=
new
String
(
psz_meta
,
String
::
UTF8
);
p_tag
->
setTitle
(
*
psz_title
);
delete
psz_title
;
free
(
psz_meta
);
psz_meta
=
input_item_GetAlbum
(
p_item
);
SET
(
Album
,
psz_meta
);
free
(
psz_meta
);
psz_meta
=
input_item_GetDescription
(
p_item
);
SET
(
Comment
,
psz_meta
);
free
(
psz_meta
);
psz_meta
=
input_item_GetGenre
(
p_item
);
SET
(
Genre
,
psz_meta
);
free
(
psz_meta
);
...
...
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