aboutsummaryrefslogtreecommitdiffstats
path: root/src/aac_decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-31 02:56:14 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-31 02:56:14 +0000
commit9f0cbe9e496d950e796e3b07bca8db8841bb2798 (patch)
tree488d281135b4c9c404aa9d2e6ff7f9915b924fb3 /src/aac_decode.c
parent3aba9b2a668170babcafe4a4ee9b6ca684ed51e4 (diff)
downloadmpd-9f0cbe9e496d950e796e3b07bca8db8841bb2798.tar.gz
mpd-9f0cbe9e496d950e796e3b07bca8db8841bb2798.tar.xz
mpd-9f0cbe9e496d950e796e3b07bca8db8841bb2798.zip
aac_plugin
git-svn-id: https://svn.musicpd.org/mpd/trunk@1250 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/aac_plugin.c (renamed from src/aac_decode.c)54
1 files changed, 46 insertions, 8 deletions
diff --git a/src/aac_decode.c b/src/inputPlugins/aac_plugin.c
index 6dbaea1bc..0dd23f955 100644
--- a/src/aac_decode.c
+++ b/src/inputPlugins/aac_plugin.c
@@ -16,18 +16,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "aac_decode.h"
+#include "../inputPlugin.h"
#ifdef HAVE_FAAD
#define AAC_MAX_CHANNELS 6
-#include "command.h"
-#include "utils.h"
-#include "audio.h"
-#include "log.h"
-#include "inputStream.h"
-#include "outputBuffer.h"
+#include "../utils.h"
+#include "../audio.h"
+#include "../log.h"
+#include "../inputStream.h"
+#include "../outputBuffer.h"
#include <stdio.h>
#include <unistd.h>
@@ -396,5 +395,44 @@ int aac_decode(OutputBuffer * cb, DecoderControl * dc) {
return 0;
}
+MpdTag * aacTagDup(char * file) {
+ MpdTag * ret = NULL;
+ int time;
+
+ time = getAacTotalTime(file);
+
+ if(time>=0) {
+ if((ret = id3Dup(file))==NULL) ret = newMpdTag();
+ ret->time = time;
+ }
+
+ return ret;
+}
+
+char * aacSuffixes[] = {"aac", NULL};
+
+InputPlugin aacPlugin =
+{
+ "aac",
+ NULL,
+ aac_decode,
+ aacTagDup,
+ INPUT_PLUGIN_STREAM_FILE,
+ aacSuffixes,
+ NULL
+};
+
+#else
+
+InputPlugin aacPlugin =
+{
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ 0,
+ NULL,
+ NULL,
+};
+
#endif /* HAVE_FAAD */
-/* vim:set shiftwidth=4 tabstop=8 expandtab: */