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
bab756a5
Commit
bab756a5
authored
Sep 05, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/{flac,vorbis}: move tag table to XiphTags.c
Merge duplicate data.
parent
8c763fe4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
16 deletions
+61
-16
Makefile.am
Makefile.am
+1
-0
XiphTags.c
src/decoder/XiphTags.c
+28
-0
XiphTags.h
src/decoder/XiphTags.h
+28
-0
flac_metadata.c
src/decoder/flac_metadata.c
+2
-8
vorbis_comments.c
src/decoder/vorbis_comments.c
+2
-8
No files found.
Makefile.am
View file @
bab756a5
...
...
@@ -588,6 +588,7 @@ endif
if
HAVE_XIPH
libdecoder_plugins_a_SOURCES
+=
\
src/decoder/XiphTags.c src/decoder/XiphTags.h
\
src/decoder/ogg_codec.c src/decoder/ogg_codec.h
endif
...
...
src/decoder/XiphTags.c
0 → 100644
View file @
bab756a5
/*
* Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include "XiphTags.h"
const
struct
tag_table
xiph_tags
[]
=
{
{
"tracknumber"
,
TAG_TRACK
},
{
"discnumber"
,
TAG_DISC
},
{
"album artist"
,
TAG_ALBUM_ARTIST
},
{
NULL
,
TAG_NUM_OF_ITEM_TYPES
}
};
src/decoder/XiphTags.h
0 → 100644
View file @
bab756a5
/*
* Copyright (C) 2003-2012 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_XIPH_TAGS_H
#define MPD_XIPH_TAGS_H
#include "check.h"
#include "tag_table.h"
extern
const
struct
tag_table
xiph_tags
[];
#endif
src/decoder/flac_metadata.c
View file @
bab756a5
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "flac_metadata.h"
#include "XiphTags.h"
#include "replay_gain_info.h"
#include "tag.h"
#include "tag_handler.h"
...
...
@@ -184,13 +185,6 @@ flac_copy_comment(const FLAC__StreamMetadata_VorbisComment_Entry *entry,
return
false
;
}
static
const
struct
tag_table
flac_tags
[]
=
{
{
"tracknumber"
,
TAG_TRACK
},
{
"discnumber"
,
TAG_DISC
},
{
"album artist"
,
TAG_ALBUM_ARTIST
},
{
NULL
,
TAG_NUM_OF_ITEM_TYPES
}
};
static
void
flac_scan_comment
(
const
char
*
char_tnum
,
const
FLAC__StreamMetadata_VorbisComment_Entry
*
entry
,
...
...
@@ -209,7 +203,7 @@ flac_scan_comment(const char *char_tnum,
g_free
(
name
);
}
for
(
const
struct
tag_table
*
i
=
flac
_tags
;
i
->
name
!=
NULL
;
++
i
)
for
(
const
struct
tag_table
*
i
=
xiph
_tags
;
i
->
name
!=
NULL
;
++
i
)
if
(
flac_copy_comment
(
entry
,
i
->
name
,
i
->
type
,
char_tnum
,
handler
,
handler_ctx
))
return
;
...
...
src/decoder/vorbis_comments.c
View file @
bab756a5
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "vorbis_comments.h"
#include "XiphTags.h"
#include "tag.h"
#include "tag_table.h"
#include "tag_handler.h"
...
...
@@ -95,13 +96,6 @@ vorbis_copy_comment(const char *comment,
return
false
;
}
static
const
struct
tag_table
vorbis_tags
[]
=
{
{
"tracknumber"
,
TAG_TRACK
},
{
"discnumber"
,
TAG_DISC
},
{
"album artist"
,
TAG_ALBUM_ARTIST
},
{
NULL
,
TAG_NUM_OF_ITEM_TYPES
}
};
static
void
vorbis_scan_comment
(
const
char
*
comment
,
const
struct
tag_handler
*
handler
,
void
*
handler_ctx
)
...
...
@@ -119,7 +113,7 @@ vorbis_scan_comment(const char *comment,
g_free
(
name
);
}
for
(
const
struct
tag_table
*
i
=
vorbis
_tags
;
i
->
name
!=
NULL
;
++
i
)
for
(
const
struct
tag_table
*
i
=
xiph
_tags
;
i
->
name
!=
NULL
;
++
i
)
if
(
vorbis_copy_comment
(
comment
,
i
->
name
,
i
->
type
,
handler
,
handler_ctx
))
return
;
...
...
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