-------------------------------------------
-0.4.11 (to be announced "mutual diversity")
+0.4.11 (to be announced) "mutual diversity"
-------------------------------------------
+ - The --no_default_filters option of para_filter has been
+ removed.
+ - Documentation improvements.
+
------------------------------------------
0.4.10 (2012-03-30) "heterogeneous vacuum"
------------------------------------------
deprecated. It still works but has no effect and will be
removed in the next version.
- para_gui now prints also the stderr output of the executing
- command in the bottom window.
+ command in the bottom window.
- Cleanup and consolidation of the various wrappers for
write(), writev(), send() and friends.
- The obscure error messages on mmap() failures have been
#include "version.h"
static struct afh_args_info conf;
-/** The list of all status items */
-const char *status_item_list[] = {STATUS_ITEM_ARRAY};
-
INIT_AFH_ERRLISTS;
static int loglevel;
print_chunk_table(&afhi);
printf("\n");
}
- free(afhi.techinfo);
- free(afhi.tags.artist);
- free(afhi.tags.title);
- free(afhi.tags.year);
- free(afhi.tags.album);
- free(afhi.tags.comment);
- free(afhi.chunk_table);
+ clear_afhi(&afhi);
ret2 = para_munmap(audio_file_data, audio_file_size);
if (ret2 < 0 && ret >= 0)
ret = ret2;
void afh_get_header(struct afh_info *afhi, uint8_t audio_format_id,
void *map, size_t mapsize, char **buf, size_t *len);
void afh_free_header(char *header_buf, uint8_t audio_format_id);
+void clear_afhi(struct afh_info *afhi);
#endif
void wma_afh_init(struct audio_format_handler *);
+
+/** The list of all status items */
+const char *status_item_list[] = {STATUS_ITEM_ARRAY};
+
/**
* The list of supported audio formats.
*
return ret;
}
+/**
+ * Deallocate contents of a filled-in ahi structure
+ *
+ * \param afhi The structure to clear.
+ *
+ * The given pointer is kept, everything else is freed.
+ */
+void clear_afhi(struct afh_info *afhi)
+{
+ if (!afhi)
+ return;
+ free(afhi->chunk_table);
+ free(afhi->techinfo);
+ free(afhi->tags.artist);
+ free(afhi->tags.title);
+ free(afhi->tags.year);
+ free(afhi->tags.album);
+ free(afhi->tags.comment);
+}
+
/**
* Get the name of the given audio format.
*
send_ret = sc_send_va_buffer(&pad->cc->scc,
"failed to add %s (%s)\n", path, para_strerror(-ret));
free(obj.data);
- if (afhi_ptr) {
- free(afhi_ptr->chunk_table);
- free(afhi_ptr->techinfo);
- free(afhi_ptr->tags.artist);
- free(afhi_ptr->tags.title);
- free(afhi_ptr->tags.year);
- free(afhi_ptr->tags.album);
- free(afhi_ptr->tags.comment);
- }
+ clear_afhi(afhi_ptr);
/* Stop adding files only on send errors. */
return send_ret;
}
VSS_STATUS_FLAG_PLAYING = 2,
};
+/**
+ * The scheduler instance of para_audiod.
+ *
+ * This is needed also in audiod_command.c (for the tasks command), so it can
+ * not be made static.
+ */
struct sched sched = {.max_fileno = 0};
/**
#include "wma.h"
#include "bitstream.h"
+/** Read an 8, 16, or 32 bit entity from a VLC table. */
#define GET_DATA(v, table, i, size) \
{\
const uint8_t *ptr = (const uint8_t *)table + i * size; \
build_table(vlc, nb_bits, nb_codes, bits, codes, codes_size, 0, 0);
}
+/**
+ * Deallocate all resources of a VLC table.
+ *
+ * \param vlc Pointer to an initialized vlc structure.
+ *
+ * The table given by \a vlc must have been initialized earlier via \ref
+ * init_vlc().
+ */
void free_vlc(struct vlc *vlc)
{
freep(&vlc->table);
if (!btrn)
return;
- PARA_NOTICE_LOG("removing btr node %s from buffer tree\n", btrn->name);
+ PARA_INFO_LOG("removing btr node %s from buffer tree\n", btrn->name);
FOR_EACH_CHILD(ch, btrn)
ch->parent = NULL;
btr_drain(btrn);
list_move(&ch->node, &btrn->parent->children);
}
assert(list_empty(&btrn->children));
+ btrn->parent = NULL;
}
/**
if (ret < 0)
return ret;
if (value_result && *value_result)
- PARA_NOTICE_LOG("%s(%s): %s\n", command, parent->name,
+ PARA_INFO_LOG("%s(%s): %s\n", command, parent->name,
*value_result);
return 1;
}
return 1;
}
-static void client_sighandler(int s)
-{
- i9e_signal_dispatch(s);
-}
-
static struct i9e_completer completers[] = {
SERVER_COMPLETERS
AFS_COMPLETERS
}
ici.history_file = history_file;
- act.sa_handler = client_sighandler;
+ act.sa_handler = i9e_signal_dispatch;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
sigaction(SIGINT, &act, NULL);
extern struct sender senders[];
int send_afs_status(struct command_context *cc, int parser_friendly);
-const char *status_item_list[] = {STATUS_ITEM_ARRAY};
-
static void dummy(__a_unused int s)
{
}
* \param arg The loglevel/color specifier.
*
* \a arg must be of the form "ll:[fg [bg]] [attr]".
- *
- * \return 1 On success, -1 on errors.
*/
void daemon_set_log_color_or_die(char const *arg)
{
/** \file ggo.h Functions and structures for help text handling. */
/**
- * Used by exexutables that can not use gengetopt's generated help function.
+ * Used by executables that can not use gengetopt's generated help function.
*/
struct ggo_help {
/** The lines of the short help text. */
static void *http_recv_parse_config(int argc, char **argv)
{
- struct http_recv_args_info *tmp = para_calloc(sizeof(struct http_recv_args_info));
+ struct http_recv_args_info *tmp = para_calloc(sizeof(*tmp));
if (!http_recv_cmdline_parser(argc, argv, tmp))
return tmp;
PARA_WARNING_LOG("set to nonblock failed: (fd0 %d, %s)\n",
i9ep->ici->fds[0], para_strerror(-ret));
para_fd_set(i9ep->ici->fds[0], &s->rfds, &s->max_fileno);
- return;
}
static void update_winsize(void)
return ret;
i9ep->task.pre_select = i9e_pre_select;
i9ep->task.post_select = i9e_post_select;
+ sprintf(i9ep->task.status, "i9e");
register_task(s, &i9ep->task);
rl_readline_name = "para_i9e";
rl_basic_word_break_characters = " ";
rl_attempted_completion_function = i9e_completer;
i9ep->ici = ici;
i9ep->stderr_stream = fdopen(ici->fds[2], "w");
+ setvbuf(i9ep->stderr_stream, NULL, _IONBF, 0);
if (ici->history_file)
read_history(ici->history_file);
vfprintf(stderr, fmt, argp); \
va_end(argp); \
}
+/**
+ * Define the standard log function and activate it.
+ *
+ * \param loglevel_barrier See \ref DEFINE_STDERR_LOGGER.
+ */
#define INIT_STDERR_LOGGING(loglevel_barrier) \
DEFINE_STDERR_LOGGER(stderr_log, loglevel_barrier); \
__printf_2_3 void (*para_log)(int, const char*, ...) = stderr_log;
* Evaluate the result from select().
*
* This hook gets called after the call to select(). It should check
- * all file descriptors which were added to any of the the fd sets
- * during the previous call to pre_select. According to the result, it
- * may then use any non-blocking I/O to establish a connection or to
+ * all file descriptors which were added to any of the fd sets during
+ * the previous call to pre_select. According to the result, it may
+ * then use any non-blocking I/O to establish a connection or to
* receive the audio data.
*
* \sa select(2), struct receiver.
/**
* Unregister all tasks.
*
+ * \param s The scheduler instance to shut down.
+ *
* This will cause \a schedule() to return immediately because both the
* \a pre_select_list and the \a post_select_list are empty. This function
* must be called from the post_select (rather than the pre_select) method.
/**
* Get the list of all registered tasks.
*
+ * \param s The scheduler instance to get the task list from.
+ *
* \return The task list.
*
* Each entry of the list contains an identifier which is simply a hex number.
* \ref audioc.c, \ref afh.c
* - Server: \ref server_command, \ref sender,
* - Audio file selector: \ref audio_format_handler, \ref afs_table,
- * - Client: \ref receiver, \ref receiver_node, \ref filter, \ref filter_node.
+ * - Client: \ref receiver, \ref receiver_node, \ref filter,
+ * \ref filter_node, \ref writer_node.
*
*
* The gory details, listed by topic:
* \ref ogg_afh.c, \ref aac_afh.c, \ref wma_afh.c, \ref spx_afh.c
* - Decoders: \ref mp3dec_filter.c, \ref oggdec_filter.c,
* \ref aacdec_filter.c, \ref wmadec_filter.c, spxdec_filter.c,
+ * \ref flacdec_filter.c,
* - Volume normalizer: \ref compress_filter.c,
* - Output: \ref alsa_write.c, \ref osx_write.c, \ref oss_write.c,
* - http: \ref http_recv.c, \ref http_send.c,
* - Spawning processes: \ref exec.c,
* - Inter process communication: \ref ipc.c,
* - Blob tables: \ref blob.c,
- * - The error subssystem: \ref error.h.
+ * - The error subsystem: \ref error.h.
* - Access control for paraslash senders: \ref acl.c, \ref acl.h.
* - Internal crypto API: \ref crypt.h.
+ * - interactive sessions (libreadline): \ref interactive.c.
*
* Low-level data structures:
*