summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
11f3700)
These are not used anyway. Make all writers return 1 on success.
if (snd_pcm_nonblock(pad->handle, 1))
PARA_ERROR_LOG("failed to set nonblock mode\n");
tv_add(now, &(struct timeval ){0, 100 * 1000}, &pad->next_chunk);
if (snd_pcm_nonblock(pad->handle, 1))
PARA_ERROR_LOG("failed to set nonblock mode\n");
tv_add(now, &(struct timeval ){0, 100 * 1000}, &pad->next_chunk);
- return period_size * pad->bytes_per_frame;
}
static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
}
static int alsa_write_pre_select(struct sched *s, struct writer_node *wn)
if (!conf->filename_given)
free(filename);
if (pfwd->fd >= 0)
if (!conf->filename_given)
free(filename);
if (pfwd->fd >= 0)
free(pfwd);
return -E_FW_OPEN;
}
free(pfwd);
return -E_FW_OPEN;
}
struct writer *writer; /* FIXME: Should better be only the number. */
/** Writer-specific data. */
void *private_data;
struct writer *writer; /* FIXME: Should better be only the number. */
/** Writer-specific data. */
void *private_data;
- /** Send that many bytes in one go. */
- int chunk_bytes;
/** Pointer to the group this node belongs to. */
struct writer_node_group *wng;
/** The writer-specific configuration of this node. */
/** Pointer to the group this node belongs to. */
struct writer_node_group *wng;
/** The writer-specific configuration of this node. */
unsigned num_writers;
/** Array of pointers to the corresponding writer nodes. */
struct writer_node *writer_nodes;
unsigned num_writers;
/** Array of pointers to the corresponding writer nodes. */
struct writer_node *writer_nodes;
- /** The maximum of the chunk_bytes values of the writer nodes in this group. */
- int max_chunk_bytes;
/** Non-zero if an error or end of file was encountered by the feeding task. */
int *input_error;
/** Current output buffer. */
/** Non-zero if an error or end of file was encountered by the feeding task. */
int *input_error;
/** Current output buffer. */
ret = wn->writer->open(wn);
if (ret < 0)
goto err_out;
ret = wn->writer->open(wn);
if (ret < 0)
goto err_out;
- wn->chunk_bytes = ret;
- g->max_chunk_bytes = PARA_MAX(g->max_chunk_bytes, ret);
}
sprintf(g->task.status, "%s", "writer node group");
register_task(&g->task);
}
sprintf(g->task.status, "%s", "writer node group");
register_task(&g->task);