SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
SmolRTSP_JpegFrame Struct Reference

One Motion-JPEG frame, ready to packetize per RFC 2435. More...

#include <jpeg_transport.h>

Collaboration diagram for SmolRTSP_JpegFrame:

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).
 

Detailed Description

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()).

Field Documentation

◆ hdr

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.

◆ qt0

U8Slice99 SmolRTSP_JpegFrame::qt0

First quantization table, typically 64 bytes (8-bit baseline).

Pass #U8Slice99_empty() when no embedded QT is sent.

◆ qt1

U8Slice99 SmolRTSP_JpegFrame::qt1

Second quantization table, typically 64 bytes.

Pass #U8Slice99_empty() for grayscale or single-table frames.

◆ scan_data

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.


The documentation for this struct was generated from the following file: