- 01 Apr, 2009 2 commits
-
-
Max Kellermann authored
Moved code from db_get_song().
-
Max Kellermann authored
Renamed directory_get_directory() to directory_lookup_directory(). Added API documentation.
-
- 13 Mar, 2009 1 commit
-
-
Avuton Olrich authored
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.
-
- 09 Mar, 2009 1 commit
-
-
Jochen Keil authored
[mk: fixed whitespace errors; use delete_song() instead of songvec_delete()]
-
- 28 Feb, 2009 1 commit
-
-
Max Kellermann authored
Remember the modification time of each directory. This is important for archives (which are virtual directories right now), but may also be useful for an automatic update mechanism.
-
- 27 Feb, 2009 1 commit
-
-
Max Kellermann authored
Moved some of them to to directory_save.c, and others to database.c.
-
- 04 Jan, 2009 1 commit
-
-
Max Kellermann authored
directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
-
- 16 Dec, 2008 1 commit
-
-
Viliam Mateicka authored
-
- 31 Oct, 2008 1 commit
-
-
Max Kellermann authored
"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.
-
- 13 Oct, 2008 3 commits
-
-
Max Kellermann authored
directory_get_name() returns the base name of the directory.
-
Max Kellermann authored
The inline functions directory_is_empty() and directory_get_path() don't modify the object - pass constant object pointers to them.
-
Eric Wong authored
This way we avoid unnecessary heap allocations.
-
- 09 Oct, 2008 3 commits
-
-
Max Kellermann authored
Some tiny utilities... wrappers like these may become helpful when we introduce locking.
-
Max Kellermann authored
No idea why it was created in directory.h, but it should be in dirvec.h.
-
Max Kellermann authored
Remove clutter from directory.c. Everything which saves or loads to/from the hard disk goes to directory_save.c, and code which sends directory information to the client is moved into directory_print.c.
-
- 08 Oct, 2008 11 commits
-
-
Max Kellermann authored
ino_t and dev_t are declared in sys/types.h, not sys/stat.h.
-
Max Kellermann authored
For the root directory, let's set path to an empty string. This saves a few checks.
-
Max Kellermann authored
Also convert directory_get_path() to an inline function, which returns a constant string.
-
Max Kellermann authored
CamelCase is ugly, rename the functions.
-
Max Kellermann authored
Taming the directory.c monster, part II: move the database management stuff to database. directory.c should only contain code which works on directory objects.
-
Max Kellermann authored
The function isRootDirectory() is tiny and can be converted to an inline function. Don't allow name==NULL.
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
Max Kellermann authored
Again, a data type which can be forward-declared.
-
Max Kellermann authored
The struct can be forward-declared by other headers, which relaxes the header dependencies.
-
Max Kellermann authored
directory_is_empty() is a tiny inline function which determine if a directory has any child objects (sub directories or songs).
-
Max Kellermann authored
The source directory.c mixes several libraries: directory object management, database management and database update, resulting in a 1000+ line monster. Move the whole database update code to update.c.
-
- 06 Oct, 2008 1 commit
-
-
Eric Wong authored
Now the "update" command can be issued multiple times regardless of whether the client is in list mode or not. We serialize the update tasks to prevent updates from trampling over each other and will spawn another update task once the current one is finished updating and reaped. Right now we cap the queue size to 32 which is probably enough (I bet most people usually run update with no argument anyways); but we can make it grow/shrink dynamically if needed. There'll still be a hard-coded limit to prevent DoS attacks, though.
-
- 29 Sep, 2008 3 commits
-
-
Eric Wong authored
MPD has supported more audio formats than just MP3 for over five years...
-
Eric Wong authored
We no longer fork for directory updates, so we no longer have children to reap.
-
Eric Wong authored
Small memory reduction compared to songvec since most users have much fewer dirs than songs, but still nice to have.
-
- 26 Sep, 2008 1 commit
-
-
Max Kellermann authored
SongList has been superseded by struct songvec.
-
- 23 Sep, 2008 4 commits
-
-
Eric Wong authored
A lot of the preparation was needed (and done in previous months) in making update thread-safe, but here it is. This was the first thing I made work inside a thread when I started mpd-uclinux many years ago, and also the last thing I've done in mainline mpd to work inside a thread, go figure.
-
Eric Wong authored
Our linked-list implementation is wasteful and the SongList isn't modified enough to benefit from being a linked list. So use a more compact array of song pointers which saves ~200K on a library with ~9K songs (on x86-32).
-
Eric Wong authored
This should save a few thousand ops. Not worth it to malloc for such a small (3-words on 32-bit ARM and x86) structures. Signed-off-by:
Eric Wong <normalperson@yhbt.net>
-
- 07 Sep, 2008 4 commits
-
-
Max Kellermann authored
Don't pass the raw file descriptor around. This migration patch is rather large, because all of the sources have inter dependencies - we have to change all of them at the same time.
-
Max Kellermann authored
Again, move error handling to command.c.
-
Max Kellermann authored
This patch continues the work of the previous patch: don't pass a file descriptor at all to traverseAllIn(). Since this fd was only used to report "directory not found" errors, we can easily move that check to the caller. This is a great relief, since it removes the dependency on a client connection from a lot of enumeration functions.
-
Max Kellermann authored
Database traversal should be generic, and not bound to a client connection. This is the first step: no file descriptor for the callback functions forEachSong() and forEachDir(). If a callback needs the file descriptor, it has to be passed in the void*data pointer somehow; some callbacks might need a new struct for passing more than one parameter. This might look a bit cumbersome right now, but our goal is to have a clean API.
-
- 06 Sep, 2008 1 commit
-
-
Max Kellermann authored
The usual bunch of const pointer conversions.
-