Commit Graph

6126 Commits

Author SHA1 Message Date
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 abf41eb85c .gitignore: add new output files 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 0d3ec9c324 configure.ac: disable -Wno-deprecated-declarations 2012-01-04 21:48:30 +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 f208217412 test/run_output: enable and disable the output 2011-12-24 18:15:20 +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 2685b53b30 configure.ac: suppress warnings in the GLib headers
Replace -I with -isystem in GLIB_CFLAGS.
2011-12-13 20:12:49 +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