GstCodecParsers.H266Parser

Fields

Name

Type

Access

Description

active_pps

GstCodecParsers.H266PPS

r

active_sps

GstCodecParsers.H266SPS

r

active_vps

GstCodecParsers.H266VPS

r

aps

[GstCodecParsers.H266APS]

r

buffering_period

GstCodecParsers.H266SEIMessage

r

ctb_addr_in_slice

[int]

r

ctb_to_tile_col_bd

[int]

r

ctb_to_tile_row_bd

[int]

r

last_aps

[GstCodecParsers.H266APS]

r

last_buffering_period

GstCodecParsers.H266SEIMessage

r

last_pps

GstCodecParsers.H266PPS

r

last_sps

GstCodecParsers.H266SPS

r

last_vps

GstCodecParsers.H266VPS

r

num_ctus_in_slice

[int]

r

ph

GstCodecParsers.H266PicHdr

r

pps

[GstCodecParsers.H266PPS]

r

slice_start_offset

[int]

r

sps

[GstCodecParsers.H266SPS]

r

vps

[GstCodecParsers.H266VPS]

r

Methods

free ()

identify_and_split_nalu_vvc (data, offset, size, nal_length_size, nalus, consumed)

identify_nalu (data, offset, size, nalu)

identify_nalu_unchecked (data, offset, size, nalu)

identify_nalu_vvc (data, offset, size, nal_length_size, nalu)

parse_aps (nalu, aps)

parse_aud (nalu, aud)

parse_dci (nalu, dci)

parse_decoder_config_record (data, size)

parse_nal (nalu)

parse_opi (nalu, opi)

parse_picture_hdr (nalu, picture)

parse_pps (nalu, pps)

parse_sei (nalu, messages)

parse_slice_hdr (nalu, slice)

parse_sps (nalu, sps)

parse_vps (nalu, vps)

Details

class GstCodecParsers.H266Parser

To identify Nals in a bitstream and parse its headers, you should call:

Then, depending on the GstCodecParsers.H266NalUnitType of the newly parsed GstCodecParsers.H266NalUnit, you should call the different functions to parse the structure:

Note: You should always call GstCodecParsers.H266Parser.parse_nal() if you don’t actually need GstCodecParsers.H266NalUnitType to be parsed for your personal use, in order to guarantee that the GstCodecParsers.H266Parser is always up to date.

For more details about the structures, look at the ITU-T H.266 specifications, you can download them from:

  • ITU-T H.266: http://www.itu.int/rec/T-REC-H.266

New in version 1.26.

free()

Frees the self

New in version 1.26.

identify_and_split_nalu_vvc(data, offset, size, nal_length_size, nalus, consumed)
Parameters:
  • data (int) – The data to parse, must be the beging of the Nal unit

  • offset (int) – the offset from which to parse data

  • size (int) – the size of data

  • nal_length_size (int) – the size in bytes of the VVC nal length prefix.

  • nalus ([GstCodecParsers.H266NalUnit]) – a caller allocated GLib.Array of GstCodecParsers.H266NalUnit where to store parsed nal headers

  • consumed (int) – the size of consumed bytes

Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data for packetized (e.g., vvc1/vvi1) bitstream and sets nalus. In addition to nal identifying process, this method scans start-code prefix to split malformed packet into actual nal chunks.

New in version 1.28.

identify_nalu(data, offset, size, nalu)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data and fills nalu from the next nalu data from data

New in version 1.26.

identify_nalu_unchecked(data, offset, size, nalu)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data and fills nalu from the next nalu data from data.

This differs from gst_h266_parser_identify_nalu in that it doesn’t check whether the packet is complete or not.

Note: Only use this function if you already know the provided data is a complete NALU, else use gst_h266_parser_identify_nalu.

New in version 1.26.

identify_nalu_vvc(data, offset, size, nal_length_size, nalu)
Parameters:
  • data (int) – The data to parse, must be the beging of the Nal unit

  • offset (int) – the offset from which to parse data

  • size (int) – the size of data

  • nal_length_size (int) – the size in bytes of the VVC nal length prefix.

  • nalu (GstCodecParsers.H266NalUnit) – The GstCodecParsers.H266NalUnit where to store parsed nal headers

Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data and sets nalu.

New in version 1.26.

parse_aps(nalu, aps)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the aps structure.

New in version 1.26.

parse_aud(nalu, aud)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the aud structure.

New in version 1.26.

parse_dci(nalu, dci)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the dci structure.

New in version 1.26.

parse_decoder_config_record(data, size)
Parameters:
  • data (int) – the data to parse

  • size (int) – the size of data

Returns:

a GstCodecParsers.H266ParserResult

config:

parsed GstCodecParsers.H266DecoderConfigRecord data

Return type:

(GstCodecParsers.H266ParserResult, config: GstCodecParsers.H266DecoderConfigRecord)

Parses VVCDecoderConfigurationRecord data and fill into config. The caller must free config via GstCodecParsers.H266DecoderConfigRecord.free()

This method does not parse APS, VPS, SPS and PPS and therefore the caller needs to parse each NAL unit via appropriate parsing method.

New in version 1.26.

parse_nal(nalu)
Parameters:

nalu (GstCodecParsers.H266NalUnit) – The GstCodecParsers.H266NalUnit to parse

Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

This function should be called in the case one doesn’t need to parse a specific structure. It is necessary to do so to make sure self is up to date.

New in version 1.26.

parse_opi(nalu, opi)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the opi structure.

New in version 1.26.

parse_picture_hdr(nalu, picture)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the ph structure.

New in version 1.26.

parse_pps(nalu, pps)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the pps structure.

New in version 1.26.

parse_sei(nalu, messages)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, create and fills the messages array.

New in version 1.26.

parse_slice_hdr(nalu, slice)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the sh structure.

New in version 1.26.

parse_sps(nalu, sps)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the sps structure.

New in version 1.26.

parse_vps(nalu, vps)
Parameters:
Returns:

a GstCodecParsers.H266ParserResult

Return type:

GstCodecParsers.H266ParserResult

Parses data, and fills the vps structure.

New in version 1.26.