Mercurial > audlegacy
comparison src/libaudtag/tag_module.c @ 4887:0ddbd0025174 default tip
added libaudtag. (not used yet.)
| author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
|---|---|
| date | Wed, 05 May 2010 18:26:06 +0900 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 4886:54b4f7aaca24 | 4887:0ddbd0025174 |
|---|---|
| 1 /* | |
| 2 * Copyright 2009 Paula Stanciu | |
| 3 * | |
| 4 * This file is part of Audacious. | |
| 5 * | |
| 6 * Audacious is free software: you can redistribute it and/or modify it under | |
| 7 * the terms of the GNU General Public License as published by the Free Software | |
| 8 * Foundation, version 3 of the License. | |
| 9 * | |
| 10 * Audacious is distributed in the hope that it will be useful, but WITHOUT ANY | |
| 11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | |
| 12 * A PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
| 13 * | |
| 14 * You should have received a copy of the GNU General Public License along with | |
| 15 * Audacious. If not, see <http://www.gnu.org/licenses/>. | |
| 16 * | |
| 17 * The Audacious team does not consider modular code linking to Audacious or | |
| 18 * using our public API to be a derived work. | |
| 19 */ | |
| 20 | |
| 21 #include <glib.h> | |
| 22 #include <audlegacy/tuple.h> | |
| 23 #include <audlegacy/vfs.h> | |
| 24 #include "util.h" | |
| 25 #include "tag_module.h" | |
| 26 #include "wma/module.h" | |
| 27 #include "id3/id3v1.h" | |
| 28 #include "id3/id3v2.h" | |
| 29 #include "ape/ape.h" | |
| 30 #include "aac/aac.h" | |
| 31 | |
| 32 void init_tag_modules(void) | |
| 33 { | |
| 34 mowgli_node_add((void *)&wma, mowgli_node_create(), &tag_modules); | |
| 35 mowgli_node_add((void *)&id3v2, mowgli_node_create(), &tag_modules); | |
| 36 mowgli_node_add((void *)&ape, mowgli_node_create(), &tag_modules); | |
| 37 mowgli_node_add((void *)&id3v1, mowgli_node_create(), &tag_modules); | |
| 38 /* | |
| 39 mowgli_node_add((void *)&aac, mowgli_node_create(), &tag_modules); | |
| 40 */ | |
| 41 } | |
| 42 | |
| 43 tag_module_t *find_tag_module(VFSFile * fd) | |
| 44 { | |
| 45 mowgli_node_t *mod, *tmod; | |
| 46 MOWGLI_LIST_FOREACH_SAFE(mod, tmod, tag_modules.head) | |
| 47 { | |
| 48 vfs_fseek(fd, 0, SEEK_SET); | |
| 49 if (((tag_module_t *) (mod->data))->can_handle_file(fd)) | |
| 50 return (tag_module_t *) (mod->data); | |
| 51 } | |
| 52 | |
| 53 AUDDBG("no module found\n"); | |
| 54 return NULL; | |
| 55 } |
