summaryrefslogtreecommitdiff
path: root/fftools/sync_queue.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-23 08:38:19 +0100
committerAnton Khirnov <anton@khirnov.net>2023-04-09 15:47:45 +0200
commitf9d3c0653334c0ee17ca01cbcaaab467e24ce0c6 (patch)
treeba11270a96e89be68f49f7ebe9d0f2cbc6bc9aef /fftools/sync_queue.h
parent81cca3dae34b78b367a183fd1726d83f67dbf326 (diff)
downloadffmpeg-f9d3c0653334c0ee17ca01cbcaaab467e24ce0c6.tar.gz
fftools/sync_queue: allow requesting a specific number of audio samples
This will be made useful in following commits.
Diffstat (limited to 'fftools/sync_queue.h')
-rw-r--r--fftools/sync_queue.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/fftools/sync_queue.h b/fftools/sync_queue.h
index 9659ee5d50..bc7cd42390 100644
--- a/fftools/sync_queue.h
+++ b/fftools/sync_queue.h
@@ -72,6 +72,16 @@ void sq_limit_frames(SyncQueue *sq, unsigned int stream_idx,
uint64_t max_frames);
/**
+ * Set a constant output audio frame size, in samples. Can only be used with
+ * SYNC_QUEUE_FRAMES queues and audio streams.
+ *
+ * All output frames will have exactly frame_samples audio samples, except
+ * possibly for the last one, which may have fewer.
+ */
+void sq_frame_samples(SyncQueue *sq, unsigned int stream_idx,
+ int frame_samples);
+
+/**
* Submit a frame for the stream with index stream_idx.
*
* On success, the sync queue takes ownership of the frame and will reset the