aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/mp3_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-29 09:38:21 +0200
committerMax Kellermann <max@duempel.org>2008-08-29 09:38:21 +0200
commit91502cd71ea92716729109677c6d8e57c42e63ae (patch)
tree14a8f8e554add64b4af22561446bae203195b34c /src/inputPlugins/mp3_plugin.c
parentd0556dc9839627f899939e9419181a4ad9b2053d (diff)
downloadmpd-91502cd71ea92716729109677c6d8e57c42e63ae.tar.gz
mpd-91502cd71ea92716729109677c6d8e57c42e63ae.tar.xz
mpd-91502cd71ea92716729109677c6d8e57c42e63ae.zip
tag: renamed functions, no CamelCase
Diffstat (limited to 'src/inputPlugins/mp3_plugin.c')
-rw-r--r--src/inputPlugins/mp3_plugin.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index 0d1c8e99a..11486ce9d 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -345,10 +345,10 @@ static void mp3_parseId3Tag(mp3DecodeData * data, size_t tagsize,
goto fail;
if (mpdTag) {
- tmpMpdTag = parseId3Tag(id3Tag);
+ tmpMpdTag = tag_id3_import(id3Tag);
if (tmpMpdTag) {
if (*mpdTag)
- freeMpdTag(*mpdTag);
+ tag_free(*mpdTag);
*mpdTag = tmpMpdTag;
}
}
@@ -821,7 +821,7 @@ static int openMp3FromInputStream(InputStream * inStream, mp3DecodeData * data,
if (decodeFirstFrame(data, tag, replayGainInfo) < 0) {
mp3DecodeDataFinalize(data);
if (tag && *tag)
- freeMpdTag(*tag);
+ tag_free(*tag);
return -1;
}
@@ -896,17 +896,16 @@ mp3Read(mp3DecodeData * data, ReplayGainInfo ** replayGainInfo)
}
if (data->inStream->metaTitle) {
- struct tag *tag = newMpdTag();
+ struct tag *tag = tag_new();
if (data->inStream->metaName) {
- addItemToMpdTag(tag,
- TAG_ITEM_NAME,
- data->inStream->metaName);
+ tag_add_item(tag, TAG_ITEM_NAME,
+ data->inStream->metaName);
}
- addItemToMpdTag(tag, TAG_ITEM_TITLE,
+ tag_add_item(tag, TAG_ITEM_TITLE,
data->inStream->metaTitle);
free(data->inStream->metaTitle);
data->inStream->metaTitle = NULL;
- freeMpdTag(tag);
+ tag_free(tag);
}
if (!data->decodedFirstFrame) {
@@ -1050,27 +1049,27 @@ static int mp3_decode(struct decoder * decoder, InputStream * inStream)
if (inStream->metaTitle) {
if (tag)
- freeMpdTag(tag);
- tag = newMpdTag();
- addItemToMpdTag(tag, TAG_ITEM_TITLE, inStream->metaTitle);
+ tag_free(tag);
+ tag = tag_new();
+ tag_add_item(tag, TAG_ITEM_TITLE, inStream->metaTitle);
free(inStream->metaTitle);
inStream->metaTitle = NULL;
if (inStream->metaName) {
- addItemToMpdTag(tag, TAG_ITEM_NAME, inStream->metaName);
+ tag_add_item(tag, TAG_ITEM_NAME, inStream->metaName);
}
- freeMpdTag(tag);
+ tag_free(tag);
} else if (tag) {
if (inStream->metaName) {
- clearItemsFromMpdTag(tag, TAG_ITEM_NAME);
- addItemToMpdTag(tag, TAG_ITEM_NAME, inStream->metaName);
+ tag_clear_items_by_type(tag, TAG_ITEM_NAME);
+ tag_add_item(tag, TAG_ITEM_NAME, inStream->metaName);
}
- freeMpdTag(tag);
+ tag_free(tag);
} else if (inStream->metaName) {
- tag = newMpdTag();
+ tag = tag_new();
if (inStream->metaName) {
- addItemToMpdTag(tag, TAG_ITEM_NAME, inStream->metaName);
+ tag_add_item(tag, TAG_ITEM_NAME, inStream->metaName);
}
- freeMpdTag(tag);
+ tag_free(tag);
}
decoder_initialized(decoder, &audio_format, data.totalTime);
@@ -1097,13 +1096,13 @@ static struct tag *mp3_tagDup(char *file)
struct tag *ret = NULL;
int total_time;
- ret = id3Dup(file);
+ ret = tag_id3_load(file);
total_time = getMp3TotalTime(file);
if (total_time >= 0) {
if (!ret)
- ret = newMpdTag();
+ ret = tag_new();
ret->time = total_time;
} else {
DEBUG("mp3_tagDup: Failed to get total song time from: %s\n",