|
SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
|
One Motion-JPEG frame, ready to packetize per RFC 2435. More...
#include <jpeg_transport.h>

Data Fields | |
| SmolRTSP_JpegPayloadHeader | hdr |
| Per-frame fields of the RFC 2435 main header: type, q, width_blocks, height_blocks, type_specific. | |
| U8Slice99 | qt0 |
| First quantization table, typically 64 bytes (8-bit baseline). | |
| U8Slice99 | qt1 |
| Second quantization table, typically 64 bytes. | |
| U8Slice99 | scan_data |
| JPEG entropy-coded scan data (the bytes after the SOS marker, not including the trailing EOI). | |
One Motion-JPEG frame, ready to packetize per RFC 2435.
The transport leaves SmolRTSP_JpegPayloadHeader::fragment_offset alone in hdr and stamps the actual offset per RTP packet – callers may initialize it to 0 and forget about it.
If both qt0 and qt1 are empty, no quantization-table block is emitted (RFC 2435 §4.1 referenced-tables case; Q < SMOLRTSP_JPEG_Q_DYNAMIC). Otherwise the first RTP packet of the frame carries a SmolRTSP_JpegQtHeader followed by the concatenation of the two slices (RFC 2435 §3.1.8). Two 64-byte 8-bit tables (qt0.len + qt1.len == 128) are the baseline case; a single grayscale table is acceptable (set qt1 to #U8Slice99_empty()).
| SmolRTSP_JpegPayloadHeader SmolRTSP_JpegFrame::hdr |
Per-frame fields of the RFC 2435 main header: type, q, width_blocks, height_blocks, type_specific.
SmolRTSP_JpegPayloadHeader::fragment_offset is overwritten per packet.
| U8Slice99 SmolRTSP_JpegFrame::qt0 |
First quantization table, typically 64 bytes (8-bit baseline).
Pass #U8Slice99_empty() when no embedded QT is sent.
| U8Slice99 SmolRTSP_JpegFrame::qt1 |
Second quantization table, typically 64 bytes.
Pass #U8Slice99_empty() for grayscale or single-table frames.
| U8Slice99 SmolRTSP_JpegFrame::scan_data |
JPEG entropy-coded scan data (the bytes after the SOS marker, not including the trailing EOI).
May be empty – a degenerate frame still emits one RTP packet with the marker bit set.