Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- GstCodecParsers.av1_bit_writer_frame_header_obu(frame_hdr, seq_hdr, temporal_id, spatial_id, size_field, size)¶
- Parameters:
frame_hdr (
GstCodecParsers.AV1FrameHeaderOBU) – the frame header ofGstCodecParsers.AV1FrameHeaderOBUto writeseq_hdr (
GstCodecParsers.AV1SequenceHeaderOBU) – the sequence header ofGstCodecParsers.AV1SequenceHeaderOBUto refertemporal_id (
int) – specifies the temporal level of the data contained in the OBU.spatial_id (
int) – specifies the spatial level of the data contained in the OBU.size_field (
bool) – whether the OBU header contains the OBU size.size (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.AV1BitWriterResult- data:
the bit stream generated by the frame header
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.AV1BitWriterResult, data:int, size:int)
Generating the according AV1 bit stream OBU by providing the frame header.
New in version 1.22.
- GstCodecParsers.av1_bit_writer_frame_header_obu_with_offsets(frame_hdr, seq_hdr, temporal_id, spatial_id, size_field, size_field_size, size)¶
- Parameters:
frame_hdr (
GstCodecParsers.AV1FrameHeaderOBU) – the frame header ofGstCodecParsers.AV1FrameHeaderOBUto writeseq_hdr (
GstCodecParsers.AV1SequenceHeaderOBU) – the sequence header ofGstCodecParsers.AV1SequenceHeaderOBUto refertemporal_id (
int) – specifies the temporal level of the data contained in the OBU.spatial_id (
int) – specifies the spatial level of the data contained in the OBU.size_field (
bool) – whether the OBU header contains the OBU size.size_field_size (
int) – 0 means a fixed OBU header size field.size (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.AV1BitWriterResult- qindex_offset:
return the qindex fields offset in bits.
- segmentation_offset:
return the segmentation fields offset in bits.
- lf_offset:
return the loopfilter fields offset in bits.
- cdef_offset:
return the cdef fields offset in bits.
- cdef_size:
return the cdef fields size in bits.
- data:
the bit stream generated by the frame header
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.AV1BitWriterResult, qindex_offset:int, segmentation_offset:int, lf_offset:int, cdef_offset:int, cdef_size:int, data:int, size:int)
While Generating the according AV1 bit stream OBU by providing the frame header, this function also return bit offsets of qindex, segmentation and cdef, etc. These offsets can help to change the content of these fields later. This function is useful if the encoder may change the content of the frame header after generating it. For example, some HW needs user to provide a frame header before the real encoding job, and it will change the according fields in the frame header during the real encoding job.
New in version 1.22.
- GstCodecParsers.av1_bit_writer_metadata_obu(metadata, temporal_id, spatial_id, size_field, size)¶
- Parameters:
metadata (
GstCodecParsers.AV1MetadataOBU) – the meta data ofGstCodecParsers.AV1MetadataOBUto writetemporal_id (
int) – specifies the temporal level of the data contained in the OBU.spatial_id (
int) – specifies the spatial level of the data contained in the OBU.size_field (
bool) – whether the header contain size feildsize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.AV1BitWriterResult- data:
the bit stream generated by the meta data
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.AV1BitWriterResult, data:int, size:int)
Generating the according AV1 bit stream OBU by providing the meta data.
New in version 1.22.
- GstCodecParsers.av1_bit_writer_sequence_header_obu(seq_hdr, size_field, size)¶
- Parameters:
seq_hdr (
GstCodecParsers.AV1SequenceHeaderOBU) – the sequence header ofGstCodecParsers.AV1SequenceHeaderOBUto writesize_field (
bool) – whether the header contain size feildsize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.AV1BitWriterResult- data:
the bit stream generated by the sequence header
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.AV1BitWriterResult, data:int, size:int)
Generating the according AV1 bit stream OBU by providing the sequence header.
New in version 1.22.
- GstCodecParsers.av1_bit_writer_temporal_delimiter_obu(size_field, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.AV1BitWriterResult- data:
the bit stream generated
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.AV1BitWriterResult, data:int, size:int)
Generating the according temporal delimiter AV1 bit stream OBU.
New in version 1.22.
- GstCodecParsers.buffer_add_lcevc_meta(buffer, enhancement_data)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Bufferenhancement_data (
Gst.Buffer) – the parsed LCEVC enhancement data
- Returns:
the
GstCodecParsers.LcevcMetaon buffer.- Return type:
Attaches
GstCodecParsers.LcevcMetametadata to buffer.New in version 1.26.
- GstCodecParsers.buffer_add_mpeg_video_meta(buffer, seq_hdr, seq_ext, disp_ext, pic_hdr, pic_ext, quant_ext)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Bufferseq_hdr (
GstCodecParsers.MpegVideoSequenceHdr) – aGstCodecParsers.MpegVideoSequenceHdrseq_ext (
GstCodecParsers.MpegVideoSequenceExt) – aGstCodecParsers.MpegVideoSequenceExtdisp_ext (
GstCodecParsers.MpegVideoSequenceDisplayExt) – aGstCodecParsers.MpegVideoSequenceDisplayExtpic_hdr (
GstCodecParsers.MpegVideoPictureHdr) – aGstCodecParsers.MpegVideoPictureHdrpic_ext (
GstCodecParsers.MpegVideoPictureExt) – aGstCodecParsers.MpegVideoPictureExtquant_ext (
GstCodecParsers.MpegVideoQuantMatrixExt) – aGstCodecParsers.MpegVideoQuantMatrixExt
- Returns:
a newly created
GstCodecParsers.MpegVideoMeta- Return type:
Creates and adds a
GstCodecParsers.MpegVideoMetato a buffer. Provided structures must either beNoneor GSlice-allocated.New in version 1.2.
- GstCodecParsers.buffer_get_lcevc_meta(buffer)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Buffer- Returns:
the
GstCodecParsers.LcevcMetawith lowest id (usually 0) orNonewhen there is no such metadata on buffer.- Return type:
Find the
GstCodecParsers.LcevcMetaon buffer with the lowest id.Buffers can contain multiple
GstCodecParsers.LcevcMetametadata items when dealing with multiview buffers.New in version 1.26.
- GstCodecParsers.buffer_get_lcevc_meta_id(buffer, id)¶
- Parameters:
buffer (
Gst.Buffer) – aGst.Bufferid (
int) – a metadata id
- Returns:
the
GstCodecParsers.LcevcMetawith id orNonewhen there is no such metadata on buffer.- Return type:
Find the
GstCodecParsers.LcevcMetaon buffer with the given id.Buffers can contain multiple
GstCodecParsers.LcevcMetametadata items when dealing with multiview buffers.New in version 1.26.
- GstCodecParsers.h263_parse(packet, data, offset, size)¶
- Parameters:
packet (
GstCodecParsers.Mpeg4Packet) – TheGstCodecParsers.Mpeg4Packetto filldata (
int) – The data to parseoffset (
int) – offset from which to start the parsingsize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data and fills packet with the information of the next packet found.
Note that the type of the packet is meaningless in this case.
- GstCodecParsers.h264_bit_writer_aud(primary_pic_type, start_code, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
the bit stream generated by the aud
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int)
Generating the according h264 bit stream of an aud.
New in version 1.22.
- GstCodecParsers.h264_bit_writer_convert_to_nal(nal_prefix_size, packetized, has_startcode, add_trailings, raw_data, raw_size, nal_size)¶
- Parameters:
nal_prefix_size (
int) – the size in bytes for the prefix of a nal, may be 2, 3 or 4packetized (
bool) – whether to write the bit stream in packetized format, which does not have the start code but has a nal_prefix_size bytes’ size prepending to the real nal datahas_startcode (
bool) – whether the input already has a start codeadd_trailings (
bool) – whether to add rbsp trailing bits to make the output aligned to byteraw_data (
int) – the input bit streamraw_size (
int) – the size in bits of the input bit streamnal_size (
int) – the size in bytes of the output
- Returns:
a
GstCodecParsers.H264BitWriterResult- nal_data:
the output bit stream converted to a real nal
- nal_size:
the size in bytes of the output
- Return type:
(
GstCodecParsers.H264BitWriterResult, nal_data:int, nal_size:int)
Converting a bit stream into a real nal packet. If the bit stream already has a start code, it will be replaced by the new one specified by the nal_prefix_size and packetized. It is assured that the output aligns to the byte and the all the emulations are inserted.
New in version 1.22.
- GstCodecParsers.h264_bit_writer_filler(start_code, num, data, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
bit stream storage
- size:
size in bytes of the input and output
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int)
Generates the according h264 bit stream nal bitstream of a filler with size.
New in version 1.26.
- GstCodecParsers.h264_bit_writer_pps(pps, start_code, size)¶
- Parameters:
pps (
GstCodecParsers.H264PPS) – the pps ofGstCodecParsers.H264PPSto writestart_code (
bool) – whether adding the nal start codesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
the bit stream generated by the pps
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int)
Generating the according h264 bit stream by providing the pps.
New in version 1.22.
- GstCodecParsers.h264_bit_writer_sei(sei_messages, start_code, size)¶
- Parameters:
sei_messages ([
GstCodecParsers.H264SEIMessage]) – An array ofGstCodecParsers.H264SEIMessageto writestart_code (
bool) – whether adding the nal start codesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
the bit stream generated by the sei messages
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int)
Generating the according h264 bit stream by providing sei messages.
New in version 1.22.
- GstCodecParsers.h264_bit_writer_slice_hdr(slice, start_code, nal_type, is_ref, size)¶
- Parameters:
slice (
GstCodecParsers.H264SliceHdr) – the slice header ofGstCodecParsers.H264SliceHdrto writestart_code (
bool) – whether adding the nal start codenal_type (
GstCodecParsers.H264NalUnitType) – the slice’s nal type ofGstCodecParsers.H264NalUnitTypeis_ref (
bool) – whether the slice is a referencesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
the bit stream generated by the slice header
- size:
the size in bytes of the input and output
- trail_bits_num:
the trail bits number which is not byte aligned.
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int, trail_bits_num:int)
Generating the according h264 bit stream by providing the slice header.
New in version 1.22.
- GstCodecParsers.h264_bit_writer_sps(sps, start_code, size)¶
- Parameters:
sps (
GstCodecParsers.H264SPS) – the sps ofGstCodecParsers.H264SPSto writestart_code (
bool) – whether adding the nal start codesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.H264BitWriterResult- data:
the bit stream generated by the sps
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.H264BitWriterResult, data:int, size:int)
Generating the according h264 bit stream by providing the sps.
New in version 1.22.
- GstCodecParsers.h264_create_sei_memory(start_code_prefix_length, messages)¶
- Parameters:
start_code_prefix_length (
int) – a length of start code prefix, must be 3 or 4messages ([
GstCodecParsers.H264SEIMessage]) – aGLib.ArrayofGstCodecParsers.H264SEIMessage
- Returns:
a
Gst.Memorycontaining a SEI nal unit- Return type:
Creates raw byte-stream format (a.k.a Annex B type) SEI nal unit data from messages
New in version 1.18.
- GstCodecParsers.h264_create_sei_memory_avc(nal_length_size, messages)¶
- Parameters:
nal_length_size (
int) – a size of nal length field, allowed range is [1, 4]messages ([
GstCodecParsers.H264SEIMessage]) – aGLib.ArrayofGstCodecParsers.H264SEIMessage
- Returns:
a
Gst.Memorycontaining a SEI nal unit- Return type:
Creates raw packetized format SEI nal unit data from messages
New in version 1.18.
- GstCodecParsers.h264_parse_pps(nalparser, nalu, pps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.PPSGstCodecParsers.H264NalUnitto parsepps (
GstCodecParsers.H264PPS) – TheGstCodecParsers.H264PPSto fill.
- Returns:
- Return type:
Parses data, and fills the pps structure.
The resulting pps data structure shall be deallocated with the
GstCodecParsers.H264PPS.clear() function when it is no longer needed, or prior to parsing a new PPS NAL unit.
- GstCodecParsers.h264_parse_sps(nalu, sps)¶
- Parameters:
nalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SPSGstCodecParsers.H264NalUnitto parsesps (
GstCodecParsers.H264SPS) – TheGstCodecParsers.H264SPSto fill.
- Returns:
- Return type:
Parses data, and fills the sps structure.
- GstCodecParsers.h264_parse_subset_sps(nalu, sps)¶
- Parameters:
nalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SUBSET_SPSGstCodecParsers.H264NalUnitto parsesps (
GstCodecParsers.H264SPS) – TheGstCodecParsers.H264SPSto fill.
- Returns:
- Return type:
Parses data, and fills in the sps structure.
This function fully parses data and allocates all the necessary data structures needed for MVC extensions. The resulting sps structure shall be deallocated with
GstCodecParsers.H264SPS.clear() when it is no longer needed.Note: if the caller doesn’t need any of the MVC-specific data, then
GstCodecParsers.h264_parser_parse_sps() is more efficient because those extra syntax elements are not parsed and no extra memory is allocated.New in version 1.6.
- GstCodecParsers.h264_parser_identify_and_split_nalu_avc(nalparser, data, offset, size, nal_length_size, nalus)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserdata (
int) – The data to parse, containing an AVC coded NAL unitoffset (
int) – the offset in data from which to parse the NAL unitsize (
int) – the size of datanal_length_size (
int) – the size in bytes of the AVC nal length prefix.nalus ([
GstCodecParsers.H264NalUnit]) – a caller allocatedGLib.ArrayofGstCodecParsers.H264NalUnitwhere to store parsed nal headers
- Returns:
a
GstCodecParsers.H264ParserResult- consumed:
the size of consumed bytes
- Return type:
(
GstCodecParsers.H264ParserResult, consumed:int)
Parses data for packetized (e.g., avc/avc3) 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.22.9.
- GstCodecParsers.h264_parser_identify_nalu(nalparser, data, offset, size, nalu)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserdata (
int) – The data to parse, containing an Annex B coded NAL unitoffset (
int) – the offset in data from which to parse the NAL unitsize (
int) – the size of datanalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitto store the identified NAL unit in
- Returns:
- Return type:
Parses the headers of an Annex B coded NAL unit from data and puts the result into nalu.
- GstCodecParsers.h264_parser_identify_nalu_avc(nalparser, data, offset, size, nal_length_size, nalu)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserdata (
int) – The data to parse, containing an AVC coded NAL unitoffset (
int) – the offset in data from which to parse the NAL unitsize (
int) – the size of datanal_length_size (
int) – the size in bytes of the AVC nal length prefix.nalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitto store the identified NAL unit in
- Returns:
- Return type:
Parses the headers of an AVC coded NAL unit from data and puts the result into nalu.
- GstCodecParsers.h264_parser_identify_nalu_unchecked(nalparser, data, offset, size, nalu)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserdata (
int) – The data to parseoffset (
int) – the offset from which to parse datasize (
int) – the size of datanalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitwhere to store parsed nal headers
- Returns:
- Return type:
Parses data and fills nalu from the next nalu data from data.
This differs from gst_h264_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_h264_parser_identify_nalu.
- GstCodecParsers.h264_parser_insert_sei(nalparser, au, sei)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserau (
Gst.Buffer) – aGst.Buffercontaining AU datasei (
Gst.Memory) – aGst.Memorycontaining a SEI nal
- Returns:
a SEI inserted
Gst.BufferorNoneif cannot figure out proper position to insert a sei- Return type:
Gst.BufferorNone
Copy au into new
Gst.Bufferand insert sei into theGst.Buffer. The validation for completeness of au and sei is caller’s responsibility. Both au and sei must be byte-stream formattedNew in version 1.18.
- GstCodecParsers.h264_parser_insert_sei_avc(nalparser, nal_length_size, au, sei)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernal_length_size (
int) – a size of nal length field, allowed range is [1, 4]au (
Gst.Buffer) – aGst.Buffercontaining AU datasei (
Gst.Memory) – aGst.Memorycontaining a SEI nal
- Returns:
a SEI inserted
Gst.BufferorNoneif cannot figure out proper position to insert a sei- Return type:
Gst.BufferorNone
Copy au into new
Gst.Bufferand insert sei into theGst.Buffer. The validation for completeness of au and sei is caller’s responsibility. Nal prefix type of both au and sei must be packetized, and also the size of nal length field must be identical to nal_length_sizeNew in version 1.18.
- GstCodecParsers.h264_parser_parse_decoder_config_record(nalparser, data, size)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserdata (
int) – the data to parsesize (
int) – the size of data
- Returns:
a
GstCodecParsers.H264ParserResult- config:
parsed
GstCodecParsers.H264DecoderConfigRecorddata
- Return type:
(
GstCodecParsers.H264ParserResult, config:GstCodecParsers.H264DecoderConfigRecord)
Parses AVCDecoderConfigurationRecord data and fill into config. The caller must free config via
GstCodecParsers.H264DecoderConfigRecord.free()This method does not parse SPS and PPS and therefore the caller needs to parse each NAL unit via appropriate parsing method.
New in version 1.22.
- GstCodecParsers.h264_parser_parse_nal(nalparser, nalu)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitto 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 nalparser is up to date.
- GstCodecParsers.h264_parser_parse_pps(nalparser, nalu, pps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.PPSGstCodecParsers.H264NalUnitto parsepps (
GstCodecParsers.H264PPS) – TheGstCodecParsers.H264PPSto fill.
- Returns:
- Return type:
Parses nalu containing a Picture Parameter Set, and fills pps.
The resulting pps data structure must be deallocated by the caller using
GstCodecParsers.H264PPS.clear().
- GstCodecParsers.h264_parser_parse_sei(nalparser, nalu, messages)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SEIGstCodecParsers.H264NalUnitto parsemessages ([
GstCodecParsers.H264SEIMessage]) – TheGLib.ArrayofGstCodecParsers.H264SEIMessageto fill. The caller must free it when done.
- Returns:
- Return type:
Parses nalu containing one or more Supplementary Enhancement Information messages, and allocates and fills the messages array.
- GstCodecParsers.h264_parser_parse_slice_hdr(nalparser, nalu, slice, parse_pred_weight_table, parse_dec_ref_pic_marking)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SLICEtoGstCodecParsers.H264NalUnitType.SLICE_IDRGstCodecParsers.H264NalUnitto parseslice (
GstCodecParsers.H264SliceHdr) – TheGstCodecParsers.H264SliceHdrto fill.parse_pred_weight_table (
bool) – Whether to parse the pred_weight_table or notparse_dec_ref_pic_marking (
bool) – Whether to parse the dec_ref_pic_marking or not
- Returns:
- Return type:
Parses nalu containing a coded slice, and fills slice.
- GstCodecParsers.h264_parser_parse_sps(nalparser, nalu, sps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SPSGstCodecParsers.H264NalUnitto parsesps (
GstCodecParsers.H264SPS) – TheGstCodecParsers.H264SPSto fill.
- Returns:
- Return type:
Parses nalu containing a Sequence Parameter Set, and fills sps.
- GstCodecParsers.h264_parser_parse_subset_sps(nalparser, nalu, sps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsernalu (
GstCodecParsers.H264NalUnit) – TheGstCodecParsers.H264NalUnitType.SUBSET_SPSGstCodecParsers.H264NalUnitto parsesps (
GstCodecParsers.H264SPS) – TheGstCodecParsers.H264SPSto fill.
- Returns:
- Return type:
Parses data, and fills in the sps structure.
This function fully parses data and allocates all the necessary data structures needed for MVC extensions. The resulting sps structure shall be deallocated with
GstCodecParsers.H264SPS.clear() when it is no longer needed.Note: if the caller doesn’t need any of the MVC-specific data, then
GstCodecParsers.h264_parser_parse_sps() is more efficient because those extra syntax elements are not parsed and no extra memory is allocated.New in version 1.6.
- GstCodecParsers.h264_parser_update_pps(nalparser, pps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParserpps (
GstCodecParsers.H264PPS) – aGstCodecParsers.H264PPS.
- Returns:
- Return type:
Replace internal Picture Parameter Set struct corresponding to id of pps with pps. nalparser will mark pps as last parsed pps.
New in version 1.18.
- GstCodecParsers.h264_parser_update_sps(nalparser, sps)¶
- Parameters:
nalparser (
GstCodecParsers.H264NalParser) – aGstCodecParsers.H264NalParsersps (
GstCodecParsers.H264SPS) – aGstCodecParsers.H264SPS.
- Returns:
- Return type:
Replace internal Sequence Parameter Set struct corresponding to id of sps with sps. nalparser will mark sps as last parsed sps.
New in version 1.18.
- GstCodecParsers.h264_profile_from_string(profile)¶
- Parameters:
profile (
str) – the descriptive name forGstCodecParsers.H264Profile- Returns:
the
GstCodecParsers.H264Profileof string orGstCodecParsers.H265Profile.INVALIDon error- Return type:
Returns a
GstCodecParsers.H264Profilefor the string.New in version 1.24.
- GstCodecParsers.h264_quant_matrix_4x4_get_raster_from_zigzag(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from zigzag scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.4.
- GstCodecParsers.h264_quant_matrix_4x4_get_zigzag_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to zigzag scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.4.
- GstCodecParsers.h264_quant_matrix_8x8_get_raster_from_zigzag(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from zigzag scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.4.
- GstCodecParsers.h264_quant_matrix_8x8_get_zigzag_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to zigzag scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.4.
- GstCodecParsers.h264_sei_clear(sei)¶
- Parameters:
sei (
GstCodecParsers.H264SEIMessage) –
sei: The
GstCodecParsers.H264SEIMessageto clear Frees allocated data in sei if any.New in version 1.18.
- GstCodecParsers.h264_slice_type_to_string(slice_type)¶
- Parameters:
slice_type (
GstCodecParsers.H264SliceType) – aGstCodecParsers.H264SliceType- Returns:
the name for slice_type or
Noneon error- Return type:
Returns the descriptive name for the
GstCodecParsers.H264SliceType.New in version 1.24.
- GstCodecParsers.h264_video_calculate_framerate(sps, field_pic_flag, pic_struct)¶
- Parameters:
sps (
GstCodecParsers.H264SPS) – Current Sequence Parameter Setfield_pic_flag (
int) – Current field_pic_flag, obtained from latest slice headerpic_struct (
int) – pic_struct value if available, 0 otherwise
- Returns:
- fps_num:
The resulting fps numerator
- fps_den:
The resulting fps denominator
- Return type:
Calculate framerate of a video sequence using sps VUI information, field_pic_flag from a slice header and pic_struct from
GstCodecParsers.H264PicTimingSEI message.If framerate is variable or can’t be determined, fps_num will be set to 0 and fps_den to 1.
- GstCodecParsers.h265_create_sei_memory(layer_id, temporal_id_plus1, start_code_prefix_length, messages)¶
- Parameters:
layer_id (
int) – a nal unit layer idtemporal_id_plus1 (
int) – a nal unit temporal identifierstart_code_prefix_length (
int) – a length of start code prefix, must be 3 or 4messages ([
GstCodecParsers.H265SEIMessage]) – aGLib.ArrayofGstCodecParsers.H265SEIMessage
- Returns:
a
Gst.Memorycontaining a PREFIX SEI nal unit- Return type:
Creates raw byte-stream format (a.k.a Annex B type) SEI nal unit data from messages
New in version 1.18.
- GstCodecParsers.h265_create_sei_memory_hevc(layer_id, temporal_id_plus1, nal_length_size, messages)¶
- Parameters:
layer_id (
int) – a nal unit layer idtemporal_id_plus1 (
int) – a nal unit temporal identifiernal_length_size (
int) – a size of nal length field, allowed range is [1, 4]messages ([
GstCodecParsers.H265SEIMessage]) – aGLib.ArrayofGstCodecParsers.H265SEIMessage
- Returns:
a
Gst.Memorycontaining a PREFIX SEI nal unit- Return type:
Creates raw packetized format SEI nal unit data from messages
New in version 1.18.
- GstCodecParsers.h265_get_profile_from_sps(sps)¶
- Parameters:
- Returns:
- Return type:
Return the H265 profile from sps.
New in version 1.20.
- GstCodecParsers.h265_parse_pps(parser, nalu, pps)¶
- Parameters:
parser (
GstCodecParsers.H265Parser) – aGstCodecParsers.H265Parsernalu (
GstCodecParsers.H265NalUnit) – TheGstCodecParsers.H265NalUnitType.PPSGstCodecParsers.H265NalUnitto parsepps (
GstCodecParsers.H265PPS) – TheGstCodecParsers.H265PPSto fill.
- Returns:
- Return type:
Parses data, and fills the pps structure.
- GstCodecParsers.h265_parse_sps(parser, nalu, sps, parse_vui_params)¶
- Parameters:
parser (
GstCodecParsers.H265Parser) –nalu (
GstCodecParsers.H265NalUnit) – TheGstCodecParsers.H265NalUnitType.SPSGstCodecParsers.H265NalUnitto parsesps (
GstCodecParsers.H265SPS) – TheGstCodecParsers.H265SPSto fill.parse_vui_params (
bool) – Whether to parse the vui_params or not
- Returns:
- Return type:
parser: The
GstCodecParsers.H265ParserParses data, and fills the sps structure.
- GstCodecParsers.h265_parse_sps_ext(parser, nalu, sps, sps_ext, parse_vui_params)¶
- Parameters:
parser (
GstCodecParsers.H265Parser) –nalu (
GstCodecParsers.H265NalUnit) – TheGstCodecParsers.H265NalUnitType.SPSGstCodecParsers.H265NalUnitto parsesps (
GstCodecParsers.H265SPS) – TheGstCodecParsers.H265SPSto fill.sps_ext (
GstCodecParsers.H265SPSEXT) – TheGstCodecParsers.H265SPSEXTmatching theGstCodecParsers.H265SPSto fill.parse_vui_params (
bool) – Whether to parse the vui_params or not
- Returns:
- Return type:
parser: The
GstCodecParsers.H265ParserParses data, and fills the sps structure.New in version 1.28.
- GstCodecParsers.h265_parse_vps(nalu, vps)¶
- Parameters:
nalu (
GstCodecParsers.H265NalUnit) – TheGstCodecParsers.H265NalUnitType.VPSGstCodecParsers.H265NalUnitto parsevps (
GstCodecParsers.H265VPS) – TheGstCodecParsers.H265VPSto fill.
- Returns:
- Return type:
Parses data, and fills the vps structure.
- GstCodecParsers.h265_profile_from_string(string)¶
- Parameters:
string (
str) – the descriptive name forGstCodecParsers.H265Profile- Returns:
the
GstCodecParsers.H265Profileof string orGstCodecParsers.H265Profile.INVALIDon error- Return type:
Returns a
GstCodecParsers.H265Profilefor the string.New in version 1.18.
- GstCodecParsers.h265_profile_to_string(profile)¶
- Parameters:
profile (
GstCodecParsers.H265Profile) – aGstCodecParsers.H265Profile- Returns:
the name for profile or
Noneon error- Return type:
Returns the descriptive name for the
GstCodecParsers.H265Profile.New in version 1.18.
- GstCodecParsers.h265_quant_matrix_4x4_get_raster_from_uprightdiagonal(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from uprightdiagonal scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_4x4_get_raster_from_zigzag(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from zigzag scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_4x4_get_uprightdiagonal_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to uprightdiagonal scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_4x4_get_zigzag_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to zigzag scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_8x8_get_raster_from_uprightdiagonal(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from uprightdiagonal scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_8x8_get_raster_from_zigzag(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from zigzag scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_8x8_get_uprightdiagonal_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to uprightdiagonal scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_quant_matrix_8x8_get_zigzag_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to zigzag scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.6.
- GstCodecParsers.h265_sei_copy(dest_sei, src_sei)¶
- Parameters:
dest_sei (
GstCodecParsers.H265SEIMessage) – The destinationGstCodecParsers.H265SEIMessageto copy intosrc_sei (
GstCodecParsers.H265SEIMessage) – The sourceGstCodecParsers.H265SEIMessageto copy from
- Returns:
- Return type:
Copies src_sei into dst_sei
- GstCodecParsers.h265_sei_free(sei)¶
- Parameters:
sei (
GstCodecParsers.H265SEIMessage) –
sei: The
GstCodecParsers.H265SEIMessageto free Frees sei fields.
- GstCodecParsers.h265_slice_type_to_string(slice_type)¶
- Parameters:
slice_type (
GstCodecParsers.H265SliceType) – aGstCodecParsers.H265SliceType- Returns:
the name for slice_type or
Noneon error- Return type:
Returns the descriptive name for the
GstCodecParsers.H265SliceType.New in version 1.24.
- GstCodecParsers.h266_parse_aps(parser, nalu, aps)¶
- Parameters:
parser (
GstCodecParsers.H266Parser) – aGstCodecParsers.H266Parsernalu (
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.
- GstCodecParsers.h266_parse_pps(parser, nalu, pps)¶
- Parameters:
parser (
GstCodecParsers.H266Parser) – aGstCodecParsers.H266Parsernalu (
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.
- GstCodecParsers.h266_parse_sps(parser, nalu, sps)¶
- Parameters:
parser (
GstCodecParsers.H266Parser) – TheGstCodecParsers.H266Parsernalu (
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.
- GstCodecParsers.h266_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.
- GstCodecParsers.h266_profile_from_string(string)¶
- Parameters:
string (
str) – the descriptive name forGstCodecParsers.H266Profile- Returns:
the
GstCodecParsers.H266Profileof string orGstCodecParsers.H266Profile.INVALIDon error- Return type:
Returns a
GstCodecParsers.H266Profilefor the string.New in version 1.26.
- GstCodecParsers.h266_profile_to_string(profile)¶
- Parameters:
profile (
GstCodecParsers.H266Profile) – aGstCodecParsers.H266Profile- Returns:
the name for profile or
Noneon error- Return type:
Returns the descriptive name for the
GstCodecParsers.H266Profile.New in version 1.26.
- GstCodecParsers.jpeg2000_colorspace_from_string(colorspace_string)¶
- Parameters:
colorspace_string (
str) –- Return type:
- GstCodecParsers.jpeg2000_colorspace_to_string(colorspace)¶
- Parameters:
colorspace (
GstCodecParsers.JPEG2000Colorspace) –- Return type:
- GstCodecParsers.jpeg2000_sampling_from_string(sampling_string)¶
- Parameters:
sampling_string (
str) –- Return type:
- GstCodecParsers.jpeg2000_sampling_is_mono(sampling)¶
- Parameters:
sampling (
GstCodecParsers.JPEG2000Sampling) –- Return type:
- GstCodecParsers.jpeg2000_sampling_is_rgb(sampling)¶
- Parameters:
sampling (
GstCodecParsers.JPEG2000Sampling) –- Return type:
- GstCodecParsers.jpeg2000_sampling_is_yuv(sampling)¶
- Parameters:
sampling (
GstCodecParsers.JPEG2000Sampling) –- Return type:
- GstCodecParsers.jpeg2000_sampling_to_string(sampling)¶
- Parameters:
sampling (
GstCodecParsers.JPEG2000Sampling) –- Return type:
- GstCodecParsers.jpeg_bit_writer_frame_header(frame_hdr, marker, size)¶
- Parameters:
frame_hdr (
GstCodecParsers.JpegFrameHdr) – the frame header ofGstCodecParsers.JpegFrameHdrto writemarker (
GstCodecParsers.JpegMarker) – theGstCodecParsers.JpegMarkerid for this segmentsize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the bit stream generated by this frame header
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the according JPEG bit stream by providing the frame header.
New in version 1.26.
- GstCodecParsers.jpeg_bit_writer_huffman_table(huff_tables, size)¶
- Parameters:
huff_tables (
GstCodecParsers.JpegHuffmanTables) – the huffman tables ofGstCodecParsers.JpegHuffmanTablesto writesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the bit stream generated by the huffman tables
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the according JPEG bit stream by providing the huffman tables.
New in version 1.26.
- GstCodecParsers.jpeg_bit_writer_quantization_table(quant_tables, size)¶
- Parameters:
quant_tables (
GstCodecParsers.JpegQuantTables) – the quantization tables ofGstCodecParsers.JpegQuantTablesto writesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the bit stream generated by the quantization tables
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the according JPEG bit stream by providing the quantization tables.
New in version 1.26.
- GstCodecParsers.jpeg_bit_writer_restart_interval(interval, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the bit stream generated by the interval value
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the according JPEG bit stream by providing the interval value.
New in version 1.26.
- GstCodecParsers.jpeg_bit_writer_scan_header(scan_hdr, size)¶
- Parameters:
scan_hdr (
GstCodecParsers.JpegScanHdr) – the scan header ofGstCodecParsers.JpegScanHdrto writesize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the bit stream generated by this scan header
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the according JPEG bit stream by providing the scan header.
New in version 1.26.
- GstCodecParsers.jpeg_bit_writer_segment_with_data(marker, seg_data, seg_size, size)¶
- Parameters:
marker (
GstCodecParsers.JpegMarker) – theGstCodecParsers.JpegMarkerid for this segmentseg_size (
int) – the size of the segment datasize (
int) – the size in bytes of the input and output
- Returns:
a
GstCodecParsers.JpegBitWriterResult- data:
the generated bit stream of this segment
- size:
the size in bytes of the input and output
- Return type:
(
GstCodecParsers.JpegBitWriterResult, data:int, size:int)
Generating the bit stream for a JPEG segment.
New in version 1.26.
- GstCodecParsers.jpeg_get_default_huffman_tables()¶
- Returns:
The default DC/AC Huffman tables to fill in
- Return type:
huff_tables:
GstCodecParsers.JpegHuffmanTables
Fills in huf_tables with the default AC/DC Huffman tables, as specified by the JPEG standard.
New in version 1.6.
- GstCodecParsers.jpeg_get_default_quantization_tables(quant_tables)¶
- Parameters:
quant_tables (
GstCodecParsers.JpegQuantTables) –
- GstCodecParsers.jpeg_parse(data, size, offset)¶
- Parameters:
- Returns:
Trueif a packet start code was found.- seg:
pointer to a
GstCodecParsers.JpegSegmentstructure to fill in
- Return type:
(
bool, seg:GstCodecParsers.JpegSegment)
Parses the JPEG bitstream contained in data, and returns the detected segment as a
GstCodecParsers.JpegSegment.Note that a valid segment may be returned with a length that exceeds the available data. It is up to the caller to make sure there’s enough data available when parsing the segment.
New in version 1.6.
- GstCodecParsers.lcevc_meta_api_get_type()¶
- Returns:
the
GObject.GTypeof the LCEVC meta API.- Return type:
Gets the
GObject.GTypeof the LCEVC meta API.New in version 1.26.
- GstCodecParsers.lcevc_meta_get_info()¶
- Returns:
the
GstCodecParsers.LcevcMetaof the LCEVC meta.- Return type:
Gets the
Gst.MetaInfoof the LCEVC meta.New in version 1.26.
- GstCodecParsers.mpeg4_parse(packet, skip_user_data, vop, data, offset, size)¶
- Parameters:
packet (
GstCodecParsers.Mpeg4Packet) – TheGstCodecParsers.Mpeg4Packetto fillskip_user_data (
bool) –Trueto skip user data packetFalseotherwisevop (
GstCodecParsers.Mpeg4VideoObjectPlane) – The last parsedGstCodecParsers.Mpeg4VideoObjectPlaneorNoneif you do not need to detect the resync codes.data (
int) – The data to parseoffset (
int) – offset from which to start the parsingsize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data and fills packet with the information of the next packet found.
- GstCodecParsers.mpeg4_parse_group_of_vop(gov, data, size)¶
- Parameters:
gov (
GstCodecParsers.Mpeg4GroupOfVOP) – TheGstCodecParsers.Mpeg4GroupOfVOPstructure to filldata (
int) – The data to parsesize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data containing the group of video object plane packet, and fills the gov structure.
- GstCodecParsers.mpeg4_parse_video_object_layer(vol, vo, data, size)¶
- Parameters:
vol (
GstCodecParsers.Mpeg4VideoObjectLayer) – TheGstCodecParsers.Mpeg4VideoObjectLayerstructure to fillvo (
GstCodecParsers.Mpeg4VisualObject) – TheGstCodecParsers.Mpeg4VisualObjectcurrently being parsed orNonedata (
int) – The data to parsesize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data containing the video object layer packet, and fills the vol structure.
- GstCodecParsers.mpeg4_parse_video_object_plane(vop, sprite_trajectory, vol, data, size)¶
- Parameters:
vop (
GstCodecParsers.Mpeg4VideoObjectPlane) – TheGstCodecParsers.Mpeg4VideoObjectPlanecurrently being parsedsprite_trajectory (
GstCodecParsers.Mpeg4SpriteTrajectory) – AGstCodecParsers.Mpeg4SpriteTrajectoryto fill orNonevol (
GstCodecParsers.Mpeg4VideoObjectLayer) – TheGstCodecParsers.Mpeg4VideoObjectLayerstructure to filldata (
int) – The data to parsesize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data containing the video object plane packet, and fills the vol structure.
- GstCodecParsers.mpeg4_parse_video_packet_header(videopackethdr, vol, vop, sprite_trajectory, data, size)¶
- Parameters:
videopackethdr (
GstCodecParsers.Mpeg4VideoPacketHdr) – TheGstCodecParsers.Mpeg4VideoPacketHdrstructure to fillvol (
GstCodecParsers.Mpeg4VideoObjectLayer) – The last parsedGstCodecParsers.Mpeg4VideoObjectLayer, will be updated with the information found during the parsingvop (
GstCodecParsers.Mpeg4VideoObjectPlane) – The last parsedGstCodecParsers.Mpeg4VideoObjectPlane, will be updated with the information found during the parsingsprite_trajectory (
GstCodecParsers.Mpeg4SpriteTrajectory) – AGstCodecParsers.Mpeg4SpriteTrajectoryto fill orNonewith the information found during the parsingdata (
int) – The data to parse, should be set after the resync marker.size (
int) – The size of the data to parse
- Return type:
Parsers data containing the video packet header and fills the videopackethdr structure
- GstCodecParsers.mpeg4_parse_video_plane_short_header(shorthdr, data, size)¶
- Parameters:
shorthdr (
GstCodecParsers.Mpeg4VideoPlaneShortHdr) –data (
int) –size (
int) –
- Return type:
- GstCodecParsers.mpeg4_parse_visual_object(vo, signal_type, data, size)¶
- Parameters:
vo (
GstCodecParsers.Mpeg4VisualObject) – TheGstCodecParsers.Mpeg4VisualObjectstructure to fillsignal_type (
GstCodecParsers.Mpeg4VideoSignalType) – TheGstCodecParsers.Mpeg4VideoSignalTypeto fill orNonedata (
int) – The data to parse, should contain the vo_start_code but not the start code prefixsize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data containing the visual object packet, and fills the vo structure.
- GstCodecParsers.mpeg4_parse_visual_object_sequence(vos, data, size)¶
- Parameters:
vos (
GstCodecParsers.Mpeg4VisualObjectSequence) – TheGstCodecParsers.Mpeg4VisualObjectSequencestructure to filldata (
int) – The data to parse, should contain the visual_object_sequence_start_code but not the start code prefixsize (
int) – The size of the data to parse
- Returns:
- Return type:
Parses data containing the visual object sequence packet, and fills the vos structure.
- GstCodecParsers.mpeg_video_finalise_mpeg2_sequence_header(hdr, seqext, displayext)¶
- Parameters:
seqext (
GstCodecParsers.MpegVideoSequenceExt) –displayext (
GstCodecParsers.MpegVideoSequenceDisplayExt) –
- Return type:
- GstCodecParsers.mpeg_video_meta_api_get_type()¶
- Return type:
- GstCodecParsers.mpeg_video_meta_get_info()¶
- Return type:
- GstCodecParsers.mpeg_video_parse(packet, data, size, offset)¶
- Parameters:
packet (
GstCodecParsers.MpegVideoPacket) – aGstCodecParsers.MpegVideoPacketto fill with the data and offset of the next packet founddata (
int) – The data to parsesize (
int) – The size of dataoffset (
int) – The offset from which to start parsing
- Returns:
- Return type:
Parses the MPEG 1/2 video bitstream contained in data, and returns the offset, and if known also the size, in packet. This function will scan the data to find the next packet if needed.
- GstCodecParsers.mpeg_video_quant_matrix_get_raster_from_zigzag(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from zigzag scan order to raster scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.2.
- GstCodecParsers.mpeg_video_quant_matrix_get_zigzag_from_raster(quant)¶
- Parameters:
quant (
int) – The source quantization matrix- Returns:
The resulting quantization matrix
- Return type:
out_quant:
int
Converts quantization matrix quant from raster scan order to zigzag scan order and store the resulting factors into out_quant.
Note: it is an error to pass the same table in both quant and out_quant arguments.
New in version 1.2.
- GstCodecParsers.vc1_bitplanes_ensure_size(bitplanes, seqhdr)¶
- Parameters:
bitplanes (
GstCodecParsers.VC1BitPlanes) – TheGstCodecParsers.VC1BitPlanesto resetseqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrfrom which to set bitplanes
- Returns:
- Return type:
Fills the bitplanes structure from seqhdr, this function should be called after
GstCodecParsers.vc1_parse_sequence_headerif in simple or main mode, or afterGstCodecParsers.vc1_parse_entry_point_headerif in advanced mode.
- GstCodecParsers.vc1_bitplanes_free(bitplanes)¶
- Parameters:
bitplanes (
GstCodecParsers.VC1BitPlanes) –
- GstCodecParsers.vc1_bitplanes_free_1(bitplanes)¶
- Parameters:
bitplanes (
GstCodecParsers.VC1BitPlanes) –
- GstCodecParsers.vc1_identify_next_bdu(data, size)¶
- Parameters:
- Returns:
a
GstCodecParsers.VC1ParserResult- bdu:
The
GstCodecParsers.VC1BDUwhere to store parsed bdu headers
- Return type:
(
GstCodecParsers.VC1ParserResult, bdu:GstCodecParsers.VC1BDU)
Parses data and fills bdu fields
- GstCodecParsers.vc1_parse_entry_point_header(data, size, seqhdr)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of dataseqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrcurrently being parsed
- Returns:
a
GstCodecParsers.VC1EntryPointHdr- entrypoint:
The
GstCodecParsers.VC1EntryPointHdrto set.
- Return type:
(
GstCodecParsers.VC1ParserResult, entrypoint:GstCodecParsers.VC1EntryPointHdr)
Parses data, and sets entrypoint fields.
- GstCodecParsers.vc1_parse_field_header(data, size, fieldhdr, seqhdr, bitplanes)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of datafieldhdr (
GstCodecParsers.VC1FrameHdr) – TheGstCodecParsers.VC1FrameHdrto fill.seqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrcurrently being parsedbitplanes (
GstCodecParsers.VC1BitPlanes) – TheGstCodecParsers.VC1BitPlanesto store bitplanes in orNone
- Returns:
- Return type:
Parses data, and fills fieldhdr fields.
- GstCodecParsers.vc1_parse_frame_header(data, size, framehdr, seqhdr, bitplanes)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of dataframehdr (
GstCodecParsers.VC1FrameHdr) – TheGstCodecParsers.VC1FrameHdrto fill.seqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrcurrently being parsedbitplanes (
GstCodecParsers.VC1BitPlanes) – TheGstCodecParsers.VC1BitPlanesto store bitplanes in orNone
- Returns:
- Return type:
Parses data, and fills entrypoint fields.
- GstCodecParsers.vc1_parse_frame_layer(data, size, framelayer)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of dataframelayer (
GstCodecParsers.VC1FrameLayer) – TheGstCodecParsers.VC1FrameLayerto fill.
- Returns:
- Return type:
Parses data, and fills framelayer fields.
- GstCodecParsers.vc1_parse_sequence_header(data, size, seqhdr)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of dataseqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrto set.
- Returns:
- Return type:
Parses data, and fills seqhdr fields.
- GstCodecParsers.vc1_parse_sequence_header_struct_a(data, size, structa)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of datastructa (
GstCodecParsers.VC1SeqStructA) – TheGstCodecParsers.VC1SeqStructAto set.
- Returns:
- Return type:
Parses data, and fills structa fields.
- GstCodecParsers.vc1_parse_sequence_header_struct_b(data, size, structb)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of datastructb (
GstCodecParsers.VC1SeqStructB) – TheGstCodecParsers.VC1SeqStructBto set.
- Returns:
- Return type:
Parses data, and fills structb fields.
- GstCodecParsers.vc1_parse_sequence_header_struct_c(data, size, structc)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of datastructc (
GstCodecParsers.VC1SeqStructC) – TheGstCodecParsers.VC1SeqStructCto set.
- Returns:
- Return type:
Parses data, and fills structc fields.
- GstCodecParsers.vc1_parse_sequence_layer(data, size, seqlayer)¶
- Parameters:
data (
int) – The data to parsesize (
int) – the size of dataseqlayer (
GstCodecParsers.VC1SeqLayer) – TheGstCodecParsers.VC1SeqLayerto set.
- Returns:
- Return type:
Parses data, and fills seqlayer fields.
- GstCodecParsers.vc1_parse_slice_header(data, size, slicehdr, seqhdr)¶
- Parameters:
data (
int) – The data to parsesize (
int) – The size of dataslicehdr (
GstCodecParsers.VC1SliceHdr) – TheGstCodecParsers.VC1SliceHdrto fillseqhdr (
GstCodecParsers.VC1SeqHdr) – TheGstCodecParsers.VC1SeqHdrthat was previously parsed
- Returns:
- Return type:
Parses data, and fills slicehdr fields.
New in version 1.2.