#include "recv_cmd.lsg.h"
#include "play_cmd.lsg.h"
+#include "write_cmd.lsg.h"
#include "play.lsg.h"
#include "para.h"
#include "list.h"
#include "error.h"
-#include "ggo.h"
#include "buffer_tree.h"
#include "version.h"
#include "string.h"
#include "afh.h"
#include "recv.h"
#include "write.h"
-#include "write_common.h"
#include "fd.h"
/**
static int eof_cleanup(struct play_task *pt)
{
- struct writer *w = writers + DEFAULT_WRITER;
const struct filter *decoder;
+ const struct writer *w = writer_get(-1); /* default writer */
int ret;
ret = get_playback_error(pt);
task_reap(&pt->wn.task);
w->close(&pt->wn);
btr_remove_node(&pt->wn.btrn);
- w->free_config(pt->wn.conf);
+ lls_free_parse_result(pt->wn.lpr, WRITE_CMD(pt->wn.wid));
memset(&pt->wn, 0, sizeof(struct writer_node));
decoder = filter_get(pt->fn.filter_num);
char *tmp, buf[20];
int ret;
const struct filter *decoder;
- static struct lls_parse_result *filter_lpr;
+ static struct lls_parse_result *filter_lpr, *writer_lpr;
btr_remove_node(&pt->rn.btrn);
if (!pt->rn.receiver || pt->next_file != pt->current_file) {
btr_log_tree(pt->rn.btrn, LL_INFO);
/* setup default writer */
- pt->wn.conf = check_writer_arg_or_die(NULL, &pt->wn.writer_num);
-
+ pt->wn.wid = check_writer_arg_or_die(NULL, &writer_lpr);
+ pt->wn.lpr = writer_lpr;
/* success, register tasks */
pt->rn.task = task_register(
&(struct task_info) {
/* needed this early to make help work */
recv_init();
- writer_init();
sched.default_timeout.tv_sec = 5;
parse_config_or_die(argc, argv);