GstCodecParsers.H266Parser¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
active_pps |
r |
||
active_sps |
r |
||
active_vps |
r |
||
aps |
r |
||
buffering_period |
r |
||
ctb_addr_in_slice |
[ |
r |
|
ctb_to_tile_col_bd |
[ |
r |
|
ctb_to_tile_row_bd |
[ |
r |
|
last_aps |
r |
||
last_buffering_period |
r |
||
last_pps |
r |
||
last_sps |
r |
||
last_vps |
r |
||
num_ctus_in_slice |
[ |
r |
|
ph |
r |
||
pps |
r |
||
slice_start_offset |
[ |
r |
|
sps |
r |
||
vps |
r |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GstCodecParsers.H266Parser¶
To identify Nals in a bitstream and parse its headers, you should call:
GstCodecParsers.H266Parser.identify_nalu() to identify the following nalu in VVC bitstreams
Then, depending on the
GstCodecParsers.H266NalUnitTypeof the newly parsedGstCodecParsers.H266NalUnit, you should call the different functions to parse the structure:From
GstCodecParsers.H266NalUnitType.SLICE_TRAILtoGstCodecParsers.H266NalUnitType.SLICE_GDR:GstCodecParsers.H266Parser.parse_slice_hdr()GST_H266_NAL_*_SEI:GstCodecParsers.H266Parser.parse_sei()GstCodecParsers.H266NalUnitType.VPS:GstCodecParsers.H266Parser.parse_vps()GstCodecParsers.H266NalUnitType.SPS:GstCodecParsers.H266Parser.parse_sps()GstCodecParsers.H266NalUnitType.PPS:GstCodecParsers.H266Parser.parse_pps()Any other:
GstCodecParsers.H266Parser.parse_nal()
Note: You should always call
GstCodecParsers.H266Parser.parse_nal() if you don’t actually needGstCodecParsers.H266NalUnitTypeto be parsed for your personal use, in order to guarantee that theGstCodecParsers.H266Parseris 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 unitoffset (
int) – the offset from which to parse datasize (
int) – the size of datanal_length_size (
int) – the size in bytes of the VVC nal length prefix.nalus ([
GstCodecParsers.H266NalUnit]) – a caller allocatedGLib.ArrayofGstCodecParsers.H266NalUnitwhere to store parsed nal headersconsumed (
int) – the size of consumed bytes
- Returns:
- Return type:
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:
data (
int) – The data to parseoffset (
int) – the offset from which to parse datasize (
int) – the size of datanalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitwhere to store parsed nal headers
- Returns:
- Return type:
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:
data (
int) – The data to parseoffset (
int) – the offset from which to parse datasize (
int) – the size of datanalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitwhere to store parsed nal headers
- Returns:
- Return type:
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 unitoffset (
int) – the offset from which to parse datasize (
int) – the size of datanal_length_size (
int) – the size in bytes of the VVC nal length prefix.nalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitwhere to store parsed nal headers
- Returns:
- Return type:
Parses data and sets nalu.
New in version 1.26.
- parse_aps(nalu, aps)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – The APSGstCodecParsers.H266NalUnitto parseaps (
GstCodecParsers.H266APS) – TheGstCodecParsers.H266APSto fill.
- Returns:
- Return type:
Parses data, and fills the aps structure.
New in version 1.26.
- parse_aud(nalu, aud)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – The AUDGstCodecParsers.H266NalUnitto parseaud (
GstCodecParsers.H266AUD) – TheGstCodecParsers.H266AUDto fill.
- Returns:
- Return type:
Parses data, and fills the aud structure.
New in version 1.26.
- parse_dci(nalu, dci)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – The DCIGstCodecParsers.H266NalUnitto parsedci (
GstCodecParsers.H266DCI) – TheGstCodecParsers.H266DCIto fill.
- Returns:
- Return type:
Parses data, and fills the dci structure.
New in version 1.26.
- parse_decoder_config_record(data, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.H266ParserResult- config:
parsed
GstCodecParsers.H266DecoderConfigRecorddata
- 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) – TheGstCodecParsers.H266NalUnitto parse- Returns:
- Return type:
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:
nalu (
GstCodecParsers.H266NalUnit) – The OPIGstCodecParsers.H266NalUnitto parseopi (
GstCodecParsers.H266OPI) – TheGstCodecParsers.H266OPIto fill.
- Returns:
- Return type:
Parses data, and fills the opi structure.
New in version 1.26.
- parse_picture_hdr(nalu, picture)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – The picture headerGstCodecParsers.H266NalUnitto parsepicture (
GstCodecParsers.H266PicHdr) – TheGstCodecParsers.H266PicHdrto fill.
- Returns:
- Return type:
Parses data, and fills the ph structure.
New in version 1.26.
- parse_pps(nalu, pps)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitType.PPSGstCodecParsers.H266NalUnitto parsepps (
GstCodecParsers.H266PPS) – TheGstCodecParsers.H266PPSto fill.
- Returns:
- Return type:
Parses data, and fills the pps structure.
New in version 1.26.
- parse_sei(nalu, messages)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – TheGST_H266_NAL_*_SEIGstCodecParsers.H266NalUnitto parsemessages ([
GstCodecParsers.H266SEIMessage]) – TheGLib.ArrayofGstCodecParsers.H266SEIMessageto fill. The caller must free it when done.
- Returns:
- Return type:
Parses data, create and fills the messages array.
New in version 1.26.
- parse_slice_hdr(nalu, slice)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – The sliceGstCodecParsers.H266NalUnitto parseslice (
GstCodecParsers.H266SliceHdr) – TheGstCodecParsers.H266SliceHdrto fill.
- Returns:
- Return type:
Parses data, and fills the sh structure.
New in version 1.26.
- parse_sps(nalu, sps)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitType.SPSGstCodecParsers.H266NalUnitto parsesps (
GstCodecParsers.H266SPS) – TheGstCodecParsers.H266SPSto fill.
- Returns:
- Return type:
Parses data, and fills the sps structure.
New in version 1.26.
- parse_vps(nalu, vps)¶
- Parameters:
nalu (
GstCodecParsers.H266NalUnit) – TheGstCodecParsers.H266NalUnitType.VPSGstCodecParsers.H266NalUnitto parsevps (
GstCodecParsers.H266VPS) – TheGstCodecParsers.H266VPSto fill.
- Returns:
- Return type:
Parses data, and fills the vps structure.
New in version 1.26.