Class ConfigurationParser
Provides parsing and header generation functionality for JPEG images, including RTP/JPEG payload support.
public class ConfigurationParser
- Inheritance
-
ConfigurationParser
- Inherited Members
Constructors
ConfigurationParser()
public ConfigurationParser()
Properties
Height
Gets the image height in pixels parsed from the JPEG header.
public int Height { get; }
Property Value
ImageDataOffset
Gets the byte offset to the start of compressed image data (after SOS header), or -1 if not found.
public int ImageDataOffset { get; }
Property Value
ImageDataSize
Gets the size of the compressed image data in bytes, or -1 if not determined.
public int ImageDataSize { get; }
Property Value
JpegType
Gets the JPEG type (YUV 4:2:0 or 4:2:2) parsed from the JPEG header.
public JpegType JpegType { get; }
Property Value
QuantTableOffsets
Gets the list of byte offsets to quantization tables found in the JPEG data.
public List<int> QuantTableOffsets { get; }
Property Value
Width
Gets the image width in pixels parsed from the JPEG header.
public int Width { get; }
Property Value
Methods
FindEnd(VersatileBuffer, int, int)
Finds the end of a JPEG image (EOI marker) in the buffer.
public static int FindEnd(VersatileBuffer data, int offset, int size)
Parameters
dataVersatileBufferThe buffer to search.
offsetintThe offset within the buffer to start searching.
sizeintThe number of bytes to search.
Returns
- int
The position immediately after the EOI marker, or -1 if not found.
FindStart(VersatileBuffer, int, int)
Finds the start of a JPEG image (SOI marker) in the buffer.
public static int FindStart(VersatileBuffer data, int offset, int size)
Parameters
dataVersatileBufferThe buffer to search.
offsetintThe offset within the buffer to start searching.
sizeintThe number of bytes to search.
Returns
- int
The position of the SOI marker, or -1 if not found.
Parse(VersatileBuffer, int, int, bool)
Parses JPEG image data to extract header information and locate image data.
public bool Parse(VersatileBuffer data, int offset, int size, bool full)
Parameters
dataVersatileBufferThe buffer containing the JPEG data.
offsetintThe offset within the buffer to start parsing.
sizeintThe number of bytes to parse.
fullboolIf true, performs full validation including Huffman tables and locates image data; if false, only extracts basic dimensions and type.
Returns
- bool
True if parsing succeeded; otherwise, false.