--- /dev/null
+#include <regex.h>
+#include <sys/types.h>
+#include <stdbool.h>
+
+#include "para.h"
+#include "error.h"
+#include "list.h"
+#include "sched.h"
+#include "ggo.h"
+#include "buffer_tree.h"
+#include "recv.h"
+#include "afh_recv.cmdline.h"
+#include "string.h"
+#include "fd.h"
+
+/**
+ * The init function of the afh receiver.
+ *
+ * \param r Pointer to the receiver struct to initialize.
+ *
+ * This initializes all function pointers of \a r.
+ */
+void afh_recv_init(struct receiver *r)
+{
+ struct afh_recv_args_info dummy;
+
+ afh_recv_cmdline_parser_init(&dummy);
+#if 0
+ r->open = afh_recv_open;
+ r->close = afh_recv_close;
+ r->pre_select = afh_recv_pre_select;
+ r->post_select = afh_recv_post_select;
+ r->parse_config = afh_recv_parse_config;
+ r->free_config = afh_recv_free_config;
+#endif
+ r->help = (struct ggo_help) {
+ .short_help = afh_recv_args_info_help,
+ .detailed_help = afh_recv_args_info_detailed_help
+ };
+ afh_recv_cmdline_parser_free(&dummy);
+}
exec send_common ggo udp_recv color fec fecdec_filter
prebuffer_filter bitstream imdct
wma_afh wma_common wmadec_filter buffer_tree crypt_common
- gui gui_theme sideband"
-
+ gui gui_theme sideband afh_recv"
executables="recv filter audioc write client afh audiod"
-recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv)"
+recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
+
+recv_errlist_objs="
+ http_recv recv_common recv time string net dccp_recv fd
+ sched stdout ggo udp_recv buffer_tree afh_recv afh_common
+ wma_afh wma_common mp3_afh
+"
-recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
- fd sched stdout ggo udp_recv buffer_tree"
recv_ldflags=""
filter_cmdline_objs="add_cmdline(filter compress_filter amp_filter prebuffer_filter)"
filter_ldflags="$filter_ldflags $ogg_libs"
audiod_ldflags="$audiod_ldflags $ogg_libs"
afh_ldflags="$afh_ldflags $ogg_libs"
+ recv_ldflags="$recv_ldflags $ogg_libs"
all_errlist_objs="$all_errlist_objs ogg_afh_common"
afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
+ recv_errlist_objs="$recv_errlist_objs ogg_afh_common"
server_errlist_objs="$server_errlist_objs ogg_afh_common"
fi
if test "$have_vorbis" = "yes"; then
filter_ldflags="$filter_ldflags $vorbis_libs"
audiod_ldflags="$audiod_ldflags $vorbis_libs"
afh_ldflags="$afh_ldflags $vorbis_libs"
+ recv_ldflags="$recv_ldflags $vorbis_libs"
server_errlist_objs="$server_errlist_objs ogg_afh"
filter_errlist_objs="$filter_errlist_objs oggdec_filter"
audiod_errlist_objs="$audiod_errlist_objs oggdec_filter"
afh_errlist_objs="$afh_errlist_objs ogg_afh"
+ recv_errlist_objs="$recv_errlist_objs ogg_afh"
audiod_audio_formats="$audiod_audio_formats ogg"
server_audio_formats="$server_audio_formats ogg"
filter_ldflags="$filter_ldflags $speex_libs"
audiod_ldflags="$audiod_ldflags $speex_libs"
afh_ldflags="$afh_ldflags $speex_libs"
+ recv_ldflags="$recv_ldflags $speex_libs"
server_errlist_objs="$server_errlist_objs spx_afh spx_common"
filter_errlist_objs="$filter_errlist_objs spxdec_filter spx_common"
audiod_errlist_objs="$audiod_errlist_objs spxdec_filter spx_common"
afh_errlist_objs="$afh_errlist_objs spx_afh spx_common"
+ recv_errlist_objs="$recv_errlist_objs spx_afh spx_common"
audiod_audio_formats="$audiod_audio_formats spx"
server_audio_formats="$server_audio_formats spx"
afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
audiod_errlist_objs="$audiod_errlist_objs aacdec_filter aac_common"
server_errlist_objs="$server_errlist_objs aac_afh aac_common"
+ recv_errlist_objs="$recv_errlist_objs aac_afh aac_common"
+
server_ldflags="$server_ldflags $faad_libs -lfaad"
filter_ldflags="$filter_ldflags $faad_libs -lfaad"
audiod_ldflags="$audiod_ldflags $faad_libs -lfaad"
afh_ldflags="$afh_ldflags $faad_libs -lfaad"
+ recv_ldflags="$afh_ldflags $faad_libs -lfaad"
+
audiod_audio_formats="$audiod_audio_formats aac"
server_audio_formats="$server_audio_formats aac"
filters="$filters aacdec"
AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
server_ldflags="$server_ldflags $id3tag_libs -lid3tag -lz"
afh_ldflags="$afh_ldflags $id3tag_libs -lid3tag -lz"
+ recv_ldflags="$recv_ldflags $id3tag_libs -lid3tag"
AC_SUBST(id3tag_cppflags)
else
AC_MSG_WARN([no support for id3v2 tags])
audiod_errlist_objs="$audiod_errlist_objs flacdec_filter"
afh_errlist_objs="$afh_errlist_objs flac_afh"
server_errlist_objs="$server_errlist_objs flac_afh"
+ recv_errlist_objs="$recv_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"
+ recv_ldflags="$afh_ldflags $flac_libs -lFLAC"
filters="$filters flacdec"
server_audio_formats="$server_audio_formats flac"
audiod_audio_formats="$audiod_audio_formats flac"
--- /dev/null
+include(header.m4)
+<qu>
+text "
+ The afh (audio format handler) receiver can be used to write
+ selected parts of the given audio file without decoding
+ the data.
+
+ The selected parts of the content of the audio file are passed
+ to the child nodes of the buffer tree. Only complete chunks
+ with respect of the underlying audio format are passed.
+
+"
+
+option "filename" f
+#~~~~~~~~~~~~~~~~~~
+"file to open"
+string typestr = "filename"
+required
+
+option "begin-chunk" b
+#~~~~~~~~~~~~~~~~~~~~~
+"skip a number of chunks"
+int typestr = "chunk_num"
+default = "0"
+optional
+details = "
+ The chunk_num argument must be between -num_chunks and
+ num_chunks - 1 inclusively where num_chunks is the total number
+ of chunks which is printed when using the --info option. If
+ chunk_num is negative, the given number of chunks are counted
+ backwards from the end of the file. For example --begin_chunk
+ -100 instructs para_afh to start output at chunk num_chunks
+ - 100. This is mainly useful for cutting off the end of an
+ audio file.
+"
+
+option "end-chunk" e
+#~~~~~~~~~~~~~~~~~~~
+"only write up to chunk chunk_num"
+int typestr = "chunk_num"
+optional
+details = "
+ For the chunk_num argument the same rules as for --begin_chunk
+ apply. The default is to write up to the last chunk.
+"
+
+option "just-in-time" j
+#~~~~~~~~~~~~~~~~~~~~~~
+"use timed writes"
+flag off
+details = "
+ Write the specified chunks of data 'just in time', i.e. the
+ write of each chunk is delayed until the time it is needed
+ by the decoder/player in order to guarantee an uninterrupted
+ audio stream. This may be useful for third-party software
+ that is capable of reading from stdin.
+"
+
+option "no-header" H
+#~~~~~~~~~~~~~~~~~~~
+"do not write an audio file header"
+flag off
+details = "
+ If an audio format needs information about the audio file
+ in a format-specific header in order to be understood by
+ the decoding software, a suitable header is automatically
+ send. This option changes the default behaviour, i.e. no
+ header is written.
+"
+
+</qu>