Rearrange mpd.conf.5 and conf.[ch] to use the more logical ordering of config parameters that the new (yet to be committed) mpdconf.example will use.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4715 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
6018a1b4f8
commit
806acdd4f4
116
doc/mpd.conf.5
116
doc/mpd.conf.5
|
@ -54,6 +54,39 @@ mpd will be saved to this file when mpd is terminated by a TERM signal or by
|
||||||
the "kill" command. When mpd is restarted, it will read the state file and
|
the "kill" command. When mpd is restarted, it will read the state file and
|
||||||
restore the state of mpd (including the playlist).
|
restore the state of mpd (including the playlist).
|
||||||
.TP
|
.TP
|
||||||
|
.B user <username>
|
||||||
|
This specifies the user that mpd will run as, if set.
|
||||||
|
.TP
|
||||||
|
.B bind_to_address <ip address or hostname or any>
|
||||||
|
This specifies which address mpd binds to and listens on. Multiple
|
||||||
|
bind_to_address parameters may be specified. The default is "any", which binds
|
||||||
|
to all available addresses.
|
||||||
|
.TP
|
||||||
|
.B port <port>
|
||||||
|
This specifies the port that mpd listens on. The default is 6600.
|
||||||
|
.TP
|
||||||
|
.B log_level <default, secure, or verbose>
|
||||||
|
This specifies how verbose logs are. "default" is minimal logging, "secure"
|
||||||
|
reports from what address a connection is opened, and when it is closed, and
|
||||||
|
"verbose" records excessive amounts of information for debugging purposes. The
|
||||||
|
default is "default".
|
||||||
|
.TP
|
||||||
|
.B password <password@permissions>
|
||||||
|
This specifies a password for access to mpd. The format is
|
||||||
|
"password@permissions" where permissions is a comma delimited list composed
|
||||||
|
of "read", "add", "control", and/or "admin". "read" allows for reading of the
|
||||||
|
database, displaying the current playlist, and current status of mpd. "add"
|
||||||
|
allows for adding songs and loading playlists. "control" allows for all other
|
||||||
|
player and playlist manipulations. "admin" allows the db to be updated and for
|
||||||
|
the client to kill mpd. An example value is "somePassword@read,add". Multiple
|
||||||
|
password parameters may be specified.
|
||||||
|
.TP
|
||||||
|
.B default_permissions <permissions>
|
||||||
|
This specifies the permissions of a client that has not been authenticated
|
||||||
|
using a password. The format of permissions is specified in the description of
|
||||||
|
the "password" config parameter. If no passwords are specified, the default is
|
||||||
|
"read,add,control,admin", otherwise it is "" (no permissions).
|
||||||
|
.TP
|
||||||
.B audio_output
|
.B audio_output
|
||||||
See \fBDESCRIPTION\fP and the various \fBAUDIO OUTPUT PARAMETERS\fP sections
|
See \fBDESCRIPTION\fP and the various \fBAUDIO OUTPUT PARAMETERS\fP sections
|
||||||
for the format of this parameter. Multiple audio_output parameters may be
|
for the format of this parameter. Multiple audio_output parameters may be
|
||||||
|
@ -79,17 +112,6 @@ This specifies which mixer control to use (sometimes referred to as the
|
||||||
"device"). Examples of mixer controls are PCM, Line1, Master, etc. An example
|
"device"). Examples of mixer controls are PCM, Line1, Master, etc. An example
|
||||||
for OSS is "Pcm", and an example for alsa is "PCM".
|
for OSS is "Pcm", and an example for alsa is "PCM".
|
||||||
.TP
|
.TP
|
||||||
.B filesystem_charset <charset>
|
|
||||||
This specifies the character set used for the filesystem. A list of supported
|
|
||||||
character sets can be obtained by running "iconv -l". The default is
|
|
||||||
determined from the locale when the db was originally created.
|
|
||||||
.TP
|
|
||||||
.B id3v1_encoding <charset>
|
|
||||||
This specifies the character set which ID3v1 tags are encoded in. A list of
|
|
||||||
supported character sets can be obtained by running "iconv -l". The default is
|
|
||||||
to let libid3tag convert them (from ISO-8859-1, as the standard specifies) and
|
|
||||||
do no additional conversion.
|
|
||||||
.TP
|
|
||||||
.B replaygain <album or track>
|
.B replaygain <album or track>
|
||||||
If specified, mpd will adjust the volume of songs played using replaygain tags
|
If specified, mpd will adjust the volume of songs played using replaygain tags
|
||||||
(see <\fBhttp://www.replaygain.org/\fP>). Setting this to "album" will adjust
|
(see <\fBhttp://www.replaygain.org/\fP>). Setting this to "album" will adjust
|
||||||
|
@ -131,32 +153,35 @@ If the HTTP proxy server requires authentication, this specifies the username.
|
||||||
.B http_proxy_password <password>
|
.B http_proxy_password <password>
|
||||||
If the HTTP proxy server requires authentication, this specifies the password.
|
If the HTTP proxy server requires authentication, this specifies the password.
|
||||||
.TP
|
.TP
|
||||||
.B user <username>
|
.B connection_timeout <seconds>
|
||||||
This specifies the user that mpd will run as, if set.
|
If a client does not send any new data in this time period, the connection is
|
||||||
|
closed. The default is 60.
|
||||||
.TP
|
.TP
|
||||||
.B bind_to_address <ip address or hostname or any>
|
.B max_connections <number>
|
||||||
This specifies which address mpd binds to and listens on. Multiple
|
This specifies the maximum number of clients that can be connected to mpd. The
|
||||||
bind_to_address parameters may be specified. The default is "any", which binds
|
default is 5.
|
||||||
to all available addresses.
|
|
||||||
.TP
|
.TP
|
||||||
.B port <port>
|
.B max_playlist_length <number>
|
||||||
This specifies the port that mpd listens on. The default is 6600.
|
This specifies the maximum number of songs that can be in the playlist. The
|
||||||
|
default is 4096.
|
||||||
.TP
|
.TP
|
||||||
.B password <password@permissions>
|
.B max_command_list_size <size in KiB>
|
||||||
This specifies a password for access to mpd. The format is
|
This specifies the maximum size a command list can be. The default is 2048.
|
||||||
"password@permissions" where permissions is a comma delimited list composed
|
|
||||||
of "read", "add", "control", and/or "admin". "read" allows for reading of the
|
|
||||||
database, displaying the current playlist, and current status of mpd. "add"
|
|
||||||
allows for adding songs and loading playlists. "control" allows for all other
|
|
||||||
player and playlist manipulations. "admin" allows the db to be updated and for
|
|
||||||
the client to kill mpd. An example value is "somePassword@read,add". Multiple
|
|
||||||
password parameters may be specified.
|
|
||||||
.TP
|
.TP
|
||||||
.B default_permissions <permissions>
|
.B max_output_buffer_size <size in KiB>
|
||||||
This specifies the permissions of a client that has not been authenticated
|
This specifies the maximum size of the output buffer to a client. The default
|
||||||
using a password. The format of permissions is specified in the description of
|
is 8192.
|
||||||
the "password" config parameter. If no passwords are specified, the default is
|
.TP
|
||||||
"read,add,control,admin", otherwise it is "" (no permissions).
|
.B filesystem_charset <charset>
|
||||||
|
This specifies the character set used for the filesystem. A list of supported
|
||||||
|
character sets can be obtained by running "iconv -l". The default is
|
||||||
|
determined from the locale when the db was originally created.
|
||||||
|
.TP
|
||||||
|
.B id3v1_encoding <charset>
|
||||||
|
This specifies the character set which ID3v1 tags are encoded in. A list of
|
||||||
|
supported character sets can be obtained by running "iconv -l". The default is
|
||||||
|
to let libid3tag convert them (from ISO-8859-1, as the standard specifies) and
|
||||||
|
do no additional conversion.
|
||||||
.TP
|
.TP
|
||||||
.B metadata_to_use <tags>
|
.B metadata_to_use <tags>
|
||||||
This specifies the song metadata that will be scanned and made available to
|
This specifies the song metadata that will be scanned and made available to
|
||||||
|
@ -168,31 +193,6 @@ tags may be specified as a comma separated list. An example value is
|
||||||
disable all metadata. The default is to use all known tag types except for
|
disable all metadata. The default is to use all known tag types except for
|
||||||
comments.
|
comments.
|
||||||
.TP
|
.TP
|
||||||
.B max_playlist_length <number>
|
|
||||||
This specifies the maximum number of songs that can be in the playlist. The
|
|
||||||
default is 4096.
|
|
||||||
.TP
|
|
||||||
.B log_level <default, secure, or verbose>
|
|
||||||
This specifies how verbose logs are. "default" is minimal logging, "secure"
|
|
||||||
reports from what address a connection is opened, and when it is closed, and
|
|
||||||
"verbose" records excessive amounts of information for debugging purposes. The
|
|
||||||
default is "default".
|
|
||||||
.TP
|
|
||||||
.B connection_timeout <seconds>
|
|
||||||
If a client does not send any new data in this time period, the connection is
|
|
||||||
closed. The default is 60.
|
|
||||||
.TP
|
|
||||||
.B max_connections <number>
|
|
||||||
This specifies the maximum number of clients that can be connected to mpd. The
|
|
||||||
default is 5.
|
|
||||||
.TP
|
|
||||||
.B max_command_list_size <size in KiB>
|
|
||||||
This specifies the maximum size a command list can be. The default is 2048.
|
|
||||||
.TP
|
|
||||||
.B max_output_buffer_size <size in KiB>
|
|
||||||
This specifies the maximum size of the output buffer to a client. The default
|
|
||||||
is 8192.
|
|
||||||
.TP
|
|
||||||
.B save_absolute_paths_in_playlists <yes or no>
|
.B save_absolute_paths_in_playlists <yes or no>
|
||||||
This specifies whether relative or absolute paths for song filenames are used
|
This specifies whether relative or absolute paths for song filenames are used
|
||||||
when saving playlists. The default is "no".
|
when saving playlists. The default is "no".
|
||||||
|
|
46
src/conf.c
46
src/conf.c
|
@ -135,44 +135,44 @@ void initConf(void)
|
||||||
configEntriesList = makeList((ListFreeDataFunc *) freeConfigEntry, 1);
|
configEntriesList = makeList((ListFreeDataFunc *) freeConfigEntry, 1);
|
||||||
|
|
||||||
/* registerConfigParam(name, repeatable, block); */
|
/* registerConfigParam(name, repeatable, block); */
|
||||||
registerConfigParam(CONF_PORT, 0, 0);
|
|
||||||
registerConfigParam(CONF_PID_FILE, 0, 0);
|
|
||||||
registerConfigParam(CONF_MUSIC_DIR, 0, 0);
|
registerConfigParam(CONF_MUSIC_DIR, 0, 0);
|
||||||
registerConfigParam(CONF_PLAYLIST_DIR, 0, 0);
|
registerConfigParam(CONF_PLAYLIST_DIR, 0, 0);
|
||||||
|
registerConfigParam(CONF_DB_FILE, 0, 0);
|
||||||
registerConfigParam(CONF_LOG_FILE, 0, 0);
|
registerConfigParam(CONF_LOG_FILE, 0, 0);
|
||||||
registerConfigParam(CONF_ERROR_FILE, 0, 0);
|
registerConfigParam(CONF_ERROR_FILE, 0, 0);
|
||||||
registerConfigParam(CONF_CONN_TIMEOUT, 0, 0);
|
registerConfigParam(CONF_PID_FILE, 0, 0);
|
||||||
registerConfigParam(CONF_MIXER_DEVICE, 0, 0);
|
|
||||||
registerConfigParam(CONF_MAX_CONN, 0, 0);
|
|
||||||
registerConfigParam(CONF_MAX_PLAYLIST_LENGTH, 0, 0);
|
|
||||||
registerConfigParam(CONF_BUFFER_BEFORE_PLAY, 0, 0);
|
|
||||||
registerConfigParam(CONF_MAX_COMMAND_LIST_SIZE, 0, 0);
|
|
||||||
registerConfigParam(CONF_MAX_OUTPUT_BUFFER_SIZE, 0, 0);
|
|
||||||
registerConfigParam(CONF_AUDIO_OUTPUT, 1, 1);
|
|
||||||
registerConfigParam(CONF_SAVE_ABSOLUTE_PATHS, 0, 0);
|
|
||||||
registerConfigParam(CONF_BIND_TO_ADDRESS, 1, 0);
|
|
||||||
registerConfigParam(CONF_MIXER_TYPE, 0, 0);
|
|
||||||
registerConfigParam(CONF_STATE_FILE, 0, 0);
|
registerConfigParam(CONF_STATE_FILE, 0, 0);
|
||||||
registerConfigParam(CONF_USER, 0, 0);
|
registerConfigParam(CONF_USER, 0, 0);
|
||||||
registerConfigParam(CONF_DB_FILE, 0, 0);
|
registerConfigParam(CONF_BIND_TO_ADDRESS, 1, 0);
|
||||||
|
registerConfigParam(CONF_PORT, 0, 0);
|
||||||
registerConfigParam(CONF_LOG_LEVEL, 0, 0);
|
registerConfigParam(CONF_LOG_LEVEL, 0, 0);
|
||||||
registerConfigParam(CONF_MIXER_CONTROL, 0, 0);
|
|
||||||
registerConfigParam(CONF_FS_CHARSET, 0, 0);
|
|
||||||
registerConfigParam(CONF_PASSWORD, 1, 0);
|
registerConfigParam(CONF_PASSWORD, 1, 0);
|
||||||
registerConfigParam(CONF_DEFAULT_PERMS, 0, 0);
|
registerConfigParam(CONF_DEFAULT_PERMS, 0, 0);
|
||||||
registerConfigParam(CONF_AUDIO_BUFFER_SIZE, 0, 0);
|
registerConfigParam(CONF_AUDIO_OUTPUT, 1, 1);
|
||||||
registerConfigParam(CONF_REPLAYGAIN, 0, 0);
|
|
||||||
registerConfigParam(CONF_AUDIO_OUTPUT_FORMAT, 0, 0);
|
registerConfigParam(CONF_AUDIO_OUTPUT_FORMAT, 0, 0);
|
||||||
|
registerConfigParam(CONF_MIXER_TYPE, 0, 0);
|
||||||
|
registerConfigParam(CONF_MIXER_DEVICE, 0, 0);
|
||||||
|
registerConfigParam(CONF_MIXER_CONTROL, 0, 0);
|
||||||
|
registerConfigParam(CONF_REPLAYGAIN, 0, 0);
|
||||||
|
registerConfigParam(CONF_REPLAYGAIN_PREAMP, 0, 0);
|
||||||
|
registerConfigParam(CONF_VOLUME_NORMALIZATION, 0, 0);
|
||||||
|
registerConfigParam(CONF_AUDIO_BUFFER_SIZE, 0, 0);
|
||||||
|
registerConfigParam(CONF_BUFFER_BEFORE_PLAY, 0, 0);
|
||||||
|
registerConfigParam(CONF_HTTP_BUFFER_SIZE, 0, 0);
|
||||||
|
registerConfigParam(CONF_HTTP_PREBUFFER_SIZE, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_PROXY_HOST, 0, 0);
|
registerConfigParam(CONF_HTTP_PROXY_HOST, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_PROXY_PORT, 0, 0);
|
registerConfigParam(CONF_HTTP_PROXY_PORT, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_PROXY_USER, 0, 0);
|
registerConfigParam(CONF_HTTP_PROXY_USER, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_PROXY_PASSWORD, 0, 0);
|
registerConfigParam(CONF_HTTP_PROXY_PASSWORD, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_BUFFER_SIZE, 0, 0);
|
registerConfigParam(CONF_CONN_TIMEOUT, 0, 0);
|
||||||
registerConfigParam(CONF_HTTP_PREBUFFER_SIZE, 0, 0);
|
registerConfigParam(CONF_MAX_CONN, 0, 0);
|
||||||
registerConfigParam(CONF_REPLAYGAIN_PREAMP, 0, 0);
|
registerConfigParam(CONF_MAX_PLAYLIST_LENGTH, 0, 0);
|
||||||
registerConfigParam(CONF_METADATA_TO_USE, 0, 0);
|
registerConfigParam(CONF_MAX_COMMAND_LIST_SIZE, 0, 0);
|
||||||
|
registerConfigParam(CONF_MAX_OUTPUT_BUFFER_SIZE, 0, 0);
|
||||||
|
registerConfigParam(CONF_FS_CHARSET, 0, 0);
|
||||||
registerConfigParam(CONF_ID3V1_ENCODING, 0, 0);
|
registerConfigParam(CONF_ID3V1_ENCODING, 0, 0);
|
||||||
registerConfigParam(CONF_VOLUME_NORMALIZATION, 0, 0);
|
registerConfigParam(CONF_METADATA_TO_USE, 0, 0);
|
||||||
|
registerConfigParam(CONF_SAVE_ABSOLUTE_PATHS, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addBlockParam(ConfigParam * param, char *name, char *value,
|
static void addBlockParam(ConfigParam * param, char *name, char *value,
|
||||||
|
|
42
src/conf.h
42
src/conf.h
|
@ -21,44 +21,44 @@
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
|
|
||||||
#define CONF_PORT "port"
|
|
||||||
#define CONF_PID_FILE "pid_file"
|
|
||||||
#define CONF_MUSIC_DIR "music_directory"
|
#define CONF_MUSIC_DIR "music_directory"
|
||||||
#define CONF_PLAYLIST_DIR "playlist_directory"
|
#define CONF_PLAYLIST_DIR "playlist_directory"
|
||||||
|
#define CONF_DB_FILE "db_file"
|
||||||
#define CONF_LOG_FILE "log_file"
|
#define CONF_LOG_FILE "log_file"
|
||||||
#define CONF_ERROR_FILE "error_file"
|
#define CONF_ERROR_FILE "error_file"
|
||||||
#define CONF_CONN_TIMEOUT "connection_timeout"
|
#define CONF_PID_FILE "pid_file"
|
||||||
#define CONF_MIXER_DEVICE "mixer_device"
|
|
||||||
#define CONF_MAX_CONN "max_connections"
|
|
||||||
#define CONF_MAX_PLAYLIST_LENGTH "max_playlist_length"
|
|
||||||
#define CONF_BUFFER_BEFORE_PLAY "buffer_before_play"
|
|
||||||
#define CONF_MAX_COMMAND_LIST_SIZE "max_command_list_size"
|
|
||||||
#define CONF_MAX_OUTPUT_BUFFER_SIZE "max_output_buffer_size"
|
|
||||||
#define CONF_AUDIO_OUTPUT "audio_output"
|
|
||||||
#define CONF_SAVE_ABSOLUTE_PATHS "save_absolute_paths_in_playlists"
|
|
||||||
#define CONF_BIND_TO_ADDRESS "bind_to_address"
|
|
||||||
#define CONF_MIXER_TYPE "mixer_type"
|
|
||||||
#define CONF_STATE_FILE "state_file"
|
#define CONF_STATE_FILE "state_file"
|
||||||
#define CONF_USER "user"
|
#define CONF_USER "user"
|
||||||
#define CONF_DB_FILE "db_file"
|
#define CONF_BIND_TO_ADDRESS "bind_to_address"
|
||||||
|
#define CONF_PORT "port"
|
||||||
#define CONF_LOG_LEVEL "log_level"
|
#define CONF_LOG_LEVEL "log_level"
|
||||||
#define CONF_MIXER_CONTROL "mixer_control"
|
|
||||||
#define CONF_FS_CHARSET "filesystem_charset"
|
|
||||||
#define CONF_PASSWORD "password"
|
#define CONF_PASSWORD "password"
|
||||||
#define CONF_DEFAULT_PERMS "default_permissions"
|
#define CONF_DEFAULT_PERMS "default_permissions"
|
||||||
#define CONF_AUDIO_BUFFER_SIZE "audio_buffer_size"
|
#define CONF_AUDIO_OUTPUT "audio_output"
|
||||||
#define CONF_AUDIO_OUTPUT_FORMAT "audio_output_format"
|
#define CONF_AUDIO_OUTPUT_FORMAT "audio_output_format"
|
||||||
|
#define CONF_MIXER_TYPE "mixer_type"
|
||||||
|
#define CONF_MIXER_DEVICE "mixer_device"
|
||||||
|
#define CONF_MIXER_CONTROL "mixer_control"
|
||||||
#define CONF_REPLAYGAIN "replaygain"
|
#define CONF_REPLAYGAIN "replaygain"
|
||||||
#define CONF_REPLAYGAIN_PREAMP "replaygain_preamp"
|
#define CONF_REPLAYGAIN_PREAMP "replaygain_preamp"
|
||||||
|
#define CONF_VOLUME_NORMALIZATION "volume_normalization"
|
||||||
|
#define CONF_AUDIO_BUFFER_SIZE "audio_buffer_size"
|
||||||
|
#define CONF_BUFFER_BEFORE_PLAY "buffer_before_play"
|
||||||
|
#define CONF_HTTP_BUFFER_SIZE "http_buffer_size"
|
||||||
|
#define CONF_HTTP_PREBUFFER_SIZE "http_prebuffer_size"
|
||||||
#define CONF_HTTP_PROXY_HOST "http_proxy_host"
|
#define CONF_HTTP_PROXY_HOST "http_proxy_host"
|
||||||
#define CONF_HTTP_PROXY_PORT "http_proxy_port"
|
#define CONF_HTTP_PROXY_PORT "http_proxy_port"
|
||||||
#define CONF_HTTP_PROXY_USER "http_proxy_user"
|
#define CONF_HTTP_PROXY_USER "http_proxy_user"
|
||||||
#define CONF_HTTP_PROXY_PASSWORD "http_proxy_password"
|
#define CONF_HTTP_PROXY_PASSWORD "http_proxy_password"
|
||||||
#define CONF_HTTP_BUFFER_SIZE "http_buffer_size"
|
#define CONF_CONN_TIMEOUT "connection_timeout"
|
||||||
#define CONF_HTTP_PREBUFFER_SIZE "http_prebuffer_size"
|
#define CONF_MAX_CONN "max_connections"
|
||||||
#define CONF_METADATA_TO_USE "metadata_to_use"
|
#define CONF_MAX_PLAYLIST_LENGTH "max_playlist_length"
|
||||||
|
#define CONF_MAX_COMMAND_LIST_SIZE "max_command_list_size"
|
||||||
|
#define CONF_MAX_OUTPUT_BUFFER_SIZE "max_output_buffer_size"
|
||||||
|
#define CONF_FS_CHARSET "filesystem_charset"
|
||||||
#define CONF_ID3V1_ENCODING "id3v1_encoding"
|
#define CONF_ID3V1_ENCODING "id3v1_encoding"
|
||||||
#define CONF_VOLUME_NORMALIZATION "volume_normalization"
|
#define CONF_METADATA_TO_USE "metadata_to_use"
|
||||||
|
#define CONF_SAVE_ABSOLUTE_PATHS "save_absolute_paths_in_playlists"
|
||||||
|
|
||||||
typedef struct _BlockParam {
|
typedef struct _BlockParam {
|
||||||
char *name;
|
char *name;
|
||||||
|
|
Loading…
Reference in New Issue