mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Fix stream restart
Make sure we always send a clock update before sending a start command. Fix memory size. Follow the state of the node to do allocation Use the pinos node to control the state When doing STREAMOFF, all buffers will be dequeued. requeue them buffers for when we go to playing again.
This commit is contained in:
parent
e34ef88dac
commit
021eccb8ad
7 changed files with 107 additions and 63 deletions
|
|
@ -272,8 +272,12 @@ spa_v4l2_source_node_send_command (SpaNode *node,
|
|||
case SPA_NODE_COMMAND_FLUSH:
|
||||
case SPA_NODE_COMMAND_DRAIN:
|
||||
case SPA_NODE_COMMAND_MARKER:
|
||||
case SPA_NODE_COMMAND_CLOCK_UPDATE:
|
||||
return SPA_RESULT_NOT_IMPLEMENTED;
|
||||
|
||||
case SPA_NODE_COMMAND_CLOCK_UPDATE:
|
||||
{
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
}
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
|
@ -592,8 +596,12 @@ spa_v4l2_source_node_port_alloc_buffers (SpaNode *node,
|
|||
|
||||
res = spa_v4l2_alloc_buffers (this, params, n_params, buffers, n_buffers);
|
||||
|
||||
if (state->have_buffers)
|
||||
update_state (this, SPA_NODE_STATE_PAUSED);
|
||||
if (state->have_buffers) {
|
||||
if (state->started)
|
||||
update_state (this, SPA_NODE_STATE_STREAMING);
|
||||
else
|
||||
update_state (this, SPA_NODE_STATE_PAUSED);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue