Self-delimited fragment queue shared by packetized RTP video encoders (JPEGRtpEncoder, H264RtpEncoder, ...).
Fragments are appended one at a time via appendFragment(), already fully built (payload-format header + data). They are consumed through queuePacketSize()/queueReadBytes(), which subclasses expose as the IMediaSource packetSize()/readBytes() overrides RTSPMediaStreamer expects
The queue is a flat byte buffer of messages laid out as [uint32 payloadLen][uint8 isLast][payloadLen bytes]. The isLast byte is only used internally, to know when a whole frame has been enqueued (see m_queuedFrames / dropOldestFrame) so a slow consumer can be capped to a bounded backlog; it is not exposed through packetSize().
Framing the queue this way (rather than a Vector of per-fragment Vectors) avoids relying on element-wise move/copy semantics that this codebase's Vector<T> does not provide for non-trivial T (it grows via memmove).
- Author
- Phil Schatzmann