diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-09-07 18:42:49 +0300 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-12-31 12:20:59 +0100 |
commit | 1f6f807bb35228f7d6f50cf61283b9ceb8f46eee (patch) | |
tree | 9028c4ca2eee9b5e422cf4aaa40f3997fc824720 /src/pq_format.c | |
parent | b40a54dc97e28e31e4a9be8a3aa634eaafb219d5 (diff) |
procqueue: add processing state callback
In some cases it's required to wait for some queue items
to finish processing. For example, the ALSA sink writes the
audio samples to the buffer in non-blocking mode, so as soon
as all of them will be written, a program may finish execution,
causing the playback abort.
To prevent that, this change extends the library's API, allowing
each queue item to have a processing state callback that returns
a positive integer if processing is not finished yet,
and 0 otherwise.
Diffstat (limited to 'src/pq_format.c')
-rw-r--r-- | src/pq_format.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pq_format.c b/src/pq_format.c index ae5386e..8ea8b86 100644 --- a/src/pq_format.c +++ b/src/pq_format.c @@ -70,6 +70,7 @@ osmo_gapk_pq_queue_fmt_convert(struct osmo_gapk_pq *pq, const struct osmo_gapk_f } item->proc = pq_cb_fmt_convert; + item->wait = NULL; return 0; } |