aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-01-18Playlist, Song: clarify parameter encodingMax Kellermann1-2/+2
2013-01-08song: don't use GLibMax Kellermann1-4/+6
2013-01-08util/list: don't use GLibMax Kellermann1-0/+2
2013-01-03Directory: rename struct directory to DirectoryMax Kellermann1-4/+4
2012-08-15ProxyDatabase: pass "detached" objects to visitorsMax Kellermann1-0/+6
Fixes wrong object URIs with duplicate base names.
2012-08-15Song: add function song_dup_detached()Max Kellermann1-0/+25
Initial support for "detached" songs that come from the database, but are private copies.
2012-08-15Song: add function song_equals()Max Kellermann1-0/+8
decoder_is_current_song() now recognizes different instances of the same physical song.
2012-08-15Song: move trivial inline functions upMax Kellermann1-12/+12
2012-08-08song: use C++ compilerMax Kellermann1-0/+4
2012-02-12song: add function song_replace_uri()Max Kellermann1-0/+9
2012-01-24directory: replace songvec with doubly linked listMax Kellermann1-0/+12
2011-01-29copyright year 2011Max Kellermann1-1/+1
2009-12-31Update copyright notices.Avuton Olrich1-1/+1
2009-12-27song: added support for selecting a time rangeMax Kellermann1-0/+12
Added attributes start_ms, end_ms. This allows us to address a portion of a song file (important for CUE support). There is no support yet for storing these attributes in the state file.
2009-12-26song: added function song_get_duration()Max Kellermann1-0/+3
2009-11-01song_save: load one song at a timeMax Kellermann1-3/+0
Changed songvec_load() to song_load(). Added start and end markers for each song. Removed the "key" line, it's redundant.
2009-10-13song: renamed attribute "url" to "uri"Max Kellermann1-3/+3
2009-03-13all: Update copyright header.Avuton Olrich1-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.
2009-01-04song: allocate the result of song_get_url()Max Kellermann1-6/+7
2008-12-16song: adding support for songs in archivesViliam Mateicka1-0/+3
2008-10-31added prefix to header macrosMax Kellermann1-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.
2008-10-15playlist: added support for adding songs not in the music databaseMax Kellermann1-1/+1
Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
2008-10-15song: added song_in_database()Max Kellermann1-1/+7
Some functions assume that a song is not in the database when it is a remote song. Based on that, they decide whether they are responsible for freeing the song struct. Add a special function which checks whether a song is in the database (currently equal to song_is_file()).
2008-10-14song: pass const song pointer to song_get_url()Max Kellermann1-1/+1
song_get_url() doesn't modify the song object.
2008-10-08song: song_file_update() returns boolMax Kellermann1-1/+1
Instead of returning 0 or -1, return true on success and false on failure. This seems more natural, and when the C library was designed, there was no "bool" data type.
2008-10-08song: removed CamelCaseMax Kellermann1-6/+6
CamelCase is ugly... rename all functions.
2008-10-08song: replaced all song constructorsMax Kellermann1-2/+12
Provide separate constructors for creating a remote song, a local song, and one for loading data from a song file. This way, we can add more assertions.
2008-10-08use the "bool" data type instead of "int"Max Kellermann1-2/+4
"bool" should be used in C99 programs for boolean values.
2008-10-08don't include os_compat.hMax Kellermann1-2/+2
When there are standardized headers, use these instead of the bloated os_compat.h.
2008-10-08CPP include cleanupMax Kellermann1-3/+0
Include only headers which are really used.
2008-10-08song: converted typedef Song to struct songMax Kellermann1-8/+13
Again, a data type which can be forward-declared.
2008-10-08directory: converted typedef Directory to struct directoryMax Kellermann1-3/+3
The struct can be forward-declared by other headers, which relaxes the header dependencies.
2008-10-07song: really make the song struct non-packedMax Kellermann1-1/+1
Somehow I must have missed this in commit 22e40b61.
2008-10-07directory: serialize song deletes from playlist during updateEric Wong1-2/+0
This makes the update code thread-safe and doesn't penalize the playlist code by complicating it with complicated and error-prone locks (and the associated overhead, not everybody has a thread-implementation as good as NPTL). The update task blocks during the delete; but the update task is a slow task anyways so we can block w/o people caring too much. This was also our only freeSong call site, so remove that function. Note that deleting entire directories is not fully thread-safe, yet; as their traversals are not yet locked.
2008-10-06song: stop storing song_typeEric Wong1-9/+7
We already know if a song is a URL or not based on whether it has parentDir defined or not. Hopefully one day in the future we can drop HTTP support from MPD entirely when an HTTP filesystem comes along and we can access streams via open(2).
2008-10-06song: don't make the struct packedMax Kellermann1-1/+1
The "packed" attribute may have negative side effects on performance. Remove the "packed" attribute, and increase the size of "song.url" to a multiple of the machine word size.
2008-10-06song: use flex arrays to store song->urlEric Wong1-2/+6
Reduce the number of allocations we make, so there's less pressure on the allocator and less overhead to keep track of the allocations in.
2008-10-06song: get rid of newNullSong()Eric Wong1-2/+0
It didn't save us any lines of code nor did it do anything useful since we would overwrite everything anyways.
2008-09-29assume stdint.h and stddef.h are availableMax Kellermann1-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.
2008-09-29song: converted "type" to enumMax Kellermann1-4/+7
Having an enum type is much nicer than an anonymous integer plus CPP macros. Note that the old code didn't save any space by declaring the variable 8 bit, due to padding.
2008-09-29switch to C99 types, part IIMax Kellermann1-1/+1
Do full C99 integer type conversion in all modules which were not touched by Eric's merged patch.
2008-09-26song: removed type SongListMax Kellermann1-10/+0
SongList has been superseded by struct songvec.
2008-09-07pass "struct client" to dbUtils.c, song.c, tag_print.cMax Kellermann1-0/+2
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.
2008-09-07song: moved code to song_print.c, song_save.cMax Kellermann1-11/+2
Move everything which dumps song information (via tag_print.c) to a separate source file. song_print.c gets code which writes song data to the client; song_save.c is responsible for serializing songs from the tag cache.
2008-09-06include cleanupMax Kellermann1-3/+2
As usual, include only headers which are really needed.
2008-08-29song: don't export newNullSong()Max Kellermann1-2/+0
The function newNullSong() is only used internally in song.c.
2008-08-29tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann1-1/+1
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
2008-04-12song: document get_song_url()Eric Wong1-0/+6
[merged r7184 from branches/ew] git-svn-id: https://svn.musicpd.org/mpd/trunk@7242 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-02-05fix -Wconst warningsMax Kellermann1-2/+2
[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
2008-01-03Cleanup #includes of standard system headers and put them in one placeEric Wong1-4/+1
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