diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2006-08-28 20:47:50 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2006-08-28 20:47:50 +0000 |
commit | 806acdd4f41e93bf1e3e67e99e11c55cce6188c3 (patch) | |
tree | 163551ba2ee2a5505524d7d1110abae59d703fa2 | |
parent | 6018a1b4f87702bd15dd668fd3247d3c2e6ae027 (diff) | |
download | mpd-806acdd4f41e93bf1e3e67e99e11c55cce6188c3.tar.gz mpd-806acdd4f41e93bf1e3e67e99e11c55cce6188c3.tar.xz mpd-806acdd4f41e93bf1e3e67e99e11c55cce6188c3.zip |
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
Diffstat (limited to '')
-rw-r--r-- | doc/mpd.conf.5 | 116 | ||||
-rw-r--r-- | src/conf.c | 46 | ||||
-rw-r--r-- | src/conf.h | 42 |
3 files changed, 102 insertions, 102 deletions
diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index 81ae75ffc..c5a65d957 100644 --- a/doc/mpd.conf.5 +++ b/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 restore the state of mpd (including the playlist). .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 See \fBDESCRIPTION\fP and the various \fBAUDIO OUTPUT PARAMETERS\fP sections 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 for OSS is "Pcm", and an example for alsa is "PCM". .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> 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 @@ -131,53 +153,6 @@ If the HTTP proxy server requires authentication, this specifies the username. .B http_proxy_password <password> If the HTTP proxy server requires authentication, this specifies the password. .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 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 metadata_to_use <tags> -This specifies the song metadata that will be scanned and made available to -clients. Note that you must recreate (not update) your database for changes to -this parameter to take effect. Possible values are artist, album, title, -track, name, genre, date, composer, performer, comment, and disc. Multiple -tags may be specified as a comma separated list. An example value is -"artist,album,title,track". The special value "none" may be used alone to -disable all metadata. The default is to use all known tag types except for -comments. -.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. @@ -186,6 +161,10 @@ closed. The default is 60. This specifies the maximum number of clients that can be connected to mpd. The default is 5. .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 max_command_list_size <size in KiB> This specifies the maximum size a command list can be. The default is 2048. .TP @@ -193,6 +172,27 @@ This specifies the maximum size a command list can be. The default is 2048. This specifies the maximum size of the output buffer to a client. The default is 8192. .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 metadata_to_use <tags> +This specifies the song metadata that will be scanned and made available to +clients. Note that you must recreate (not update) your database for changes to +this parameter to take effect. Possible values are artist, album, title, +track, name, genre, date, composer, performer, comment, and disc. Multiple +tags may be specified as a comma separated list. An example value is +"artist,album,title,track". The special value "none" may be used alone to +disable all metadata. The default is to use all known tag types except for +comments. +.TP .B save_absolute_paths_in_playlists <yes or no> This specifies whether relative or absolute paths for song filenames are used when saving playlists. The default is "no". diff --git a/src/conf.c b/src/conf.c index b5bbd8e92..0b3e0df5f 100644 --- a/src/conf.c +++ b/src/conf.c @@ -135,44 +135,44 @@ void initConf(void) configEntriesList = makeList((ListFreeDataFunc *) freeConfigEntry, 1); /* registerConfigParam(name, repeatable, block); */ - registerConfigParam(CONF_PORT, 0, 0); - registerConfigParam(CONF_PID_FILE, 0, 0); registerConfigParam(CONF_MUSIC_DIR, 0, 0); registerConfigParam(CONF_PLAYLIST_DIR, 0, 0); + registerConfigParam(CONF_DB_FILE, 0, 0); registerConfigParam(CONF_LOG_FILE, 0, 0); registerConfigParam(CONF_ERROR_FILE, 0, 0); - registerConfigParam(CONF_CONN_TIMEOUT, 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_PID_FILE, 0, 0); registerConfigParam(CONF_STATE_FILE, 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_MIXER_CONTROL, 0, 0); - registerConfigParam(CONF_FS_CHARSET, 0, 0); registerConfigParam(CONF_PASSWORD, 1, 0); registerConfigParam(CONF_DEFAULT_PERMS, 0, 0); - registerConfigParam(CONF_AUDIO_BUFFER_SIZE, 0, 0); - registerConfigParam(CONF_REPLAYGAIN, 0, 0); + registerConfigParam(CONF_AUDIO_OUTPUT, 1, 1); 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_PORT, 0, 0); registerConfigParam(CONF_HTTP_PROXY_USER, 0, 0); registerConfigParam(CONF_HTTP_PROXY_PASSWORD, 0, 0); - registerConfigParam(CONF_HTTP_BUFFER_SIZE, 0, 0); - registerConfigParam(CONF_HTTP_PREBUFFER_SIZE, 0, 0); - registerConfigParam(CONF_REPLAYGAIN_PREAMP, 0, 0); - registerConfigParam(CONF_METADATA_TO_USE, 0, 0); + registerConfigParam(CONF_CONN_TIMEOUT, 0, 0); + registerConfigParam(CONF_MAX_CONN, 0, 0); + registerConfigParam(CONF_MAX_PLAYLIST_LENGTH, 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_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, diff --git a/src/conf.h b/src/conf.h index bebc62798..166b1d4b6 100644 --- a/src/conf.h +++ b/src/conf.h @@ -21,44 +21,44 @@ #include "../config.h" -#define CONF_PORT "port" -#define CONF_PID_FILE "pid_file" #define CONF_MUSIC_DIR "music_directory" #define CONF_PLAYLIST_DIR "playlist_directory" +#define CONF_DB_FILE "db_file" #define CONF_LOG_FILE "log_file" #define CONF_ERROR_FILE "error_file" -#define CONF_CONN_TIMEOUT "connection_timeout" -#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_PID_FILE "pid_file" #define CONF_STATE_FILE "state_file" #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_MIXER_CONTROL "mixer_control" -#define CONF_FS_CHARSET "filesystem_charset" #define CONF_PASSWORD "password" #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_MIXER_TYPE "mixer_type" +#define CONF_MIXER_DEVICE "mixer_device" +#define CONF_MIXER_CONTROL "mixer_control" #define CONF_REPLAYGAIN "replaygain" #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_PORT "http_proxy_port" #define CONF_HTTP_PROXY_USER "http_proxy_user" #define CONF_HTTP_PROXY_PASSWORD "http_proxy_password" -#define CONF_HTTP_BUFFER_SIZE "http_buffer_size" -#define CONF_HTTP_PREBUFFER_SIZE "http_prebuffer_size" -#define CONF_METADATA_TO_USE "metadata_to_use" +#define CONF_CONN_TIMEOUT "connection_timeout" +#define CONF_MAX_CONN "max_connections" +#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_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 { char *name; |