* Volume normalizer
* Stream grabbing at any point in the filter chain
* Stand-alone command line receiver/decoder/normalizer/player
+ * Stand-alone audio format handler utility
* Sophisticated audio file selector
* Small memory footprint
* Command line interface for easy scripting in high-level languages
CPPFLAGS += @arch_cppflags@
BINARIES = para_server para_client para_audioc para_recv \
- para_filter para_write para_fsck @extra_binaries@
+ para_filter para_write para_fsck para_afh @extra_binaries@
man_binaries := $(BINARIES)
man_pages := $(patsubst %, man/man1/%.1, $(man_binaries))
man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
case $< in client.ggo) O="--unamed-opts=command";; \
audioc.ggo) O="--unamed-opts=command";; \
fsck.ggo) O="--unamed-opts=table";; \
+ afh.ggo) O="--unamed-opts=audio_file";; \
esac; \
if test $< != fsck.ggo; then O="$$O --conf-parser "; fi; \
gengetopt $$O \
para_write: @write_objs@
$(CC) $(LDFLAGS) -o $@ @write_objs@ @write_ldflags@
+para_afh: @afh_objs@
+ $(CC) $(LDFLAGS) -o $@ @afh_objs@ @afh_ldflags@
+
clean:
rm -f *.o $(BINARIES)
rm -rf man
0.3.2 (to be announced) "probabilistic parity"
----------------------------------------------
+ - new ls option: -lc (list chunk table)
+ - new executable: para_afh, the stand-alone audio file handler tool
+
---------------------------------------
0.3.1 (2008-02-23) "liquid interaction"
---------------------------------------
be used as a stand-alone command line tool for audio decoding and
volume normalization.
+--------
+para_afh
+--------
+
+A small stand-alone program that prints tech info about the given
+audio file to stdout. It can be instructed to print a "chunk table",
+an array of offsets within the audio file. This allows third-party
+streaming software that is unaware of the particular audio format
+to send complete frames in real time. Currently, mp3, ogg vorbis and
+aac are supported.
+
----------
para_write
----------
return i;
}
}
- return -E_BAD_AUDIO_FILE_SUFFIX;
+ return -1;
}
/**
* \param result Callback result will be stored here.
*
* This function creates a shared memory area, copies the buffer pointed to by
- * query to that area and notifies the afs process that \a f should be
+ * \a query to that area and notifies the afs process that \a f should be
* called ASAP.
*
* \return Negative, on errors, the return value of the callback function
AFTCOL_CHUNKS, &chunk_table_obj);
if (ret < 0)
return ret;
- buf = chunk_table_obj.data;
para_printf(b, "%s\n"
"chunk_time: %lu:%lu\nchunk_offsets: ",
d->path,
(long unsigned) d->afhi.chunk_tv.tv_sec,
(long unsigned) d->afhi.chunk_tv.tv_usec
);
+ buf = chunk_table_obj.data;
for (i = 0; i <= d->afhi.chunks_total; i++)
para_printf(b, "%u ",
(unsigned) read_u32(buf + 4 * i));
[AC_MSG_ERROR([function not found, cannot live without it])])
all_errlist_objs="server mp3_afh afh_common vss command net string signal time
-daemon stat crypt http_send close_on_fork ipc acl
+daemon stat crypt http_send close_on_fork ipc acl afh
dccp_send fd user_list chunk_queue afs osl aft mood score attribute blob ringbuffer
playlist sha1 rbtree sched audiod grab_client filter_chain wav compress
http_recv dccp_recv recv_common write_common file_write audiod_command
client_common recv stdout filter stdin audioc write client fsck exec send_common"
-all_executables="server audiod recv filter audioc write client fsck"
+all_executables="server recv filter audioc write client fsck afh"
recv_cmdline_objs="recv.cmdline http_recv.cmdline dccp_recv.cmdline"
recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
audiod_ldflags=""
audiod_audio_formats=""
+afh_cmdline_objs="afh.cmdline"
+afh_errlist_objs="afh string fd mp3_afh afh_common time"
+afh_ldflags=""
+
server_cmdline_objs="server.cmdline server_command_list afs_command_list"
server_errlist_objs="server afh_common mp3_afh vss command net string signal
time daemon stat crypt http_send close_on_fork
server_ldflags="$server_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile"
filter_ldflags="$filter_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
audiod_ldflags="$audiod_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
+ afh_ldflags="$afh_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
filter_cmdline_objs="$filter_cmdline_objs oggdec_filter.cmdline"
audiod_cmdline_objs="$audiod_cmdline_objs oggdec_filter.cmdline"
server_errlist_objs="$server_errlist_objs ogg_afh"
filter_errlist_objs="$filter_errlist_objs oggdec"
audiod_errlist_objs="$audiod_errlist_objs oggdec"
+ afh_errlist_objs="$afh_errlist_objs ogg_afh"
audiod_audio_formats="ogg"
server_audio_formats="$server_audio_formats ogg"
AC_DEFINE(HAVE_FAAD, 1, define to 1 if you want to build the aacdec filter)
all_errlist_objs="$all_errlist_objs aac_common aacdec aac_afh"
filter_errlist_objs="$filter_errlist_objs aacdec aac_common"
+ afh_errlist_objs="$afh_errlist_objs aac_common aac_afh"
filter_filters="$filter_filters aacdec"
audiod_errlist_objs="$audiod_errlist_objs aacdec aac_common"
server_errlist_objs="$server_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"
audiod_audio_formats="$audiod_audio_formats aac"
server_audio_formats="$server_audio_formats aac"
filters="$filters aacdec"
fi
if test -n "$audiod_audio_formats"; then
extras="$extras para_audiod"
+ all_executables="$all_executables audiod"
else
AC_MSG_WARN([can not build para_audiod (no supported audio formats)])
fi
client_objs="$client_cmdline_objs $client_errlist_objs"
fsck_objs="$fsck_cmdline_objs $fsck_errlist_objs"
audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
+afh_objs="$afh_cmdline_objs $afh_errlist_objs"
AC_SUBST(recv_objs, add_dot_o($recv_objs))
AC_SUBST(recv_ldflags, $recv_ldflags)
AC_DEFINE_UNQUOTED(INIT_SERVER_ERRLISTS,
objlist_to_errlist($server_errlist_objs), errors used by para_server)
+AC_SUBST(afh_objs, add_dot_o($afh_objs))
+AC_SUBST(afh_ldflags, $afh_ldflags)
+AC_DEFINE_UNQUOTED(INIT_AFH_ERRLISTS,
+ objlist_to_errlist($afh_errlist_objs), errors used by para_afh)
+
AC_SUBST(write_objs, add_dot_o($write_objs))
AC_SUBST(write_ldflags, $write_ldflags)
AC_DEFINE_UNQUOTED(INIT_WRITE_ERRLISTS,
#define RINGBUFFER_ERRORS
#define SCORE_ERRORS
#define SHA1_ERRORS
-#define AFH_COMMON_ERRORS
#define RBTREE_ERRORS
#define RECV_ERRORS
#define SEND_COMMON_ERRORS
extern const char **para_errlist[];
+#define AFH_ERRORS \
+ PARA_ERROR(AFH_SYNTAX, "afh syntax error"), \
+
+
+#define AFH_COMMON_ERRORS \
+ PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
+
+
#define ACL_ERRORS \
PARA_ERROR(ACL_PERM, "access denied by acl"), \
#define VSS_ERRORS \
- PARA_ERROR(BAD_AUDIO_FILE_SUFFIX, "unknown suffix"), \
- PARA_ERROR(AUDIO_FORMAT, "audio format not recognized"), \
PARA_ERROR(CHUNK, "unable to get chunk"), \
PARA_ERROR(NOFD, "did not receive open fd from afs"), \
* are passed to \a func. Directories for which the calling process has no
* permissions to change to are silently ignored.
*
- * \return On success, 1 is returned. Otherwise, this function returns a
- * negative value which indicates the kind of the error.
+ * \return Standard.
*/
int for_each_file_in_dir(const char *dirname,
int (*func)(const char *, const void *), const void *private_data)
[<a href="para_audiod.man.html">para_audiod</a>]
[<a href="para_client.man.html">para_client</a>]
[<a href="para_audioc.man.html">para_audioc</a>]
+ [<a href="para_afh.man.html">para_afh</a>]
[<a href="para_fsck.man.html">para_fsck</a>]
[<a href="para_recv.man.html">para_recv</a>]
[<a href="para_filter.man.html">para_filter</a>]