aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tag: added function tag_merge_replace()Max Kellermann2010-03-171-0/+9
| | | | | Like tag_merge(), but can deal with NULL parameters, and frees both tag objects.
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* tag: added API documentationMax Kellermann2009-03-011-0/+65
|
* tag: no CamelCaseMax Kellermann2009-03-011-5/+5
| | | | Renamed functions and variables.
* tag: moved APE code to tag_ape.cMax Kellermann2009-02-281-2/+0
|
* tag: make tag.num_items unsignedMax Kellermann2009-02-271-1/+1
| | | | | | There's no point in declaring num_items as a uint8_t, it doesn't save any space, due to padding. This allows us to lift the articial "255 items" limitation.
* tag: no CamelCaseMax Kellermann2009-02-271-3/+3
| | | | Renamed numOfItems to num_items.
* tag: make tag_equal() return boolMax Kellermann2009-02-271-1/+1
|
* tag: added support for MusicBrainz tagsMax Kellermann2009-01-241-0/+6
| | | | | | | | | Added all important id tags from the MusicBrainz wiki: http://musicbrainz.org/doc/MusicBrainzTag This should automatically enable its suport in the vorbis and flac decoder plugins.
* tag: added tag_is_defined()Max Kellermann2009-01-151-0/+9
| | | | | tag_is_defined() checks whether there is any information in the tag object.
* tag: added tag_get_value()Max Kellermann2009-01-151-0/+7
|
* tag: added core support for the "album artist" tagMax Kellermann2009-01-131-0/+1
| | | | | | | | Added TAG_ITEM_ALBUM_ARTIST. With this patch, MPD should be able to read the (inofficial) "ALBUMARTIST" Vorbis comment. Implementations in other decoder plugins will follow soon.
* tag: added function tag_merge()Max Kellermann2009-01-031-0/+9
| | | | tag_merges() merges the data from two tag objects into one.
* tag: added tag_is_empty()Max Kellermann2008-11-041-0/+10
|
* tag: added function tag_has_type()Max Kellermann2008-11-031-0/+7
| | | | | tag_has_type() checks whether the tag contains one or more items with the specified type.
* added prefix to header macrosMax Kellermann2008-10-311-2/+2
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* tag_item: avoid wasting space when struct is unpackableEric Wong2008-10-131-1/+1
| | | | | Not all compilers support struct packing, and those that don't shouldn't be punished for it.
* don't include os_compat.hMax Kellermann2008-10-081-1/+4
| | | | | When there are standardized headers, use these instead of the bloated os_compat.h.
* assume stdint.h and stddef.h are availableMax Kellermann2008-09-291-1/+0
| | | | | | Since we use a C99 compiler now, we can assert that the C99 standard headers are available, no need for complicated compile time checks. Kill mpd_types.h.
* Switch to C99 types (retaining compat with old compilers)Eric Wong2008-09-291-1/+1
| | | | | | | | | | | | | | | Seeing the "mpd_" prefix _everywhere_ is mind-numbing as the mind needs to retrain itself to skip over the first 4 tokens of a type to get to its meaning. So avoid having extra characters on my terminal to make it easier to follow code at 2:30 am in the morning. Please report any new issues you may come across on Free toolchains. I realize how difficult it can be to build/maintain cross-compiling toolchains and I have no intention of forcing people to upgrade their toolchains to build mpd. Tested with gcc 2.95.4 and and gcc 4.3.1 on x86-32.
* tag: moved code to tag_print.cMax Kellermann2008-09-071-4/+0
| | | | | Move everything which dumps a tag to a file descriptor to tag_print.c. This relaxes dependencies and splits the code into smaller parts.
* const pointersMax Kellermann2008-08-291-4/+4
| | | | Yet another patch which converts pointer arguments to "const".
* tag: try not to reallocate tag.items in every add() callMax Kellermann2008-08-291-1/+15
| | | | | | | | | | | | | | | | If many tag_items are added at once while the tag cache is being loaded, manage these items in a static fixed list, instead of reallocating the list with every newly created item. This reduces heap fragmentation. Massif results again: mk before: total 12,837,632; useful 10,626,383; extra 2,211,249 mk now: total 12,736,720; useful 10,626,383; extra 2,110,337 The "useful" value is the same since this patch only changes the way we allocate the same amount of memory, but heap fragmentation was reduced by 5%.
* tag: added a pool for tag itemsMax Kellermann2008-08-291-1/+2
| | | | | | | | | | | | | | | | | | | The new source tag_pool.c manages a pool of reference counted tag_item objects. This is used to merge tag items of the same type and value, saving lots of memory. Formerly, only the value itself was pooled, wasting memory for all the pointers and tag_item structs. The following results were measured with massif. Started MPD on amd64, typed "mpc", no song being played. My music database contains 35k tagged songs. The results are what massif reports as "peak". 0.13.2: total 14,131,392; useful 11,408,972; extra 2,722,420 eric: total 18,370,696; useful 15,648,182; extra 2,722,514 mk f34f694: total 15,833,952; useful 13,111,470; extra 2,722,482 mk now: total 12,837,632; useful 10,626,383; extra 2,211,249 This patch set saves 20% memory, and does a good job in reducing heap fragmentation.
* tag: converted tag_item.value to a char arrayMax Kellermann2008-08-291-2/+2
| | | | | | | The value is stored in the same memory allocation as the tag_item struct; this saves memory because we do not store the value pointer anymore. Also remove the getTagItemString()/removeTagItemString() dummies.
* tag: converted MpdTag.items to a pointer listMax Kellermann2008-08-291-1/+1
| | | | | | This prepares the following patches, which aim to reduce MPD's memory usage: we plan to share tag_item instances, instead of just their values.
* tag: moved code to tag_id3.cMax Kellermann2008-08-291-12/+0
| | | | | The ID3 code uses only the public tag API, but is otherwise unrelated. Move it to a separate source file.
* tag: converted tag_add_item() to an inline functionMax Kellermann2008-08-291-2/+5
|
* tag: renamed functions, no CamelCaseMax Kellermann2008-08-291-14/+14
|
* tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann2008-08-291-15/+15
| | | | | Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
* const pointersMax Kellermann2008-08-281-1/+1
| | | | The usual bunch of pointer arguments which should be const.
* unsigned integers and size_tMax Kellermann2008-08-281-1/+2
| | | | | Use "unsigned int" whenever negative values are not meaningful. Use size_t whenever we are going to describe buffer sizes.
* converted MpdTagItem.type to an enumMax Kellermann2008-08-261-16/+18
| | | | | Don't use CPP macros when you can use C enum... this also allows better type checking.
* fix -Wconst warningsMax Kellermann2008-02-051-1/+1
| | | | | | [ew: cleaned up the dirty union hack a bit] Signed-off-by: Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-031-3/+0
| | | | | | | | | | | | | This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-051-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding tagtypes command to list available tag types (takes metadata_to_useJ. Alexander Treuman2007-03-311-0/+2
| | | | | into account). git-svn-id: https://svn.musicpd.org/mpd/trunk@5792 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Closing some parenthesis around shank's email address in copyright headers.J. Alexander Treuman2007-02-181-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5376 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix warnings for -Wmissing-prototypesAvuton Olrich2006-08-201-2/+2
| | | | | | Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* interface/connection malloc reductions from mpd-keEric Wong2006-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch massively reduces the amount of heap allocations at the interface/command layer. Most commands with minimal output should not allocate memory from the heap at all. Things like repeatedly polling status, currentsong, and volume changes should be faster as a result, and more importantly, not a source of memory fragmentation. These changes should be safe in that there's no way for a remote-client to corrupt memory or otherwise do bad stuff to MPD, but an extra set of eyes to review would be good. Of course there's never any warranty :) No longer do we use FILE * structures in the interface, which means we don't have to allocate any new memory for most connections. Now, before you go on about losing the buffering that FILE * +implies+, remember that myfprintf() never took advantage of any of the stdio buffering features. To reduce the diff and make bugs easier to spot in the diff, I've kept myfprintf in places where we write to files (and not network interfaces). Expect myfprintf to go away entirely soon (we'll use fprintf for writing regular files). git-svn-id: https://svn.musicpd.org/mpd/trunk@4483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add mpd-indent.shAvuton Olrich2006-07-201-9/+9
| | | | | | Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Remove hosted libid3tag & libmadAvuton Olrich2006-07-161-4/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4369 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* [CLEANUP] Remove unused codeAvuton Olrich2006-07-151-5/+0
| | | | | | Fix whitespace->tabs Use static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Change shank's email addressJ. Alexander Treuman2006-07-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Huge header update, update the copyright and addAvuton Olrich2006-07-131-1/+1
| | | | | the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added Disc # metadata item based on bug 571 (added id3v2 support)Qball Cow2006-04-301-1/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4131 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* add support for parsing ape tags in musepack filesWarren Dukes2005-03-071-0/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3030 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* added composer, performer, and comment metadata itemsWarren Dukes2005-03-051-1/+4
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@3022 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* merge changes from metadata-rewrite branchWarren Dukes2004-11-101-7/+35
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@2589 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mechanism for updating metadata while decodingWarren Dukes2004-06-061-1/+0
| | | | | | | vorbis comments are updated on the fly for streams need to decode icy metadata buffering of metadata needs to be hardened, to ensure that player has already read a particular metachunk or passed over it git-svn-id: https://svn.musicpd.org/mpd/trunk@1358 09075e82-0dd4-0310-85a5-a0d7c8717e4f