GstCodecs.H264Decoder

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstVideo.VideoDecoder GstVideo.VideoDecoder Gst.Element->GstVideo.VideoDecoder Gst.Object->Gst.Element GstCodecs.H264Decoder GstCodecs.H264Decoder GstVideo.VideoDecoder->GstCodecs.H264Decoder

Subclasses:

None

Methods

Inherited:

GstVideo.VideoDecoder (43), Gst.Element (82), Gst.Object (27), GObject.Object (37)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

get_picture (system_frame_number)

set_process_ref_pic_lists (process)

Virtual Methods

Inherited:

GstVideo.VideoDecoder (21), Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_decode_slice (picture, slice, ref_pic_list0, ref_pic_list1)

do_end_picture (picture)

do_get_preferred_output_delay (live)

do_new_field_picture (first_field, second_field)

do_new_picture (frame, picture)

do_output_picture (frame, picture)

do_start_picture (picture, slice, dpb)

Properties

Inherited:

GstVideo.VideoDecoder (6), Gst.Object (2)

Name

Type

Flags

Short Description

compliance

GstCodecs.H264DecoderCompliance

r/w/c

The decoder’s behavior in compliance with the h264 spec.

Signals

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

input_state

GstVideo.VideoCodecState

r

padding

[object]

r

parent

GstVideo.VideoDecoder

r

Class Details

class GstCodecs.H264Decoder(**kwargs)
Bases:

GstVideo.VideoDecoder

Abstract:

Yes

Structure:

GstCodecs.H264DecoderClass

The opaque GstCodecs.H264Decoder data structure.

get_picture(system_frame_number)
Parameters:

system_frame_number (int) – a target system frame number of GstCodecs.H264Picture

Returns:

a GstCodecs.H264Picture if successful, or None otherwise

Return type:

GstCodecs.H264Picture or None

Retrive DPB and return a GstCodecs.H264Picture corresponding to the system_frame_number

New in version 1.18.

set_process_ref_pic_lists(process)
Parameters:

process (bool) – whether subclass is requiring reference picture modification process

Called to en/disable reference picture modification process.

New in version 1.18.

do_decode_slice(picture, slice, ref_pic_list0, ref_pic_list1) virtual
Parameters:
Return type:

Gst.FlowReturn

Provides per slice data with parsed slice header and required raw bitstream for subclass to decode it. If GstCodecs.H264Decoder.set_process_ref_pic_lists() is called with True by the subclass, ref_pic_list0 and ref_pic_list1 are non-None. In case of interlaced stream, ref_pic_list0 and ref_pic_list1 will contain only the first field of complementary reference field pair if currently being decoded picture is a frame picture. Subclasses might need to retrive the other field (i.e., the second field) of the picture if needed.

do_end_picture(picture) virtual
Parameters:

picture (GstCodecs.H264Picture) – a GstCodecs.H264Picture

Return type:

Gst.FlowReturn

Optional. Called per one GstCodecs.H264Picture to notify subclass to finish decoding process for the GstCodecs.H264Picture

do_get_preferred_output_delay(live) virtual
Parameters:

live (bool) – whether upstream is live or not

Returns:

the number of perferred delayed output frame

Return type:

int

Optional. Called by baseclass to query whether delaying output is preferred by subclass or not.

New in version 1.20.

do_new_field_picture(first_field, second_field) virtual
Parameters:
Return type:

Gst.FlowReturn

Called when a new field picture is created for interlaced field picture. Subclass can attach implementation specific user data on second_field via gst_h264_picture_set_user_data

New in version 1.20.

do_new_picture(frame, picture) virtual
Parameters:
Return type:

Gst.FlowReturn

Optional. Called whenever new GstCodecs.H264Picture is created. Subclass can set implementation specific user data on the GstCodecs.H264Picture via gst_h264_picture_set_user_data

do_output_picture(frame, picture) virtual
Parameters:
Return type:

Gst.FlowReturn

Called with a GstCodecs.H264Picture which is required to be outputted. The GstVideo.VideoCodecFrame must be consumed by subclass.

do_start_picture(picture, slice, dpb) virtual
Parameters:
Return type:

Gst.FlowReturn

Optional. Called per one GstCodecs.H264Picture to notify subclass to prepare decoding process for the GstCodecs.H264Picture

Property Details

GstCodecs.H264Decoder.props.compliance
Name:

compliance

Type:

GstCodecs.H264DecoderCompliance

Default Value:

GstCodecs.H264DecoderCompliance.AUTO

Flags:

READABLE, WRITABLE, CONSTRUCT

The compliance controls the behavior of the decoder to handle some subtle cases and contexts, such as the low-latency DPB bumping or mapping the baseline profile as the constrained-baseline profile, etc.

New in version 1.20.