GstCodecParsers.JpegSegment¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
data |
r/w |
the data containing the jpeg segment starting at offset |
|
marker |
r/w |
The type of the segment that starts at offset |
|
offset |
r/w |
The offset to the segment start in bytes. This is the exact start of the segment, no marker code included |
|
size |
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¶
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:
Trueif the frame header was correctly parsed.- frame_hdr:
The
GstCodecParsers.JpegFrameHdrstructure 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:
Trueif the Huffman table was correctly parsed.- huff_tables:
The
GstCodecParsers.JpegHuffmanTablesstructure 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:
Trueif the quantization table was correctly parsed.- quant_tables:
The
GstCodecParsers.JpegQuantTablesstructure 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:
Trueif the restart interval value was correctly parsed.- interval:
The parsed restart interval value
- Return type:
The caller must make sure there is enough data for the whole segment available.
New in version 1.6.
- parse_scan_header()¶
- Returns:
Trueif the scan header was correctly parsed- scan_hdr:
The
GstCodecParsers.JpegScanHdrstructure 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.