GstCodecParsers.JpegSegment

Fields

Name

Type

Access

Description

data

int

r/w

the data containing the jpeg segment starting at offset

marker

GstCodecParsers.JpegMarker

r/w

The type of the segment that starts at offset

offset

int

r/w

The offset to the segment start in bytes. This is the exact start of the segment, no marker code included

size

int

r/w

The size of the segment in bytes, or -1 if the end was not found. It is the exact size of the segment, without the sync byte and marker code but including any length bytes.

Methods

parse_frame_header ()

parse_huffman_table ()

parse_quantization_table ()

parse_restart_interval ()

parse_scan_header ()

Details

class GstCodecParsers.JpegSegment

A structure that contains the type of a segment, its offset and its size.

New in version 1.6.

parse_frame_header()
Returns:

True if the frame header was correctly parsed.

frame_hdr:

The GstCodecParsers.JpegFrameHdr structure to fill in

Return type:

(bool, frame_hdr: GstCodecParsers.JpegFrameHdr)

Parses the frame_hdr JPEG frame header structure members from self.

The caller must make sure there is enough data for the whole segment available.

New in version 1.6.

parse_huffman_table()
Returns:

True if the Huffman table was correctly parsed.

huff_tables:

The GstCodecParsers.JpegHuffmanTables structure to fill in

Return type:

(bool, huff_tables: GstCodecParsers.JpegHuffmanTables)

Parses the JPEG Huffman table structure members from self.

The caller must make sure there is enough data for the whole segment available.

Note: huf_tables represents the complete set of possible Huffman tables. However, the parser will only write to the Huffman table specified by the table destination identifier (Th). While doing so, the valid flag of the specified Huffman table will also be set to True;

New in version 1.6.

parse_quantization_table()
Returns:

True if the quantization table was correctly parsed.

quant_tables:

The GstCodecParsers.JpegQuantTables structure to fill in

Return type:

(bool, quant_tables: GstCodecParsers.JpegQuantTables)

Parses the JPEG quantization table structure members from self.

The caller must make sure there is enough data for the whole segment available.

Note: quant_tables represents the complete set of possible quantization tables. However, the parser will only write to the quantization table specified by the table destination identifier (Tq). While doing so, the valid flag of the specified quantization table will also be set to True.

New in version 1.6.

parse_restart_interval()
Returns:

True if the restart interval value was correctly parsed.

interval:

The parsed restart interval value

Return type:

(bool, interval: int)

The caller must make sure there is enough data for the whole segment available.

New in version 1.6.

parse_scan_header()
Returns:

True if the scan header was correctly parsed

scan_hdr:

The GstCodecParsers.JpegScanHdr structure to fill in

Return type:

(bool, scan_hdr: GstCodecParsers.JpegScanHdr)

Parses the scan_hdr JPEG scan header structure members from self.

The caller must make sure there is enough data for the whole segment available.

New in version 1.6.