aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/audio.h2
-rw-r--r--src/audiofile_decode.c4
-rw-r--r--src/audiofile_decode.h2
-rw-r--r--src/buffer2array.h2
-rw-r--r--src/charConv.h2
-rw-r--r--src/command.h2
-rw-r--r--src/conf.h2
-rw-r--r--src/decode.h5
-rw-r--r--src/directory.h2
-rw-r--r--src/flac_decode.c3
-rw-r--r--src/flac_decode.h2
-rw-r--r--src/interface.h2
-rw-r--r--src/list.h2
-rw-r--r--src/listen.h2
-rw-r--r--src/log.h2
-rw-r--r--src/ls.c30
-rw-r--r--src/ls.h4
-rw-r--r--src/mp3_decode.c3
-rw-r--r--src/mp3_decode.h2
-rw-r--r--src/mpd_types.h2
-rw-r--r--src/myfprintf.h2
-rw-r--r--src/ogg_decode.c3
-rw-r--r--src/ogg_decode.h2
-rw-r--r--src/path.c12
-rw-r--r--src/path.h2
-rw-r--r--src/pcm_utils.h2
-rw-r--r--src/permission.h2
-rw-r--r--src/player.c1
-rw-r--r--src/player.h2
-rw-r--r--src/playerData.h2
-rw-r--r--src/playlist.h2
-rw-r--r--src/sig_handlers.h2
-rw-r--r--src/song.c6
-rw-r--r--src/song.h2
-rw-r--r--src/stats.h2
-rw-r--r--src/tables.h2
-rw-r--r--src/tag.c16
-rw-r--r--src/tag.h3
-rw-r--r--src/utils.h2
-rw-r--r--src/volume.h2
41 files changed, 79 insertions, 69 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 808d14cfb..a663cca7f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,3 +13,5 @@ mpd_SOURCES = main.c buffer2array.c interface.c command.c playlist.c ls.c \
mpd_CFLAGS = $(MPD_CFLAGS)
mpd_LDADD = $(MPD_LIBS) $(ID3_LIB) $(MAD_LIB) $(MP4FF_LIB)
+
+DIST_SUBDIRS = mp4ff
diff --git a/src/audio.h b/src/audio.h
index 07c842dc1..da9784d1b 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -19,6 +19,8 @@
#ifndef AUDIO_H
#define AUDIO_H
+#include "../config.h"
+
#include "mpd_types.h"
#include <stdio.h>
diff --git a/src/audiofile_decode.c b/src/audiofile_decode.c
index 7c44cdce8..9683ce177 100644
--- a/src/audiofile_decode.c
+++ b/src/audiofile_decode.c
@@ -18,10 +18,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_AUDIOFILE
-
#include "audiofile_decode.h"
+#ifdef HAVE_AUDIOFILE
+
#include "command.h"
#include "utils.h"
#include "audio.h"
diff --git a/src/audiofile_decode.h b/src/audiofile_decode.h
index d0bc8d9be..536c3ce02 100644
--- a/src/audiofile_decode.h
+++ b/src/audiofile_decode.h
@@ -21,6 +21,8 @@
#ifndef AUDIOFILE_DECODE_H
#define AUDIOFILE_DECODE_H
+#include "../config.h"
+
#ifdef HAVE_AUDIOFILE
#include "playerData.h"
diff --git a/src/buffer2array.h b/src/buffer2array.h
index 1aad24fc6..74ebffbbb 100644
--- a/src/buffer2array.h
+++ b/src/buffer2array.h
@@ -19,6 +19,8 @@
#ifndef BUFFER_2_ARRAY_H
#define BUFFER_2_ARRAY_H
+#include "../config.h"
+
int buffer2array(char * buffer, char *** array);
void freeArgArray(char ** array, int argArrayLength);
diff --git a/src/charConv.h b/src/charConv.h
index 61909b7f1..8c5dbdc49 100644
--- a/src/charConv.h
+++ b/src/charConv.h
@@ -19,6 +19,8 @@
#ifndef CHAR_CONV_H
#define CHAR_CONV_H
+#include "../config.h"
+
int setCharSetConversion(char * to, char * from);
char * convStrDup(char * string);
diff --git a/src/command.h b/src/command.h
index 36a4600a6..2692c6b58 100644
--- a/src/command.h
+++ b/src/command.h
@@ -19,6 +19,8 @@
#ifndef COMMAND_H
#define COMMAND_H
+#include "../config.h"
+
#include <stdio.h>
#define COMMAND_RETURN_KILL 10
diff --git a/src/conf.h b/src/conf.h
index 8afca42eb..ca9defaf1 100644
--- a/src/conf.h
+++ b/src/conf.h
@@ -19,6 +19,8 @@
#ifndef CONF_H
#define CONF_H
+#include "../config.h"
+
#define CONF_PORT 0
#define CONF_MUSIC_DIRECTORY 1
#define CONF_PLAYLIST_DIRECTORY 2
diff --git a/src/decode.h b/src/decode.h
index bb32de588..ea52dd858 100644
--- a/src/decode.h
+++ b/src/decode.h
@@ -19,6 +19,8 @@
#ifndef DECODE_H
#define DECODE_H
+#include "../config.h"
+
#include <stdio.h>
#include <sys/param.h>
@@ -26,8 +28,7 @@
#define DECODE_TYPE_OGG 1
#define DECODE_TYPE_FLAC 2
#define DECODE_TYPE_AUDIOFILE 3
-#define DECODE_TYPE_AAC 4
-#define DECODE_TYPE_MP4 5
+#define DECODE_TYPE_MP4 4
#define DECODE_STATE_STOP 0
#define DECODE_STATE_DECODE 1
diff --git a/src/directory.h b/src/directory.h
index d6813d365..f701fe81a 100644
--- a/src/directory.h
+++ b/src/directory.h
@@ -19,6 +19,8 @@
#ifndef DIRECTORY_H
#define DIRECTORY_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/flac_decode.c b/src/flac_decode.c
index de59001f1..5e51b4ea8 100644
--- a/src/flac_decode.c
+++ b/src/flac_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_FLAC
#include "flac_decode.h"
+#ifdef HAVE_FLAC
+
#include "utils.h"
#include "log.h"
#include "pcm_utils.h"
diff --git a/src/flac_decode.h b/src/flac_decode.h
index 66c90ff4a..773d5d0f0 100644
--- a/src/flac_decode.h
+++ b/src/flac_decode.h
@@ -19,6 +19,8 @@
#ifndef FLAC_DECODE_H
#define FLAC_DECODE_H
+#include "../config.h"
+
#include "playerData.h"
#include <stdio.h>
diff --git a/src/interface.h b/src/interface.h
index 84ab2869c..b2a8b1a26 100644
--- a/src/interface.h
+++ b/src/interface.h
@@ -19,6 +19,8 @@
#ifndef INTERFACE_H
#define INTERFACE_H
+#include "../config.h"
+
#include <stdio.h>
#include <time.h>
#include <sys/types.h>
diff --git a/src/list.h b/src/list.h
index 8a38ba4fe..4ae32160a 100644
--- a/src/list.h
+++ b/src/list.h
@@ -20,6 +20,8 @@
#ifndef LIST_H
#define LIST_H
+#include "../config.h"
+
#include <stdlib.h>
/* used to make a list where free() will be used to free data in list */
diff --git a/src/listen.h b/src/listen.h
index 7c9bed9bd..dd5e32d8c 100644
--- a/src/listen.h
+++ b/src/listen.h
@@ -19,6 +19,8 @@
#ifndef LISTEN_H
#define LISTEN_H
+#include "../config.h"
+
extern int listenSocket;
int establish(unsigned short port);
diff --git a/src/log.h b/src/log.h
index 9b4ceaeeb..59871f171 100644
--- a/src/log.h
+++ b/src/log.h
@@ -19,6 +19,8 @@
#ifndef LOG_H
#define LOG_H
+#include "../config.h"
+
#include "myfprintf.h"
#define LOG_LEVEL_LOW 0
diff --git a/src/ls.c b/src/ls.c
index f80c7209c..de4f2562d 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -126,7 +126,6 @@ int isMusic(char * utf8file, time_t * mtime) {
if((ret = isWave(utf8file,mtime))) return ret;
#endif
#ifdef HAVE_FAAD
- if((ret = isAac(utf8file,mtime))) return ret;
if((ret = isMp4(utf8file,mtime))) return ret;
#endif
@@ -281,35 +280,6 @@ int isMp4(char * utf8file, time_t * mtime) {
return 0;
}
-int isAac(char * utf8file, time_t * mtime) {
- struct stat st;
- char * file = utf8ToFsCharset(utf8file);
- char * actualFile = file;
-
- if(actualFile[0]!='/') actualFile = rmp2amp(file);
-
- if(stat(actualFile,&st)==0) {
- if(S_ISREG(st.st_mode)) {
- char * dup;
- char * cLast;
- char * cNext;
- int ret = 0;
- dup = strdup(file);
- cNext = cLast = strtok(dup,".");
- while((cNext = strtok(NULL,"."))) cLast = cNext;
- if(cLast && 0==strcasecmp(cLast,"aac")) {
- if(mtime) *mtime = st.st_mtime;
- ret = 1;
- }
- free(dup);
- return ret;
- }
- else return 0;
- }
-
- return 0;
-}
-
int isMp3(char * utf8file, time_t * mtime) {
struct stat st;
char * file = utf8ToFsCharset(utf8file);
diff --git a/src/ls.h b/src/ls.h
index 063dc7dbd..ab5c218ac 100644
--- a/src/ls.h
+++ b/src/ls.h
@@ -19,6 +19,8 @@
#ifndef LS_H
#define LS_H
+#include "../config.h"
+
#include <stdio.h>
#include <time.h>
@@ -26,8 +28,6 @@ int lsPlaylists(FILE * fp, char * utf8path);
int isMp3(char * utf8file, time_t * mtime);
-int isAac(char * utf8file, time_t * mtime);
-
int isMp4(char * utf8file, time_t * mtime);
int isOgg(char * utf8file, time_t * mtime);
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index d588165b4..ede0af6e3 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "mp3_decode.h"
+
#ifdef HAVE_MAD
-#include "mp3_decode.h"
#include "pcm_utils.h"
#ifdef USE_MPD_MAD
#include "libmad/mad.h"
diff --git a/src/mp3_decode.h b/src/mp3_decode.h
index 918b5a46c..82e8f103b 100644
--- a/src/mp3_decode.h
+++ b/src/mp3_decode.h
@@ -19,6 +19,8 @@
#ifndef MP3_DECODE_H
#define MP3_DECODE_H
+#include "../config.h"
+
#ifdef HAVE_MAD
#include "playerData.h"
diff --git a/src/mpd_types.h b/src/mpd_types.h
index 7e64daba1..7a81fef63 100644
--- a/src/mpd_types.h
+++ b/src/mpd_types.h
@@ -19,6 +19,8 @@
#ifndef MPD_TYPES_H
#define MPD_TYPES_H
+#include "../config.h"
+
typedef unsigned char mpd_uint8;
typedef signed char mpd_sint8;
diff --git a/src/myfprintf.h b/src/myfprintf.h
index 6014eb6f3..b169b895c 100644
--- a/src/myfprintf.h
+++ b/src/myfprintf.h
@@ -19,6 +19,8 @@
#ifndef MYFPRINTF_H
#define MYFPRINTF_H
+#include "../config.h"
+
#include <stdio.h>
void myfprintfStdLogMode(FILE * out, FILE * err);
diff --git a/src/ogg_decode.c b/src/ogg_decode.c
index bcc0f6ee5..1aaa4d6be 100644
--- a/src/ogg_decode.c
+++ b/src/ogg_decode.c
@@ -16,9 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifdef HAVE_OGG
#include "ogg_decode.h"
+#ifdef HAVE_OGG
+
#include "command.h"
#include "utils.h"
#include "audio.h"
diff --git a/src/ogg_decode.h b/src/ogg_decode.h
index 8e4bd0fe3..a2e3076a5 100644
--- a/src/ogg_decode.h
+++ b/src/ogg_decode.h
@@ -19,6 +19,8 @@
#ifndef OGG_DECODE_H
#define OGG_DECODE_H
+#include "../config.h"
+
#include "playerData.h"
#include <stdio.h>
diff --git a/src/path.c b/src/path.c
index a7f143dc7..d475d356b 100644
--- a/src/path.c
+++ b/src/path.c
@@ -24,8 +24,8 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
#include <locale.h>
#include <langinfo.h>
#endif
@@ -87,8 +87,8 @@ char * getFsCharset() {
}
void initPaths() {
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
char * originalLocale;
#endif
#endif
@@ -97,8 +97,8 @@ void initPaths() {
if(getConf()[CONF_FS_CHARSET]) {
charset = strdup(getConf()[CONF_FS_CHARSET]);
}
-#ifdef HAVE_LOCALE
-#ifdef HAVE_LANGINFO
+#ifdef HAVE_LC_MESSAGES
+#ifdef HAVE_LANGINFO_CODESET
else if((originalLocale = setlocale(LC_ALL,""))) {
char * temp;
diff --git a/src/path.h b/src/path.h
index 73cae2700..dc66a0733 100644
--- a/src/path.h
+++ b/src/path.h
@@ -19,6 +19,8 @@
#ifndef PATH_H
#define PATH_H
+#include "../config.h"
+
#include <sys/param.h>
extern char musicDir[MAXPATHLEN+1];
diff --git a/src/pcm_utils.h b/src/pcm_utils.h
index 649c51779..dcd5a31a9 100644
--- a/src/pcm_utils.h
+++ b/src/pcm_utils.h
@@ -19,6 +19,8 @@
#ifndef PCM_UTILS_H
#define PMC_UTILS_H
+#include "../config.h"
+
#include "audio.h"
#include <stdlib.h>
diff --git a/src/permission.h b/src/permission.h
index 6117ee468..d45f735eb 100644
--- a/src/permission.h
+++ b/src/permission.h
@@ -19,6 +19,8 @@
#ifndef PERMISSION_H
#define PERMISSION_H
+#include "../config.h"
+
#define PERMISSION_READ 1
#define PERMISSION_ADD 2
#define PERMISSION_CONTROL 4
diff --git a/src/player.c b/src/player.c
index 63c8fed7b..084edd1b5 100644
--- a/src/player.c
+++ b/src/player.c
@@ -178,7 +178,6 @@ int playerPlay(FILE * fp, char * utf8file) {
else if(isWave(utf8file,NULL)) pc->decodeType = DECODE_TYPE_AUDIOFILE;
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,NULL)) pc->decodeType = DECODE_TYPE_AAC;
else if(isMp4(utf8file,NULL)) pc->decodeType = DECODE_TYPE_MP4;
#endif
else {
diff --git a/src/player.h b/src/player.h
index 51f9e04ed..ca1cfa6a8 100644
--- a/src/player.h
+++ b/src/player.h
@@ -19,6 +19,8 @@
#ifndef PLAYER_H
#define PLAYER_H
+#include "../config.h"
+
#include "mpd_types.h"
#include <stdio.h>
diff --git a/src/playerData.h b/src/playerData.h
index 830829fed..7da51e7b3 100644
--- a/src/playerData.h
+++ b/src/playerData.h
@@ -19,6 +19,8 @@
#ifndef PLAYER_DATA_H
#define PLAYER_DATA_H
+#include "../config.h"
+
#include "audio.h"
#include "player.h"
#include "decode.h"
diff --git a/src/playlist.h b/src/playlist.h
index 00d0f9e3c..d5042c9b5 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -19,6 +19,8 @@
#ifndef PLAYLIST_H
#define PLAYLIST_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/sig_handlers.h b/src/sig_handlers.h
index 7128574b3..994f1eb33 100644
--- a/src/sig_handlers.h
+++ b/src/sig_handlers.h
@@ -19,6 +19,8 @@
#ifndef SIG_HANDLERS_H
#define SIG_HANDLERS_H
+#include "../config.h"
+
void initSigHandlers();
void finishSigHandlers();
diff --git a/src/song.c b/src/song.c
index 377487cbd..ac60692ad 100644
--- a/src/song.c
+++ b/src/song.c
@@ -79,9 +79,6 @@ Song * newSong(char * utf8file) {
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
- song->tag = aacTagDup(utf8file);
- }
else if(isMp4(utf8file,&(song->mtime))) {
song->tag = mp4TagDup(utf8file);
}
@@ -249,9 +246,6 @@ int updateSongInfo(Song * song) {
}
#endif
#ifdef HAVE_FAAD
- else if(isAac(utf8file,&(song->mtime))) {
- song->tag = aacTagDup(utf8file);
- }
else if(isMp4(utf8file,&(song->mtime))) {
song->tag = mp4TagDup(utf8file);
}
diff --git a/src/song.h b/src/song.h
index 768a6aa04..895e6cf4f 100644
--- a/src/song.h
+++ b/src/song.h
@@ -19,6 +19,8 @@
#ifndef SONG_H
#define SONG_H
+#include "../config.h"
+
#define SONG_BEGIN "songList begin"
#define SONG_END "songList end"
diff --git a/src/stats.h b/src/stats.h
index 383a8db65..dd009909d 100644
--- a/src/stats.h
+++ b/src/stats.h
@@ -19,6 +19,8 @@
#ifndef STATS_H
#define STATS_H
+#include "../config.h"
+
#include <stdio.h>
typedef struct _Stats {
diff --git a/src/tables.h b/src/tables.h
index aaf05a3e9..e797f638a 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -19,6 +19,8 @@
#ifndef TABLES_H
#define TABLES_H
+#include "../config.h"
+
#include "song.h"
#include <stdio.h>
diff --git a/src/tag.c b/src/tag.c
index c854e9b2f..1a0acb3ea 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -299,22 +299,6 @@ MpdTag * mp4TagDup(char * utf8file) {
return ret;
}
-
-MpdTag * aacTagDup(char * utf8file) {
- MpdTag * ret = NULL;
- int time;
-
-#warning getMp4TotalTime needs implementing
- //time = getAacTotalTime(rmp2amp(utf8ToFsCharset(utf8file)));
- time = 0;
-
- if(time>=0) {
- if(!ret) ret = newMpdTag();
- ret->time = time;
- }
-
- return ret;
-}
#endif
#ifdef HAVE_OGG
diff --git a/src/tag.h b/src/tag.h
index 36fa76aec..d6ca809df 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -19,6 +19,8 @@
#ifndef TAG_H
#define TAG_H
+#include "../config.h"
+
#include <stdio.h>
typedef struct _MpdTag {
@@ -39,7 +41,6 @@ MpdTag * mp3TagDup(char * utf8file);
#ifdef HAVE_FAAD
MpdTag * mp4TagDup(char * utf8file);
-MpdTag * aacTagDup(char * utf8file);
#endif
#ifdef HAVE_OGG
diff --git a/src/utils.h b/src/utils.h
index 6abef6d8a..025f469e5 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -19,6 +19,8 @@
#ifndef UTILS_H
#define UTILS_H
+#include "../config.h"
+
#include <stdio.h>
char * myFgets(char * buffer, int bufferSize, FILE * fp);
diff --git a/src/volume.h b/src/volume.h
index 6af44bf93..efd4e158c 100644
--- a/src/volume.h
+++ b/src/volume.h
@@ -19,6 +19,8 @@
#ifndef VOLUME_H
#define VOLUME_H
+#include "../config.h"
+
#include <stdio.h>
#define VOLUME_MIXER_OSS "oss"