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

An RFC 2435 Restart Marker header (§3.1.7). More...

#include <jpeg.h>

Data Fields

uint16_t restart_interval
 Number of MCUs between restart markers (bytes 0..1, big-endian) – the value of the JPEG DRI marker.
 
bool first
 First bit (byte 2, bit 7): this packet begins a restart interval.
 
bool last
 Last bit (byte 2, bit 6): this packet ends a restart interval.
 
uint16_t restart_count
 Restart Count (14-bit, low 6 bits of byte 2 plus byte 3).
 

Detailed Description

An RFC 2435 Restart Marker header (§3.1.7).

Present immediately after the main JPEG header on every packet of a frame whose Type is in [64, 127]. Bit layout, transmitted in network byte order:

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Restart Interval        |F|L|       Restart Count       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Field Documentation

◆ restart_count

uint16_t SmolRTSP_JpegRestartHeader::restart_count

Restart Count (14-bit, low 6 bits of byte 2 plus byte 3).

With first and last both set and this at 0x3FFF, the sender declares that restart intervals are not aligned to packet boundaries, so the receiver must reassemble the whole frame before decoding (RFC 2435 §3.1.7).


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