- 28 Feb, 2009 3 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
Renamed functions and variables.
-
Max Kellermann authored
-
- 27 Feb, 2009 4 commits
-
-
Max Kellermann authored
Overwrite invalid UTF-8 sequences with question marks.
-
Max Kellermann authored
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.
-
Max Kellermann authored
Renamed numOfItems to num_items.
-
Max Kellermann authored
-
- 17 Feb, 2009 1 commit
-
-
Max Kellermann authored
-
- 25 Jan, 2009 4 commits
-
-
Laszlo Ashin authored
This variable doesn't have a role since 80799fa8.
-
Max Kellermann authored
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
-
Max Kellermann authored
All config_get_block_*() functions should accept constant config_param pointers.
-
Max Kellermann authored
config_get_string() is easier to use than config_get_param() because it unpacks the config_param struct.
-
- 24 Jan, 2009 1 commit
-
-
Max Kellermann authored
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.
-
- 17 Jan, 2009 1 commit
-
-
Max Kellermann authored
Renamed functions, types, variables.
-
- 14 Jan, 2009 1 commit
-
-
Max Kellermann authored
-
- 13 Jan, 2009 1 commit
-
-
Max Kellermann authored
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.
-
- 04 Jan, 2009 2 commits
-
-
Max Kellermann authored
Use g_strndup() instead of g_memdup().
-
Max Kellermann authored
Pass NULL instead of &error to g_convert(). We're not interested in the error object.
-
- 03 Jan, 2009 3 commits
-
-
Max Kellermann authored
tag_merges() merges the data from two tag objects into one.
-
Max Kellermann authored
Don't use g_strescape(), because it escapes all non-ASCII characters. Add a new function which clears all non-printable characters, not just "newline".
-
Max Kellermann authored
This always allocates strings on the heap, but we can delete the stripReturnChar() function now.
-
- 28 Dec, 2008 1 commit
-
-
Thomas Jansen authored
-
- 03 Nov, 2008 1 commit
-
-
Max Kellermann authored
tag_has_type() checks whether the tag contains one or more items with the specified type.
-
- 01 Nov, 2008 3 commits
-
-
Max Kellermann authored
Don't use the deprecated functions from utils.h.
-
Max Kellermann authored
Eliminate code already provided by GLib.
-
Max Kellermann authored
Return NULL instead of the input value if there is nothing to fix. This way, the caller doesn't have to use the xfree() hack.
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
Removed duplicated code.
-
- 08 Oct, 2008 1 commit
-
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
- 06 Oct, 2008 1 commit
-
-
Eric Wong authored
avoid some redundant clearing logic as well, since the tag is getting freed.
-
- 29 Sep, 2008 1 commit
-
-
Eric Wong authored
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.
-
- 08 Sep, 2008 1 commit
-
-
Max Kellermann authored
With a large music database, the linear string collection in tagTracker.c becomes very slow. We implemented that in a quick'n'dirty fashion when we removed tree.c, and now we rewrite it using the fast hashed string set.
-
- 07 Sep, 2008 4 commits
-
-
Eric Wong authored
Gah, it seems like doing sizeof here either way is error prone. Too easy to leave out a '*' character we can forget.
-
Eric Wong authored
The tag pool is a shared global resource that is infrequently modified. However, it can occasionally be modified by several threads, especially by the metadata_pipe for streaming metadata (both reading/writing). The bulk tag_item pool is NOT locked as currently only the update thread uses it.
-
Eric Wong authored
Trying to read or remember "tag->numOfItems * sizeof(*tag->items)" requires too much thinking and mental effort on my part. Also, favor "sizeof(struct mpd_tag)" over "sizeof(*tag->items)" because the former is easier to read and follow, even though the latter is easier to modify if the items member changes to a different type.
-
Max Kellermann authored
Move everything which dumps a tag to a file descriptor to tag_print.c. This relaxes dependencies and splits the code into smaller parts.
-
- 06 Sep, 2008 1 commit
-
-
Eric Wong authored
clearMpdTag could be called on a tag that was still in a tag_begin_add transaction before tag_end_add is called. This was causing free() to attempt to operate on bulk.items; which is un-free()-able. Now instead we unmark the bulk.busy to avoid committing the tags to the heap only to be immediately freed. Additionally, we need to remember to call tag_end_add() when a song is updated before we NULL song->tag to avoid tripping an assertion the next time tag_begin_add() is called.
-
- 29 Aug, 2008 4 commits
-
-
Max Kellermann authored
Don't call tag_pool_get_item() for duplicating tags, just increase the item's reference counter instead.
-
Max Kellermann authored
Yet another patch which converts pointer arguments to "const".
-
Max Kellermann authored
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%.
-
Max Kellermann authored
Try to detect if the string needs Latin1-UTF8 conversion, or whitespace cleanup. If not, we don't need to allocate temporary memory, leading to decreased heap fragmentation.
-