Commit Graph

3869 Commits

Author SHA1 Message Date
Max Kellermann 92db09fdf8 listen: return GError on "unix path too long"
When the unix domain socket path is too long, don't abort with
g_error().
2009-03-01 13:35:44 +01:00
Max Kellermann f2664e329f listen: removed unused macro BINDERROR() 2009-03-01 13:34:44 +01:00
Max Kellermann d399d4b63b output_init: removed getBlockParam()
Use config_get_block_string() and manual GError handling instead.
2009-03-01 13:32:42 +01:00
Max Kellermann f298fcf3a6 output_init: return GError on error
Do error handling with GError instead of aborting with g_error().
2009-03-01 13:31:56 +01:00
Max Kellermann cb942eeb45 output_init: moved code to audio_output_detect() 2009-03-01 13:31:32 +01:00
Max Kellermann af66f666c6 audiofile: added 24 bit support
Don't hard code the "bits" parameter to 16.  Try to use the input's
sample format, if possible.
2009-03-01 10:53:46 +01:00
Max Kellermann 614fe8b341 output: removed duplicate debug messages from plugins
The MPD core logs the audio format of all audio outputs.  Remove the
duplicate message from the plugins.
2009-03-01 10:39:42 +01:00
Max Kellermann e1b79479a5 output_thread: log audio format in a debug message
To aid debugging, print the audio format of the output plugin in a
debug message, and print information about PCM conversion.
2009-03-01 10:37:26 +01:00
Max Kellermann a81a84eaa4 decoder_api: log audio format in a debug message
To aid debugging, print the audio format of the decoder plugin in a
debug message, and print information about PCM conversion.
2009-03-01 10:31:47 +01:00
Max Kellermann c0e61687b6 listen: fix windows specific code
During the listen_add_host() API transition, the windows code wasn't
tested, and several removed arguments are still in use there.
2009-03-01 01:49:49 +01:00
Max Kellermann 8c3df4cc83 socket_util: include ws2tcpip.h for getnameinfo()
Windows doesn't have the standard headers sys/socket.h and netdb.h.
2009-03-01 01:35:54 +01:00
Max Kellermann eb64f6542f daemon: disable daemonize_detach() on WIN32 2009-03-01 01:35:53 +01:00
Max Kellermann b4f84fab34 configure.ac: make "xmlto" optional
Even when --enable-documentation is passed, don't abort if "xmlto" was
not found.
2009-03-01 01:26:04 +01:00
Max Kellermann c4626143c9 Makefile.am: fixed xmlto output path
The output path must be ./doc/protocol/, not ./protocol/
2009-03-01 01:15:09 +01:00
Max Kellermann 80571d1b5a tag: convert ignore_tag_items to a bool array 2009-03-01 00:58:32 +01:00
Max Kellermann 6153c86bc3 tag: added API documentation 2009-03-01 00:55:20 +01:00
Max Kellermann b49518c636 tag: no CamelCase
Renamed functions and variables.
2009-03-01 00:52:02 +01:00
Max Kellermann ae87abae59 use GLIB_CHECK_VERSION()
Use GLIB_CHECK_VERSION() instead of manually checking
GLIB_MAJOR_VERSION, ...
2009-03-01 00:37:22 +01:00
Max Kellermann 82b081a6db volume: throttle access to hardware mixers
On some hardware, reading the mixer value from hardware is an
expensive operation, and MPD has to do it for every client.  Throttle
access to the hardware, cache the result for one second.
2009-02-28 21:12:15 +01:00
Max Kellermann ec4fd9fd88 output: use GTimer instead of time_t for reopen after failure
time() is not a monotonic timer, and MPD might get confused by clock
skews.  clock_gettime() provides a monotonic clock, but is not
portable to non-POSIX systems (i.e. Windows).  This patch uses GLib's
GTimer API, which aims to be portable.
2009-02-28 20:43:23 +01:00
Max Kellermann a5c09c91c4 output: added option to disable audio outputs by default
The option "enabled" is on by default.  If you specify "enabled no" in
an audio_output section, then this device is disabled by default.
2009-02-28 19:40:39 +01:00
Max Kellermann d29db0111c audiofile: removed duplicate decoder_get_command() calls
decoder_data() returns a decoder_command, no need to call
decoder_get_command() twice after decoder_command().
2009-02-28 19:28:38 +01:00
Max Kellermann 0813092c63 audiofile: refuse to play non-seekable files
If an input_stream is not seekable, libaudiofile fails to play at all:

 Audio File Library: unrecognized audio file format [error 0]

