19#ifndef FFTOOLS_SYNC_QUEUE_H
20#define FFTOOLS_SYNC_QUEUE_H
38#define SQFRAME(frame) ((SyncQueueFrame){ .f = (frame) })
39#define SQPKT(pkt) ((SyncQueueFrame){ .p = (pkt) })
reference-counted frame API
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
A sync queue provides timestamp synchronization between multiple streams.
static int frame_samples(const SyncQueue *sq, SyncQueueFrame frame)
int sq_send(SyncQueue *sq, unsigned int stream_idx, SyncQueueFrame frame)
Submit a frame for the stream with index stream_idx.
void sq_free(SyncQueue **sq)
int sq_receive(SyncQueue *sq, int stream_idx, SyncQueueFrame frame)
Read a frame from the queue.
void sq_frame_samples(SyncQueue *sq, unsigned int stream_idx, int frame_samples)
Set a constant output audio frame size, in samples.
void sq_limit_frames(SyncQueue *sq, unsigned int stream_idx, uint64_t max_frames)
Limit the number of output frames for stream with index stream_idx to max_frames.
int sq_add_stream(SyncQueue *sq, int limiting)
Add a new stream to the sync queue.
SyncQueue * sq_alloc(enum SyncQueueType type, int64_t buf_size_us, void *logctx)
Allocate a sync queue of the given type.