Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
8ec8282f
Commit
8ec8282f
authored
Feb 11, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/ffmpeg: use the tag_table library
parent
43b7b989
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
ffmpeg_metadata.c
src/decoder/ffmpeg_metadata.c
+9
-13
No files found.
src/decoder/ffmpeg_metadata.c
View file @
8ec8282f
...
...
@@ -20,26 +20,22 @@
#include "config.h"
#include "ffmpeg_metadata.h"
#include "tag.h"
#include "tag_table.h"
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "ffmpeg"
typedef
struct
ffmpeg_tag_map
{
enum
tag_type
type
;
const
char
*
name
;
}
ffmpeg_tag_map
;
static
const
ffmpeg_tag_map
ffmpeg_tag_maps
[]
=
{
static
const
struct
tag_table
ffmpeg_tags
[]
=
{
#if LIBAVFORMAT_VERSION_INT < ((52<<16)+(50<<8))
{
TAG_ARTIST
,
"author"
},
{
TAG_DATE
,
"year"
},
{
"author"
,
TAG_ARTIST
},
{
"year"
,
TAG_DATE
},
#endif
{
TAG_ARTIST_SORT
,
"author-sort"
},
{
TAG_ALBUM_ARTIST
,
"album_artist"
},
{
TAG_ALBUM_ARTIST_SORT
,
"album_artist-sort"
},
{
"author-sort"
,
TAG_ARTIST_SORT
},
{
"album_artist"
,
TAG_ALBUM_ARTIST
},
{
"album_artist-sort"
,
TAG_ALBUM_ARTIST_SORT
},
/* sentinel */
{
TAG_NUM_OF_ITEM_TYPES
,
NULL
}
{
NULL
,
TAG_NUM_OF_ITEM_TYPES
}
};
static
void
...
...
@@ -59,7 +55,7 @@ ffmpeg_copy_dictionary(struct tag *tag, AVDictionary *dict)
ffmpeg_copy_metadata
(
tag
,
i
,
dict
,
tag_item_names
[
i
]);
for
(
const
struct
ffmpeg_tag_map
*
i
=
ffmpeg_tag_map
s
;
for
(
const
struct
tag_table
*
i
=
ffmpeg_tag
s
;
i
->
name
!=
NULL
;
++
i
)
ffmpeg_copy_metadata
(
tag
,
i
->
type
,
dict
,
i
->
name
);
}
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