else
AC_MSG_WARN([no support for id3v2 tags])
fi
+########################################################################### flac
+OLD_CPPFLAGS="$CPPFLAGS"
+OLD_LD_FLAGS="$LDFLAGS"
+OLD_LIBS="$LIBS"
+
+have_flac="yes"
+AC_ARG_WITH(flac_headers, [AC_HELP_STRING(--with-flac-headers=dir,
+ [look for flac headers also in dir])])
+if test -n "$with_flac_headers"; then
+ flac_cppflags="-I$with_flac_headers"
+ CPPFLAGS="$CPPFLAGS $flac_cppflags"
+fi
+AC_ARG_WITH(flac_libs, [AC_HELP_STRING(--with-flac-libs=dir,
+ [look for flac libs also in dir])])
+if test -n "$with_flac_libs"; then
+ flac_libs="-L$with_flac_libs"
+ LDFLAGS="$LDFLAGS $flac_libs"
+fi
+AC_CHECK_HEADER(FLAC/stream_decoder.h, [], have_flac=no)
+AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_init_file], [], have_flac=no)
+if test "$have_flac" = "yes"; then
+ AC_DEFINE(HAVE_FLAC, 1, define to 1 if you want to build the flacdec filter)
+ all_errlist_objs="$all_errlist_objs flacdec_filter flac_afh"
+ filter_errlist_objs="$filter_errlist_objs flacdec_filter"
+ audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
+ afh_errlist_objs="$afh_errlist_objs flac_afh"
+ server_errlist_objs="$server_errlist_objs flac_afh"
+ filter_ldflags="$filter_ldflags $flac_libs -lFLAC"
+ audiod_ldflags="$audiod_ldflags $flac_libs -lFLAC"
+ server_ldflags="$server_ldflags $flac_libs -lFLAC"
+ afh_ldflags="$afh_ldflags $flac_libs -lFLAC"
+ filters="$filters flacdec"
+ server_audio_formats="$server_audio_formats flac"
+ audiod_audio_formats="$audiod_audio_formats flac"
+ AC_SUBST(flac_cppflags)
+else
+ AC_MSG_WARN([no flac support in para_audiod/para_filter])
+fi
+CPPFLAGS="$OLD_CPPFLAGS"
+LDFLAGS="$OLD_LDFLAGS"
+LIBS="$OLD_LIBS"
########################################################################### oss
OLD_CPPFLAGS="$CPPFLAGS"
OLD_LD_FLAGS="$LDFLAGS"
--- /dev/null
+/*
+ * Copyright (C) 2011 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file flac_afh.c Audio format handler for flac files. */
+
+#include <regex.h>
+
+#include "para.h"
+#include "error.h"
+#include "afh.h"
+
+static int flac_get_file_info(char *map, size_t numbytes, __a_unused int fd,
+ struct afh_info *afhi)
+{
+ return 0;
+}
+
+static const char* flac_suffixes[] = {"flac", NULL};
+
+/**
+ * The init function of the flac audio format handler.
+ *
+ * \param afh pointer to the struct to initialize
+ */
+void flac_afh_init(struct audio_format_handler *afh)
+{
+ afh->get_file_info = flac_get_file_info,
+ afh->suffixes = flac_suffixes;
+}
--- /dev/null
+/*
+ * Copyright (C) 2011 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file flacdec_filter.c The flac decoder. */
+
+#include <regex.h>
+#include <stdbool.h>
+
+#include "para.h"
+#include "list.h"
+#include "sched.h"
+#include "ggo.h"
+#include "buffer_tree.h"
+#include "filter.h"
+#include "error.h"
+#include "string.h"
+static int flacdec_execute(struct btr_node *btrn, const char *cmd,
+ char **result)
+{
+ return 0;
+}
+
+static void flacdec_post_select(__a_unused struct sched *s, struct task *t)
+{
+
+}
+
+static void flacdec_close(struct filter_node *fn)
+{
+
+}
+
+static void flacdec_open(struct filter_node *fn)
+{
+
+}
+/**
+ * The init function of the flacdec filter.
+ *
+ * \param f Pointer to the filter struct to initialize.
+ *
+ * \sa filter::init.
+ */
+void flacdec_filter_init(struct filter *f)
+{
+ f->open = flacdec_open;
+ f->close = flacdec_close;
+ f->pre_select = generic_filter_pre_select;
+ f->post_select = flacdec_post_select;
+ f->execute = flacdec_execute;
+}