Max Kellermann
2ba3401238
update_walk: move code to update_song_file()
2012-02-12 16:50:24 +01:00
Max Kellermann
1735284a2a
playlist/embcue: new plugin for reading embedded cue sheets
...
Parses CUE data from the "CUESHEET" tag. Needs further integration in
the update thread.
2012-02-12 16:10:20 +01:00
Max Kellermann
8a3192ffc1
decoder/wavpack: bigger tag value buffer
...
Prepare for big CUESHEET tags.
2012-02-12 16:10:20 +01:00
Max Kellermann
ffea273a28
tag_handler: handle arbitrary name/value pairs
...
The new method pair() receives an arbitrary name/value pair. Support
for this is being added to a few decoder plugins.
2012-02-12 13:41:48 +01:00
Max Kellermann
1783aac438
decoder/wavpack: move code to wavpack_scan_tag_item()
...
Remove clutter from wavpack_scan_file(), and use a (large) fixed
buffer for the tag item.
2012-02-11 19:36:59 +01:00
Max Kellermann
29bf3d2c04
decoder/wavpack: use the tag_table library
2012-02-11 19:34:10 +01:00
Max Kellermann
ee16fc958c
decoder/{mikmod,fluidsynth,mp4ff}: adapt to tag_handler API
...
Fixes build regression.
2012-02-11 19:28:56 +01:00
Max Kellermann
5d73215a8d
decoder_plugin: scan tags with callback table
...
Pass a callback table to scan_file() and scan_stream(), instead of
returning a tag object.
2012-02-11 17:04:29 +01:00
Max Kellermann
b7356bc526
decoder/gme: convert runtime check to assertion
...
When gme_track_info() returns with success, then the gme_info_t
pointer must be set.
2012-02-11 16:59:24 +01:00
Max Kellermann
8ec8282f38
decoder/ffmpeg: use the tag_table library
2012-02-11 16:39:03 +01:00
Max Kellermann
43b7b98949
decoder/ffmpeg: move code to ffmpeg_metadata.c
2012-02-11 16:37:29 +01:00
Max Kellermann
f791065a98
decoder/ffmpeg: remove AV_VERSION_INT definition
...
All supported ffmpeg/libav versions have this.
2012-02-11 16:37:25 +01:00
Max Kellermann
d95db28695
decoder/flac: check for errors only after _process_single()
...
The only other libFLAC call (seek) does not produce fatal errors.
2012-02-11 12:57:18 +01:00
Max Kellermann
851fb16e7c
decoder/flac: symmetric FLAC__stream_decoder_finish() calls
...
Call it in the function that also invokved
FLAC__stream_decoder_init_*().
2012-02-11 12:56:52 +01:00
Max Kellermann
a4cbaafd10
decoder/flac: use error messages from libFLAC
2012-02-11 12:37:24 +01:00
Max Kellermann
c5f2cdb822
decoder/flac: eliminate the remaining "gotos"
...
https://www.xkcd.com/292/
2012-02-11 12:37:24 +01:00
Max Kellermann
1892d29be0
decoder/{vorbis,flac}: use the tag_table library
2012-02-11 12:37:24 +01:00
Max Kellermann
9e5a49b8cb
tag_id3: use the tag_table library for TXXX
2012-02-11 12:37:24 +01:00
Max Kellermann
767ade02f4
tag_table: convert to a struct
...
The struct is smaller because it is sparse. Its traversal is also
more efficient.
2012-02-11 12:37:24 +01:00
Max Kellermann
6e05071a47
decoder_api: correct decoder_seek_error() documentation
2012-02-11 12:37:23 +01:00
Max Kellermann
c8a990b9d3
decoder/vorbis: move code to vorbis_comment.c
2012-02-11 10:04:02 +01:00
Max Kellermann
abcc225763
cue_parser: new line based CUE sheet parser
...
To replace libcue, the unmaintained and crashy library.
2012-02-10 00:12:29 +01:00
Max Kellermann
b9673fc521
command: add optional range parameter to "load"
2012-02-09 23:55:34 +01:00
Max Kellermann
b0ea3f4261
playlist_save: add start/end_index parameters
2012-02-09 23:54:31 +01:00
Max Kellermann
0103219f00
playlist_queue: add start/end_index parameters
2012-02-09 23:44:33 +01:00
Max Kellermann
c46239af22
Merge branch 'v0.16.x'
...
Conflicts:
src/decoder/ffmpeg_decoder_plugin.c
test/read_tags.c
test/run_decoder.c
2012-02-04 17:23:53 +01:00
Max Kellermann
5d9876e338
decoder/ffmpeg: use AV_SAMPLE_FMT_* if available
...
Implements support for libavcodec 0.9, which removes the compatibility
macros SAMPLE_FMT_*
2012-02-03 09:55:25 +01:00
Max Kellermann
083340a937
decoder/ffmpeg: use sentinel for the ffmpeg_tag_maps table
...
Minor optimisation.
2012-02-03 09:18:05 +01:00
Max Kellermann
378fa5ee6a
decoder/ffmpeg: support all MPD tags
...
Use the tag_item_names table to look up the names of all MPD tags, and
remove the duplicate entries from ffmpeg_tag_maps.
2012-02-03 09:10:48 +01:00
Max Kellermann
4764daf3c2
decoder/ffmpeg: pass tag_type and name to _copy_metadata()
...
Allow using this function without the ffmpeg_tag_map struct.
2012-02-03 09:09:18 +01:00
Max Kellermann
6357496d17
decoder/ffmpeg: merge code to _copy_dictionary()
...
Eliminate some duplicate code.
2012-02-03 09:09:18 +01:00
Max Kellermann
001e2a604b
decoder/ffmpeg: add macros emulating AVDictionary
...
Move the #ifdefs out of _copy_metadata().
2012-02-03 09:02:14 +01:00
Max Kellermann
f370911c15
decoder/ffmpeg: _copy_metadata() returns void
...
No interest in this return value.
2012-02-03 08:59:26 +01:00
Max Kellermann
ef5cf40fa6
directory: require the caller to lock the db_mutex
...
Reduce the number of lock/unlock cycles, and make database handling
safer.
2012-02-02 18:06:33 +01:00
Max Kellermann
837bd79b20
db_lock: add assertions
2012-02-02 17:59:51 +01:00
Max Kellermann
3edd4a24af
update_walk: use directory_make_child()
2012-02-02 17:59:51 +01:00
Max Kellermann
535a61b5a9
directory: add new objects to the end of the linked list
...
This was the cause of the reversed ordering when loading a database
file.
2012-02-02 09:59:38 +01:00
Max Kellermann
e87b7daab5
input/soup: use #pragma only with gcc 4.6+
...
It seems gcc 4.5 does not allow #pragma within function:
src/input/soup_input_plugin.c:284:9: error: #pragma GCC diagnostic not allowed inside functions
2012-01-29 14:46:05 +01:00
Max Kellermann
f20689519d
directory: fix deep path lookup
...
This commit fixes a major regression in directory_lookup_directory(),
which broke the deep lookup of directories.
2012-01-29 14:42:28 +01:00
Max Kellermann
ee9c460f74
directory: mark unused parameter
2012-01-24 22:27:42 +01:00
Max Kellermann
84ba14fa29
directory: replace songvec with doubly linked list
2012-01-24 22:26:43 +01:00
Max Kellermann
3c75963352
directory: add function directory_get_song(), ...
...
Wrap songvec_find() and other songvec methods.
2012-01-24 22:26:43 +01:00
Max Kellermann
d99f074eb7
directory: replace dirvec with doubly linked list
...
Random access is not needed, and a linked list is easier to manage: we
don't need to (re-)allocate the pointer array.
2012-01-24 20:49:53 +01:00
Max Kellermann
a989140a07
util/list.h: import the Linux kernel's linked list library
2012-01-24 20:49:52 +01:00
Max Kellermann
420a4c163d
directory: simplify constructors and clarify API documentation
...
Pass only the "name" to a directory, instead of the full (relative)
path.
2012-01-24 20:03:18 +01:00
Max Kellermann
1bab735580
dirvec: unlock mutex in dirvec_find() in all branches
2012-01-24 20:02:32 +01:00
Max Kellermann
a0fcd0cf22
dirvec: don't call g_path_get_basename() on parameter
...
This overhead is completely useless, because no caller expects this
behaviour.
2012-01-24 18:27:00 +01:00
Max Kellermann
5d5c753c74
songvec: move code to songvec_find_pointer()
2012-01-24 18:06:52 +01:00
Max Kellermann
7e7e3eb8d5
songvec: _delete() returns void
...
The given song must exist, or MPD will abort. Calling it with an
unknown song is illegal.
2012-01-24 18:06:25 +01:00
Max Kellermann
2e5f8aeba1
refcount: add missing stdbool.h include
2012-01-24 17:16:42 +01:00
Max Kellermann
c2fe961db1
decoder/ffmpeg: remove debug code
2012-01-24 17:15:29 +01:00
Max Kellermann
2a6acc04a1
dirvec: remove unused functions _clear(), _for_each()
2012-01-21 11:32:06 +01:00
Max Kellermann
a467128093
db_lock: new unified lock for songvec and dirvec
2012-01-21 10:51:53 +01:00
Max Kellermann
d83dea4463
db/simple: pass the correct GError pointer
2012-01-12 18:59:26 +01:00
Max Kellermann
ec43721c3c
Merge branch 'v0.16.x'
...
Conflicts:
src/decoder/ffmpeg_decoder_plugin.c
2012-01-12 18:59:21 +01:00
Max Kellermann
39d52762d1
decoder/ffmpeg: check libavutil version for AVDictionaryEntry
...
Require libavutil 51.5.0.
2012-01-12 18:45:18 +01:00
Max Kellermann
8d45d0d104
decoder/ffmpeg: raise version dependency for avformat_find_stream_info()
...
This function was added when the libavformat version was 53.2.0, but
the actual release 53.2.0 did not have it.
2012-01-12 18:28:19 +01:00
Max Kellermann
26ec62714c
mixer/alsa: listen for external volume changes
...
Use libasound's polling functions, implement a bridge to GSource /
GPollFD and send idle events to clients when an external program
changes the ALSA mixer volume.
2012-01-05 01:52:40 +01:00
Max Kellermann
7873b5e78b
mixer/alsa: move code to alsa_mixer_setup()
...
Better error handling.
2012-01-05 01:52:05 +01:00
Max Kellermann
1b889c527f
mixer/alsa: move code to alsa_mixer_lookup_elem()
2012-01-05 00:52:41 +01:00
Max Kellermann
9937ff8ac0
Merge branch 'v0.16.x'
...
Conflicts:
src/decoder/ffmpeg_decoder_plugin.c
src/input/ffmpeg_input_plugin.c
2012-01-05 00:33:23 +01:00
Max Kellermann
abd1949825
decoder/ffmpeg: support libavformat 0.8
2012-01-05 00:17:56 +01:00
Max Kellermann
4e6bc77a70
decoder/ffmpeg: use avcodec_decode_audio4(), support libavcodec 0.8
2012-01-04 22:10:38 +01:00
Max Kellermann
531948358b
decoder/ffmpeg: include libavutil/mathematics.h
...
Needed for av_rescale_q() in ffmpeg 0.8.
2012-01-04 21:54:54 +01:00
Max Kellermann
21caca4aea
decoder/ffmpeg: use avcodec_open2() on newer ffmpeg versions
...
avcodec_open() has been deprecated.
2012-01-04 21:48:30 +01:00
Max Kellermann
fbf3edf07d
decoder/ffpmeg: don't use av_metadata_conv() in ffmpeg 0.7
...
It's a no-op and deprecated.
2012-01-04 21:47:56 +01:00
Max Kellermann
76fcf25898
decoder/ffmpeg: use AVIOContext instead of ByteIOContext
2012-01-04 21:47:47 +01:00
Max Kellermann
56257f072b
input/ffmpeg: use the new AVIOContext API
...
URLContext is deprecated.
2012-01-04 21:47:19 +01:00
Max Kellermann
44401158e8
input/ffmpeg: define AV_VERSION_INT if not present
...
Support ancient ffmpeg versions.
2012-01-04 21:47:01 +01:00
Max Kellermann
95b2df8261
output/osx: fix memory leak after AudioUnitSetProperty() failure
2012-01-04 20:47:41 +01:00
Max Kellermann
1ebadf8620
output/osx: implement 32 bit playback
2011-12-24 18:18:42 +01:00
Max Kellermann
9179d9592d
output/osx: allocate the device in enable()
...
Keep the device open as long as the output is enabled, but initialize
it only when playback starts.
2011-12-24 18:15:24 +01:00
Max Kellermann
43c5058682
Merge branch 'v0.16.x'
2011-12-24 18:15:17 +01:00
Max Kellermann
97b4a6b51f
output/osx: clear render buffer when there's not enough data
...
When we don't have enough data, generate some silence, hoping the
input buffer will fill soon. Reducing the render buffer size is not
legal.
2011-12-24 17:59:36 +01:00
Max Kellermann
f405d27c56
output/osx: remove sleep call from render callback
...
Blocking inside the render callback is forbidden, and this sleep call
didn't make any sense.
2011-12-24 17:56:10 +01:00
Max Kellermann
99949c8f6f
command: new command "seekcur"
...
For simpler seeking within current song.
2011-12-24 11:20:02 +01:00
Maarten Sebregts
3a9697adf2
Playlist: fix bug in moving after current song
...
Moving songs using either 'move' or 'moveid' to position -1 (after the
current song) would fail for a song which is just before the current
song.
This patch corrects the check to see if the current song is in the range
to be moved. Since the range is from `start` up to `end` (exclusive) the
check was incorrect, but is now fixed.
2011-12-21 10:29:07 +01:00
Max Kellermann
78c4351e04
output/openal: improve synchronization
...
This plugin's use of the "Timer" library was wrong; it added the same
amount of virtual data in every iteration in _play(), but did not
actually play something. This created an artificial, but useless,
delay. This patch implements the method _cancel(), and implements
hard-coded sleep values. This is only slightly better, but does not
attempt to look sane.
2011-12-13 22:02:05 +01:00
Max Kellermann
0a427890fe
output/openal: move code to inline functions
2011-12-13 22:00:18 +01:00
Max Kellermann
e735abe334
output/openal: use alGetSourcei(AL_BUFFER) to force-unqueue buffers
...
The implementation of cancel() did not work well: you cannot use
alSourceUnqueueBuffers() to unqueue queued buffers, and our function
openal_unqueue_buffers() left the OpenAL library in a rather undefined
state; nothing was supposed to be queued, but the "filled" variable
was not reset.
2011-12-13 21:59:10 +01:00
Max Kellermann
c0070b2f13
output/openal: make attribute "filled" unsigned
2011-12-13 21:58:13 +01:00
Max Kellermann
cfedc6e9b4
output/openal: remove bogus format check from _open()
...
The expression "!format" does not make sense, and cannot occur.
2011-12-13 21:58:09 +01:00
Max Kellermann
b66d7f7e0b
output/fifo: implement output_plugin method delay()
2011-12-13 21:58:07 +01:00
Max Kellermann
e01df06cd7
output/null: implement output_plugin method delay()
2011-12-13 21:58:02 +01:00
Max Kellermann
6584897b69
output/null: don't initialize the "timer" attribute in _init()
...
Unnecessary overhead.
2011-12-13 21:57:59 +01:00
Max Kellermann
aa4f45b9a5
Merge branch 'v0.16.x'
...
Conflicts:
NEWS
configure.ac
2011-12-13 21:57:44 +01:00
Max Kellermann
96ad5b8444
output/openal: force 16 bit playback, as 8 bit doesn't work
...
The OpenAL specification says that AL_FORMAT_MONO8 and
AL_FORMAT_STEREO8 expect unsigned 8 bit samples, but MPD uses unsigned
samples.
2011-12-13 21:32:19 +01:00
Max Kellermann
097e5dfbdc
timer: fix time unit mixup in timer_delay()
...
The local variable was already divided by 1000, and the return value
was being divided by 1000 again - doh! This caused delays in the
httpd output plugin that were too small by three orders of magnitude,
and the buffer was filled too quickly.
2011-12-13 21:02:48 +01:00
Max Kellermann
2ef7ee6ca7
update_walk: print debug message for song_file_load()
2011-12-13 20:26:24 +01:00
Max Kellermann
533e4fcdad
decoder/mp4ff: work around assertion failure in read() callback
...
This workaround leads to an infinite loop instead of an assertion
failure, but hey, now it's libmp4ff's fault.
2011-12-13 20:08:31 +01:00
Max Kellermann
006b8fa3f0
pcm_buffer: poison the old buffer before returning it
...
Make valgrind find more buffer misuses. Buffer contents are not
persistent, they get invalidated by pcm_buffer_get(), because this
function may allocate a new buffer, but will not copy old data.
2011-12-13 19:55:41 +01:00
Max Kellermann
6a01153ce4
pcm_buffer, output_plugin, ...: include config.h
2011-12-13 19:48:37 +01:00
Max Kellermann
34aab116ae
pcm_buffer: eliminate merge conflict fallout
2011-12-13 19:48:33 +01:00
Denis Krjuchkov
33232face9
winmm_output_plugin: fail if wrong device specified instead of using fallback.
...
Silently choosing default is misleading and can cause hours of investigation.
It's better to fail immediately telling user what is wrong with config.
2011-12-13 19:12:33 +01:00
Denis Krjuchkov
b88b2b3d79
output_init: initialize replay gain filters to NULL in ao_base_init()
...
If output plugin fails to init it will try to call ao_base_finish() immediately,
which segfaults because replay gain filters are not initialized yet and contain
garbage values.
2011-12-13 19:12:30 +01:00
Max Kellermann
744d729dab
input/soup: disable -Wcast-qual to work around libsoup header problem
2011-12-12 10:15:04 +01:00
Avuton Olrich
f5d3859238
cmdline: Remove duplicate g_free()s
2011-12-12 09:20:00 +01:00
Avuton Olrich
ef39da5973
configure/utils: Add ipv6 support for mingw build
2011-12-12 09:19:34 +01:00
Max Kellermann
4f093d5b97
Merge branch 'v0.16.x'
...
Conflicts:
Makefile.am
NEWS
configure.ac
src/encoder/flac_encoder.c
src/log.c
src/pcm_buffer.c
2011-11-28 11:56:01 +01:00
Max Kellermann
e1b032cbad
decoder/ffmpeg: work around bogus channel count
...
Initialize the audio_format before calling avcodec_open(), because
avcodec_open() will fill bogus values.
2011-11-28 11:39:21 +01:00