Since we know in advance whether the input_stream is seekable, just
refuse to play on a non-seekable stream.
2009-02-28 19:24:40 +01:00
Max Kellermann 44b55bff89 audiofile: no CamelCase
Renamed several variables and a function.
2009-02-28 19:09:54 +01:00
Max Kellermann 2a69aba7bc Merge branch 'master' of git://git.musicpd.org/avuton/mpd 2009-02-28 17:24:27 +01:00
Avuton Olrich 88793c7189 configure: don't fail if pipe_output is the only output plugin. 2009-02-28 08:13:31 -08:00
Avuton Olrich 731cc8cf08 configure: move id3 and lame to 'Other Features' 2009-02-28 08:09:43 -08:00
Max Kellermann 362cc22558 test: added test program which reads tags from a file 2009-02-28 17:04:37 +01:00
Avuton Olrich d1d4c3245c configure: don't fail if mp4 is the only enabled input plugin. 2009-02-28 07:55:39 -08:00
Avuton Olrich a31f3c89fb configure: move the configure status stuff in alphabetical order. 2009-02-28 07:50:13 -08:00
Max Kellermann 4a2b315ab6 tag: moved APE code to tag_ape.c 2009-02-28 16:44:41 +01:00
Avuton Olrich 374e090985 pipe: Fix wording in configure and add configure status. 2009-02-28 07:41:05 -08:00
Michal Nazarewicz cabbf7ab4a pipe: new audio output plugin which runs a command
[mk: adapted to new output plugin API]
2009-02-28 16:11:59 +01:00
Max Kellermann 5ea8a0df3f decoder_list: print decoder list with suffixes
Print the list of suffixes supported by each decoder, instead of
prining a list of all suffixes of all decoders with duplicates.
2009-02-28 15:29:51 +01:00
Max Kellermann 1bb0124b77 listen: allocate sockaddr_storage struct for accept()
The generic sockaddr struct is too small for some addresses.  For
accept(), we have to allocate a sockaddr_storage struct on the stack,
which is large enough for all addresses.
2009-02-28 15:20:35 +01:00
Max Kellermann 5c10d2ded7 client: use sockaddr_to_string()
Removed the sockaddr_to_tmp_string() hack, use
the new function sockaddr_to_string() instead.
2009-02-28 15:20:35 +01:00
Max Kellermann e085deb944 socket_util: unpack V4MAPPED addresses
Unpack IPv4 addresses which are packed inside an IPv6 address,
i.e. return "127.0.0.1" rather than "::ffff:127.0.0.1".
2009-02-28 15:20:33 +01:00
Max Kellermann b55d9fcdb8 socket_util: added function sockaddr_to_string()
Create the socket_util.c library, the first function is
sockaddr_to_string(): it converts a sockaddr struct to a string
containing the IP address in a human-readable form.
2009-02-28 15:12:24 +01:00
Max Kellermann 0fcb7dc65c update: use G_FILE_TEST_IS_REGULAR for archive files
When checking whether database entries have been deleted, don't check
if an archive file is a directory (G_FILE_TEST_IS_DIR), use
G_FILE_TEST_IS_REGULAR for this case instead.  To determine if a
"struct directory" is an archive, check for device==DEVICE_INARCHIVE.
This is always false after loading the database, so this patch is not
complete yet.
2009-02-28 14:02:08 +01:00
Max Kellermann 83b1b0ff69 update: don't update unchanged archive
When the mtime of an archive time hasn't changed, don't update it
again.
2009-02-28 14:02:03 +01:00
Max Kellermann 2aebbf8460 directory: added "mtime" property
Remember the modification time of each directory.  This is important
for archives (which are virtual directories right now), but may also
be useful for an automatic update mechanism.
2009-02-28 14:02:00 +01:00
Max Kellermann 3d6e6416e5 update: moved code to update_archive_file()
Simplify the rather large function update_regular_file().
2009-02-28 14:01:33 +01:00
Max Kellermann 7473fa0f4e directory: moved DIRECTORY_* string constants
Moved some of them to to directory_save.c, and others to database.c.
2009-02-27 19:30:16 +01:00
Max Kellermann eae0287466 song_print: hide HTTP password in playlist
Added the uri_remove_auth() library function which strips username
and password from a HTTP URI, and use it in song_print_url().  This
allows you to add HTTP URIs to the playlist including secret username
and password, without disclosing it to all MPD clients.
2009-02-27 19:20:11 +01:00
Max Kellermann 9dd00dfab7 client: removed duplicate "client" string from log
Since we introduced a GLib logging domain, the "client" string appears
twice in the log lines:

 client: client 0: command returned 0

Removed the second one, now it looks like this:

 client: [0] command returned 0

Still not quite good, but better than before.
2009-02-27 19:03:13 +01:00
Max Kellermann 53271e8ae7 update: print error when opendir() fails
MPD used to be silent when it could stat() a directory, but could not
opendir() it to read its contents.  This caused a lot of support
headache with users who have wrong file permissions.  Add another
warning message.
2009-02-27 09:05:58 +01:00
Max Kellermann 497c0b1c18 tag: don't accept invalid UTF-8 sequences
Overwrite invalid UTF-8 sequences with question marks.
2009-02-27 09:02:32 +01:00
Max Kellermann c1ab2d06aa tag: make tag.num_items unsigned
There's no point in declaring num_items as a uint8_t, it doesn't save
any space, due to padding.  This allows us to lift the articial "255
items" limitation.
2009-02-27 09:02:13 +01:00
Max Kellermann 75c2029b1c tag: no CamelCase
Renamed numOfItems to num_items.
2009-02-27 09:01:55 +01:00
Max Kellermann 5b07cbf0b4 tag: make tag_equal() return bool 2009-02-27 08:06:59 +01:00