#include <icy/av/realtimepacketqueue.h>Inherits:
AsyncPacketQueue< PacketT >
Queue that emits media packets in presentation-timestamp order relative to a realtime clock.
Packets are sorted by their time field on insertion. On each pop attempt the queue checks whether the wall-clock time since stream activation has reached the next packet's timestamp; if not, the packet is held back. This provides a soft realtime playback scheduler.
| Return | Name | Description |
|---|---|---|
RealtimePacketQueue inline | Construct the queue with a maximum capacity. | |
void | push virtual inline | Insert a packet into the queue and re-sort by presentation timestamp. |
int64_t | realTime inline | Return the elapsed time since stream activation in microseconds. |
inline
inline RealtimePacketQueue(int maxSize)Construct the queue with a maximum capacity.
maxSize The maximum number of packets the queue will hold.virtual inline
virtual inline void push(PacketT * item)Insert a packet into the queue and re-sort by presentation timestamp.
item The packet to enqueue; ownership is transferred.inline
inline int64_t realTime()Return the elapsed time since stream activation in microseconds.
| Return | Name | Description |
|---|---|---|
int64_t | _startTime |
int64_t _startTime| Return | Name | Description |
|---|---|---|
PacketT * | popNext virtual inline | Return the next packet whose timestamp is <= realTime(), or nullptr if none is ready. |
void | onStreamStateChange virtual inline | Record the stream start time when the stream becomes active. |
virtual inline
virtual inline PacketT * popNext()Return the next packet whose timestamp is <= realTime(), or nullptr if none is ready.
virtual inline
virtual inline void onStreamStateChange(const PacketStreamState & state)Record the stream start time when the stream becomes active.
| Name | Description |
|---|---|
BaseQueue |
AsyncPacketQueue< PacketT > BaseQueue()