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
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
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
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
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
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
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
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
Max Kellermann
6f365c30eb
mapper: check "r" permission on music directory
...
Yet another common support case.
2011-11-28 09:57:21 +01:00
Max Kellermann
718e180423
mapper: check "x" permission on music directory
...
This is a common support case, and hopefully, the new error message
will allow the user to understand the error without requiring support.
2011-11-28 09:51:21 +01:00
Max Kellermann
cead5e5bd7
mapper: fix the bogus "not a directory" error message
...
Use stat() instead of g_file_test() to detect other types of errors,
such as "permission denied".
2011-11-28 09:50:44 +01:00
Max Kellermann
cf15629aea
mapper: move code to check_directory()
2011-11-28 09:35:50 +01:00
Max Kellermann
a727d0bb0b
log: print reason for failure
2011-11-28 09:31:43 +01:00
Max Kellermann
0a218ee56a
encoder/wave: support packed 24 bit samples
...
Convert to padded 24 bit samples, instead of falling back to 16 bit.
2011-11-28 09:25:42 +01:00
Max Kellermann
74beefcaf6
encoder/null: use fifo_buffer instead of pcm_buffer
...
This fixes a buffer corruption bug; pcm_buffer is not designed to be a
persistent buffers, and will discard anything between two consecutive
calls.
2011-11-28 09:23:36 +01:00
Max Kellermann
399a3abefc
encoder/wave: use fifo_buffer instead of pcm_buffer
...
This fixes a buffer corruption bug; pcm_buffer is not designed to be a
persistent buffers, and will discard anything between two consecutive
calls.
2011-11-28 09:23:12 +01:00
Max Kellermann
cee5036aca
encoder/flac: use fifo_buffer instead of pcm_buffer
...
This fixes a buffer corruption bug; pcm_buffer is not designed to be a
persistent buffers, and will discard anything between two consecutive
calls.
2011-11-28 09:21:32 +01:00
Max Kellermann
790823abb4
growing_fifo: new utility library for growing fifo_buffer
2011-11-28 09:11:11 +01:00
Max Kellermann
f546849352
fifo_buffer: add function fifo_buffer_realloc()
...
For growing FIFO buffers.
2011-11-28 07:45:15 +01:00
Max Kellermann
a85af593f1
fifo_buffer: add functions _capacity() and _available()
2011-11-27 21:11:47 +01:00
Max Kellermann
07067f8b95
pcm_buffer: add assertions
2011-11-27 20:17:52 +01:00
Max Kellermann
a1e824ada0
pcm_buffer: move formula to new function align_8k()
2011-11-27 20:17:14 +01:00
Max Kellermann
f5f1bfbef1
pcm_buffer: un-inline pcm_buffer_get()
...
This method is too complex for inlining.
2011-11-27 20:17:12 +01:00
Max Kellermann
cd108ba3aa
directory: rename attribute "stat" to "have_stat"
...
"stat" is a macro on mingw32, which is a pretty stupid thing, and this
commit works around this build failure.
2011-11-27 20:15:25 +01:00
Max Kellermann
2bb5bfa74e
directory: convert "stat" to a bool
2011-11-27 20:11:45 +01:00
Max Kellermann
624e7a447d
stats: explicitly cast "time_t" to "long"
...
Fixes warning on mingw32.
2011-11-27 20:07:14 +01:00
Max Kellermann
ef40e362c9
decoder_api: cancel initial seek when song is not seekable
...
Fixes assertion failure.
2011-11-27 19:19:43 +01:00
Denis Krjuchkov
6452461c39
path: autodetect filesystem encoding on Win32
...
WinAPI explicitly declares filesystem encoding.
It can be determined by GetACP().
Use that instead of Glib routine that always "detects" UTF-8 on Win32,
which is incorrect for MPD case.
2011-10-23 16:29:58 +02:00
Max Kellermann
c30c46cd5f
configure.ac: define WINVER
...
Ensure that WINVER is defined early enough, so other system headers
won't fall back to their default value. Specifically, this solves a
build failure (-Werror) with mingw-w64 ("WINVER redefined").
2011-10-13 09:23:32 +02:00
Max Kellermann
d394017926
decoder_thread: add missing stdio.h include
2011-10-13 09:09:58 +02:00
Max Kellermann
04525c0259
event_pipe: fix WIN32 regression
...
The event pipe is not a socket, and the patch that introduced
g_io_channel_new_socket() to the event pipe library was wrong.
2011-10-13 09:08:37 +02:00
Max Kellermann
71536eb412
decoder/wavpack: don't call WavpackGetMode() twice
...
Use local variable "is_float".
2011-10-08 15:37:47 +02:00
Max Kellermann
fe77230d84
pcm_convert: fix typo in error message
2011-10-08 15:36:55 +02:00
Max Kellermann
5ed0eb51d1
output/openal: auto-fallback to mono if channel count is unsupported
...
.. instead of failing playback completely.
2011-10-08 14:41:22 +02:00
Max Kellermann
72a1ca3b99
output/alsa: remove "default" case from switch
...
Allow gcc to warn when a new format isn't supported.
2011-10-08 14:41:11 +02:00