|
FFmpegKit iOS / macOS / tvOS API 6.0
|
Go to the source code of this file.
Data Structures | |
| union | SyncQueueFrame |
Macros | |
| #define | SQFRAME(frame) ((SyncQueueFrame){ .f = (frame) }) |
| #define | SQPKT(pkt) ((SyncQueueFrame){ .p = (pkt) }) |
Typedefs | |
| typedef union SyncQueueFrame | SyncQueueFrame |
| typedef struct SyncQueue | SyncQueue |
Enumerations | |
| enum | SyncQueueType { SYNC_QUEUE_PACKETS , SYNC_QUEUE_FRAMES } |
Functions | |
| SyncQueue * | sq_alloc (enum SyncQueueType type, int64_t buf_size_us) |
| void | sq_free (SyncQueue **sq) |
| int | sq_add_stream (SyncQueue *sq, int limiting) |
| void | sq_set_tb (SyncQueue *sq, unsigned int stream_idx, AVRational tb) |
| void | sq_limit_frames (SyncQueue *sq, unsigned int stream_idx, uint64_t max_frames) |
| int | sq_send (SyncQueue *sq, unsigned int stream_idx, SyncQueueFrame frame) |
| int | sq_receive (SyncQueue *sq, int stream_idx, SyncQueueFrame frame) |
| #define SQFRAME | ( | frame | ) | ((SyncQueueFrame){ .f = (frame) }) |
Definition at line 51 of file fftools_sync_queue.h.
| #define SQPKT | ( | pkt | ) | ((SyncQueueFrame){ .p = (pkt) }) |
Definition at line 52 of file fftools_sync_queue.h.
Definition at line 54 of file fftools_sync_queue.h.
| typedef union SyncQueueFrame SyncQueueFrame |
| enum SyncQueueType |
| Enumerator | |
|---|---|
| SYNC_QUEUE_PACKETS | |
| SYNC_QUEUE_FRAMES | |
Definition at line 41 of file fftools_sync_queue.h.
Add a new stream to the sync queue.
| limiting | whether the stream is limiting, i.e. no other stream can be longer than this one |
Definition at line 365 of file fftools_sync_queue.c.
| SyncQueue * sq_alloc | ( | enum SyncQueueType | type, |
| int64_t | buf_size_us | ||
| ) |
Allocate a sync queue of the given type.
| buf_size_us | maximum duration that will be buffered in microseconds |
Definition at line 419 of file fftools_sync_queue.c.
| void sq_free | ( | SyncQueue ** | sq | ) |
Definition at line 442 of file fftools_sync_queue.c.
Limit the number of output frames for stream with index stream_idx to max_frames.
Definition at line 407 of file fftools_sync_queue.c.
| int sq_receive | ( | SyncQueue * | sq, |
| int | stream_idx, | ||
| SyncQueueFrame | frame | ||
| ) |
Read a frame from the queue.
| stream_idx | index of the stream to read a frame for. May be -1, then try to read a frame from any stream that is ready for output. |
| frame | output frame will be written here on success. The frame is owned by the caller. |
Definition at line 353 of file fftools_sync_queue.c.
| int sq_send | ( | SyncQueue * | sq, |
| unsigned int | stream_idx, | ||
| SyncQueueFrame | frame | ||
| ) |
Submit a frame for the stream with index stream_idx.
On success, the sync queue takes ownership of the frame and will reset the contents of the supplied frame. On failure, the frame remains owned by the caller.
Sending a frame with NULL contents marks the stream as finished.
Definition at line 248 of file fftools_sync_queue.c.
Set the timebase for the stream with index stream_idx. Should be called before sending any frames for this stream.
Definition at line 392 of file fftools_sync_queue.c.