handle set_format with existing format

If one calls set-format with the current format, we return success
Remove some unused utils now
Work on cleanup of buffers
This commit is contained in:
Wim Taymans 2016-08-11 11:20:12 +02:00
parent 55c3262a6a
commit ab0537305f
9 changed files with 82 additions and 143 deletions

View file

@ -267,12 +267,22 @@ do_allocation (PinosLink *this)
{
PinosLinkPrivate *priv = this->priv;
SpaResult res;
const SpaPortInfo *iinfo, *oinfo;
g_debug ("link %p: doing alloc buffers", this);
/* find out what's possible */
if ((res = spa_node_port_get_info (priv->output_node, priv->output_port, &oinfo)) < 0) {
g_warning ("error get port info: %d", res);
return res;
}
if ((res = spa_node_port_get_info (priv->input_node, priv->input_port, &iinfo)) < 0) {
g_warning ("error get port info: %d", res);
return res;
}
priv->n_buffers = 16;
if ((res = spa_node_port_alloc_buffers (priv->output_node, priv->output_port,
NULL, 0,
iinfo->params, iinfo->n_params,
priv->buffers, &priv->n_buffers)) < 0) {
g_warning ("error alloc buffers: %d", res);
return res;