Max Kellermann
b2f03e76ff
player_thread: add flag "output_open", fixes assertion failure
...
Previously, the condition "defined(play_audio_format)" was used to see
if an output device has been opened, but if the device had failed on
startup, an assertion failure could occur. This patch adds a separate
flag.
2011-10-06 21:22:48 +02:00
Max Kellermann
63b33b6ec5
player_thread: move code to player_open_output()
...
Common function that manages "player" attributes after
audio_output_all_open() has returned.
2011-10-06 20:55:52 +02:00
Max Kellermann
23670795db
output_control: remove unused prototype _close_locked()
2011-10-06 19:51:37 +02:00
Max Kellermann
8ea6c113b5
player_control: auto-start playback when seeking is requested
...
Now that the player thread can handle SEEK commands while not (yet)
playing, we can remove the "pc.state" check from pc_seek().
2011-10-06 00:35:54 +02:00
Max Kellermann
37f026a0a6
player_thread: handle SEEK while not playing
2011-10-06 00:35:53 +02:00
Max Kellermann
f67136df19
decoder_api: call _prepare_initial_seek() in decoder_tag()
...
This checks both conditions: pending and running. Fixes yet another
assertion failure!
2011-10-06 00:35:53 +02:00
Max Kellermann
e07073ff28
decoder_api: move code to _prepare_initial_seek()
...
.. and add a few code comments.
2011-10-06 00:35:53 +02:00
Max Kellermann
64b0ba6da7
decoder_control: add attributes start_ms, end_ms
...
Don't read song.start_ms and song.end_ms, let the player thread manage
this logic instead.
2011-10-05 23:15:22 +02:00
Max Kellermann
99d4ae0c1a
decoder_api: don't copy tag to pipe during initial seek
...
Fixes one more assertion failure.
2011-10-05 22:54:30 +02:00
Max Kellermann
f185b35088
decoder_api: clear initial_seek_running on error
...
Fixes possible assertion failure.
2011-10-04 22:29:31 +02:00
Miklos Vajna
83f6498aac
Install systemd service file if systemd is available
2011-09-30 08:37:36 +02:00
Max Kellermann
525a791987
decoder_api: emulate SEEK command for initial seek to CUE track
...
When playing a CUE track, the player thread waited for the decoder to
become ready, and then sent a SEEK command to the beginning of the CUE
track. If that is near the start of the song file, and the track is
short enough, the decoder could have finished decoding already at that
point, and seeking fails.
This commit makes this initial seek more robust: instead of letting
the player thread deal with the difficult timings, let the decoder API
emulate a SEEK command, and return it to the decoder plugin, as soon
as the plugin finishes its initialization.
2011-09-22 00:04:48 +02:00
Max Kellermann
fb19210cfd
decoder_internal.h: more API documentation
2011-09-22 00:04:20 +02:00
Jonathan Neuschäfer
b0b2c5b3e0
utils: uri.h: fix a typo: "schema"
2011-09-21 17:47:28 +02:00
Max Kellermann
29742d23d3
configure.ac: fix --enable-id3 help string
2011-09-20 22:18:42 +02:00
Max Kellermann
c476819cb1
fd_util: add function close_socket()
...
Wrap close(), use closesocket() on WIN32/WinSock.
2011-09-20 08:38:58 +02:00
Max Kellermann
77a56c7c5a
fd_util: check HAVE_INOTIFY_INIT in header
...
Don't provide the prototype if inotify_init() was not detected.
2011-09-20 08:38:17 +02:00
Max Kellermann
46deb7ca82
fd_util: include check.h, verify config.h was included
2011-09-20 08:38:08 +02:00
Max Kellermann
b03f9ece05
glib_socket.h: wrap g_io_channel_*_new() calls portably
...
The server_socket library (used by the httpd output plugin) didn't
check for WIN32, that's fixed now.
2011-09-20 08:35:25 +02:00
Max Kellermann
1d8840412f
configure.ac: add option --enable-solaris-output
...
Allow enabling the plugin explicitly without running Solaris, to test
the build.
2011-09-19 09:39:35 +02:00
Max Kellermann
df1152ee0f
configure.ac: fix solaris result display
...
Wrong variable name.
2011-09-19 09:39:05 +02:00
Tim Harder
79435dbdec
decoder/audiofile: include stdio header for SEEK_* defines
...
The stdio header is no longer pulled in by af_vfs.h in audiofile-0.3.0.
2011-09-17 07:33:42 +02:00
Max Kellermann
27206368da
output/pulse: improve locking
...
Always lock the main loop when operating on PULSE objects. Document
this.
2011-09-17 07:30:59 +02:00
Max Kellermann
443e96381a
configure.ac: disable assertions in the non-debugging build
...
Add -DNDEBUG to AM_CPPFLAGS.
2011-09-16 07:41:41 +02:00
Max Kellermann
1cbba4fc59
input/curl, output/pulse: fix "unused local variable" warnings
2011-09-16 07:41:41 +02:00
Max Kellermann
344b6dd179
configure.ac: enable -Werror for C++
2011-09-16 07:38:00 +02:00
Max Kellermann
d8c829fa0c
configure.ac: pass AM_CXXFLAGS, AM_CPPFLAGS to Makefile.am
2011-09-16 07:35:46 +02:00
Max Kellermann
2ed870c854
decoder/ffmpeg: flush the codec after seeking
...
Let the codec start with fresh buffers. This should fix the remaining
seeking issues.
2011-09-15 21:41:25 +02:00
Max Kellermann
ce35ba9ac9
decoder/ffmpeg: explicitly specify the current stream for seeking
...
Use AVStream.time_base to convert the decoder_seek_where() value, and
pass the current stream number to av_seek_frame().
2011-09-15 21:35:29 +02:00
Max Kellermann
724a59aaf7
decoder/ffmpeg: don't require key frame for seeking
...
Use flag AV_TIME_BASE.
2011-09-15 21:32:29 +02:00
Max Kellermann
42d8c2981f
decoder/ffmpeg: higher precision timestamps
2011-09-15 21:30:27 +02:00
Max Kellermann
9aa91e0f17
decoder/ffmpeg: move formula to time_from_ffmpeg()
2011-09-15 21:23:48 +02:00
Max Kellermann
5aabee8996
decoder/ffmpeg: add local variable "av_stream"
...
Code simplification.
2011-09-15 21:14:53 +02:00
Max Kellermann
48a84ca23e
input/rewind: copy the MIME type only once
...
Reduce heap usage by reducing the number of malloc() / free() calls.
2011-09-15 20:24:15 +02:00
Max Kellermann
c345c5ebae
.gitignore: add doxygen.conf
2011-09-09 23:21:20 +02:00
Max Kellermann
5cf4ce9318
pcm_format: fix 32-to-24 bit conversion (the "silence" bug)
...
D'oh, we were reading 16 bit integers instead of 32 bit integers!
That caused silence when trying to play a 32 bit input file on a 24
bit sound card (e.g. USB sound chips with 24 bit packed samples).
2011-09-08 23:47:32 +02:00
Avuton Olrich
5469941f2b
Modify version string to post-release version 0.16.5~git
2011-09-01 17:58:29 -07:00
Avuton Olrich
e888c9e827
mpd version 0.16.4
2011-09-01 17:58:28 -07:00
Max Kellermann
2556449b36
configure.ac: fail if Vorbis was enabled explicitly, but not found
...
.. and a minor tweak for libFLAC+libogg detection.
2011-09-01 19:02:23 +02:00
Max Kellermann
446f9973cc
configure.ac: fail if FLAC was enabled explicitly, but not found
2011-09-01 19:02:22 +02:00
Max Kellermann
596f36bb78
output/osx: don't drain the buffer when closing
...
Eliminate an unnecessary source of deadlocks.
2011-09-01 18:21:46 +02:00
Max Kellermann
e7abdab58d
output/osx: signal the GCond while mutex is locked
2011-09-01 18:21:46 +02:00
Max Kellermann
13cdc9a9f8
configure.ac: auto-detect libmad without pkg-config
...
The pkg-config file was added by the Debian package maintainers, and
unfortunately, the rest of the world doesn't have it.
2011-09-01 11:06:08 +02:00
Max Kellermann
a1b8806422
configure.ac: fail if libid3tag was enabled explicitly, but not found
...
Add M4 function MPD_AUTO_PKG_LIB for pkg-config with AC_CHECK_LIB
fallback.
2011-09-01 10:58:36 +02:00
Max Kellermann
e635d47912
configure.ac: use MPD_AUTO_PKG to detect avahi
...
Don't abort the configure script when avahi could not be
auto-detected. It previously did, because there was no custom "fail"
action for PKG_CHECK_MODULES.
2011-09-01 10:11:23 +02:00
Max Kellermann
53ac72a878
Makefile.am: use AVAHI_CFLAGS, AVAHI_LIBS
...
Don't add those to MPD_CFLAGS / MPD_LIBS.
2011-09-01 10:09:46 +02:00
Max Kellermann
2be6184c8d
output_all: move _lock_signal() to output_control.c
...
Better name, better documentation.
2011-09-01 07:59:15 +02:00
Max Kellermann
8b0b4ff086
output_thread: reimplement CANCEL synchronization
...
The output thread could hang indefinitely after finishing CANCEL,
because it could have missed the signal while the output was not
unlocked in ao_command_finished().
This patch removes the wait() call after CANCEL, and adds the flag
"allow_play" instead. While this flag is set, playback is skipped.
With this flag, there will not be any excess wait() call after the
pipe has been cleared.
This patch fixes a bug that causes mpd to discontinue playback after
seeking, due to the race condition described above.
2011-09-01 07:13:21 +02:00
Max Kellermann
60f7ff3de5
output/pulse: reset callbacks before closing stream/context
...
Fixes assertion failure when a stream callback is invoked too late
after a format change.
2011-08-31 21:01:34 +02:00
Max Kellermann
e76c752987
output/pulse: add function _delete_stream()
...
Merge common code.
2011-08-31 21:01:22 +02:00