mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
audiomixer: small improvements
Improve the audiomixer state handling Improve PortIO status handling.
This commit is contained in:
parent
e734d239b9
commit
fe68ca1be3
9 changed files with 109 additions and 97 deletions
|
|
@ -803,17 +803,23 @@ static SpaResult
|
|||
spa_videotestsrc_node_process_output (SpaNode *node)
|
||||
{
|
||||
SpaVideoTestSrc *this;
|
||||
SpaPortIO *io;
|
||||
|
||||
spa_return_val_if_fail (node != NULL, SPA_RESULT_INVALID_ARGUMENTS);
|
||||
|
||||
this = SPA_CONTAINER_OF (node, SpaVideoTestSrc, node);
|
||||
io = this->io;
|
||||
spa_return_val_if_fail (io != NULL, SPA_RESULT_WRONG_STATE);
|
||||
|
||||
if (this->io && this->io->buffer_id != SPA_ID_INVALID) {
|
||||
if (io->status == SPA_RESULT_HAVE_BUFFER)
|
||||
return SPA_RESULT_HAVE_BUFFER;
|
||||
|
||||
if (io->buffer_id != SPA_ID_INVALID) {
|
||||
reuse_buffer (this, this->io->buffer_id);
|
||||
this->io->buffer_id = SPA_ID_INVALID;
|
||||
}
|
||||
|
||||
if (!this->async)
|
||||
if (!this->async && (io->status == SPA_RESULT_NEED_BUFFER))
|
||||
return videotestsrc_make_buffer (this);
|
||||
else
|
||||
return SPA_RESULT_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue