summaryrefslogtreecommitdiffstats
path: root/filters/f_async_queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'filters/f_async_queue.h')
-rw-r--r--filters/f_async_queue.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/filters/f_async_queue.h b/filters/f_async_queue.h
index 6b1ffabe36..dcc5ba57eb 100644
--- a/filters/f_async_queue.h
+++ b/filters/f_async_queue.h
@@ -24,6 +24,8 @@ void mp_async_queue_reset(struct mp_async_queue *queue);
// Put the queue into "active" mode. If it wasn't, then the consumer is woken
// up (and if there is no data in the queue, this will in turn wake up the
// producer, i.e. start transfers automatically).
+// If there is a writer end but no reader end, this will simply make the queue
+// fill up.
void mp_async_queue_resume(struct mp_async_queue *queue);
// Create a filter to access the queue, and connect it. It's not allowed to
@@ -34,11 +36,17 @@ void mp_async_queue_resume(struct mp_async_queue *queue);
// the producer to write any data. You need to call mp_async_queue_resume() to
// start communication. Actual transfers happen only once the consumer filter
// has read requests on its mp_pin.
-// Resetting any of the consumer/producer filters calls mp_async_queue_reset().
// If the producer filter requested a new frame from its filter graph, and the
// queue is asynchronously set to "inactive", then the requested frame will be
// silently discarded once it reaches the producer filter.
//
+// Resetting a queue filter does not affect the queue at all. Managing the
+// queue state is the API user's responsibility. Note that resetting an input
+// filter (dir==MP_PIN_IN) while the queue is active and in "reading" state
+// (the output filter requested data at any point before the last
+// mp_async_queue_reset() was called), the
+// filter will immediately request data after the reset.
+//
// For proper global reset, this order should be preferred:
// - mp_async_queue_reset()
// - reset producer and consumer filters on their respective threads (in any