Table of Contents

Class ConfigurationParser

Namespace
VAST.Codecs.Jpeg
Assembly
VAST.Common.dll

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

int

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

int

ImageDataSize

Gets the size of the compressed image data in bytes, or -1 if not determined.

public int ImageDataSize { get; }

Property Value

int

JpegType

Gets the JPEG type (YUV 4:2:0 or 4:2:2) parsed from the JPEG header.

public JpegType JpegType { get; }

Property Value

JpegType

QuantTableOffsets

Gets the list of byte offsets to quantization tables found in the JPEG data.

public List<int> QuantTableOffsets { get; }

Property Value

List<int>

Width

Gets the image width in pixels parsed from the JPEG header.

public int Width { get; }

Property Value

int

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

data VersatileBuffer

The buffer to search.

offset int

The offset within the buffer to start searching.

size int

The 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

data VersatileBuffer

The buffer to search.

offset int

The offset within the buffer to start searching.

size int

The 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

data VersatileBuffer

The buffer containing the JPEG data.

offset int

The offset within the buffer to start parsing.

size int

The number of bytes to parse.

full bool

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