SmolRTSP 0.2.0
A small, portable, extensible RTSP 1.0 implementation in C99
Loading...
Searching...
No Matches
jpegxs.h File Reference

JPEG XS RTP payload-header types and serialization. More...

#include <stdbool.h>
#include <stdint.h>
#include <smolrtsp/priv/compiler_attrs.h>
Include dependency graph for jpegxs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SmolRTSP_JpegXsPayloadHeader
 A JPEG XS RTP payload header (RFC 9134 §4.3). More...
 

Macros

#define SMOLRTSP_JPEGXS_PAYLOAD_HEADER_SIZE   4
 The size in bytes of a JPEG XS RTP payload header (RFC 9134 §4.3).
 
#define SMOLRTSP_JPEGXS_SEP_HEADER_SEGMENT   0x7FF
 The SEP-counter sentinel that identifies the header-segment packetization unit in slice mode (K=1).
 

Enumerations

enum  SmolRTSP_JpegXsPackMode { SMOLRTSP_JPEGXS_PACK_CODESTREAM = 0 , SMOLRTSP_JPEGXS_PACK_SLICE = 1 }
 JPEG XS packetization mode – the K bit of the payload header (RFC 9134 §4.3). More...
 
enum  SmolRTSP_JpegXsInterlace { SMOLRTSP_JPEGXS_INTERLACE_PROGRESSIVE = 0 , SMOLRTSP_JPEGXS_INTERLACE_FIELD_1 = 2 , SMOLRTSP_JPEGXS_INTERLACE_FIELD_2 = 3 }
 Interlaced-scan information – the I field (2 bits) of the payload header (RFC 9134 §4.3). More...
 

Functions

void SmolRTSP_JpegXsPayloadHeader_serialize (SmolRTSP_JpegXsPayloadHeader self, uint8_t buffer[restrict])
 Serializes self into buffer in network byte order.
 

Detailed Description

JPEG XS RTP payload-header types and serialization.

See also
RTP Payload Format for ISO/IEC 21122 (JPEG XS): https://datatracker.ietf.org/doc/html/rfc9134

Macro Definition Documentation

◆ SMOLRTSP_JPEGXS_SEP_HEADER_SEGMENT

#define SMOLRTSP_JPEGXS_SEP_HEADER_SEGMENT   0x7FF

The SEP-counter sentinel that identifies the header-segment packetization unit in slice mode (K=1).

See RFC 9134 §4.3.

Enumeration Type Documentation

◆ SmolRTSP_JpegXsInterlace

Interlaced-scan information – the I field (2 bits) of the payload header (RFC 9134 §4.3).

Enumerator
SMOLRTSP_JPEGXS_INTERLACE_PROGRESSIVE 

I=00: progressively scanned.

SMOLRTSP_JPEGXS_INTERLACE_FIELD_1 

I=10: first field of an interlaced frame.

SMOLRTSP_JPEGXS_INTERLACE_FIELD_2 

I=11: second field of an interlaced frame.

◆ SmolRTSP_JpegXsPackMode

JPEG XS packetization mode – the K bit of the payload header (RFC 9134 §4.3).

Enumerator
SMOLRTSP_JPEGXS_PACK_CODESTREAM 

K=0: codestream mode.

The whole codestream of a frame (or field) forms one packetization unit; packet boundaries are MTU-driven.

SMOLRTSP_JPEGXS_PACK_SLICE 

K=1: slice mode.

The header segment and each slice are their own packetization units.

Function Documentation

◆ SmolRTSP_JpegXsPayloadHeader_serialize()

void SmolRTSP_JpegXsPayloadHeader_serialize ( SmolRTSP_JpegXsPayloadHeader  self,
uint8_t  buffer[restrict] 
)

Serializes self into buffer in network byte order.

Parameters
[in]selfThe header to write.
[out]bufferThe memory area capable of storing SMOLRTSP_JPEGXS_PAYLOAD_HEADER_SIZE bytes.