GstCodecs.H264Decoder¶
- Subclasses:
 None
Methods¶
- Inherited:
 GstVideo.VideoDecoder (43), Gst.Element (82), Gst.Object (27), GObject.Object (37)
- Structs:
 
  | 
|
  | 
Virtual Methods¶
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Properties¶
- Inherited:
 
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/c  | 
The decoder’s behavior in compliance with the h264 spec.  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
input_state  | 
r  | 
||
padding  | 
[  | 
r  | 
|
parent  | 
r  | 
Class Details¶
- class GstCodecs.H264Decoder(**kwargs)¶
 - Bases:
 - Abstract:
 Yes
- Structure:
 
The opaque
GstCodecs.H264Decoderdata structure.- get_picture(system_frame_number)¶
 - Parameters:
 system_frame_number (
int) – a target system frame number ofGstCodecs.H264Picture- Returns:
 a
GstCodecs.H264Pictureif successful, orNoneotherwise- Return type:
 
Retrive DPB and return a
GstCodecs.H264Picturecorresponding to the system_frame_numberNew 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:
 picture (
GstCodecs.H264Picture) – aGstCodecs.H264Pictureslice (
GstCodecs.H264Slice) – aGstCodecs.H264Sliceref_pic_list0 ([
GstCodecs.H264Picture]) – an array ofGstCodecs.H264Picturepointersref_pic_list1 ([
GstCodecs.H264Picture]) – an array ofGstCodecs.H264Picturepointers
- Return type:
 
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 withTrueby 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) – aGstCodecs.H264Picture- Return type:
 
Optional. Called per one
GstCodecs.H264Pictureto notify subclass to finish decoding process for theGstCodecs.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:
 
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:
 first_field (
GstCodecs.H264Picture) – the first fieldGstCodecs.H264Picturealready decodedsecond_field (
GstCodecs.H264Picture) – aGstCodecs.H264Picturefor the second field
- Return type:
 
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:
 frame (
GstVideo.VideoCodecFrame) – aGstVideo.VideoCodecFramepicture (
GstCodecs.H264Picture) – aGstCodecs.H264Picture
- Return type:
 
Optional. Called whenever new
GstCodecs.H264Pictureis created. Subclass can set implementation specific user data on theGstCodecs.H264Picturevia gst_h264_picture_set_user_data
- do_output_picture(frame, picture) virtual¶
 - Parameters:
 frame (
GstVideo.VideoCodecFrame) – aGstVideo.VideoCodecFramepicture (
GstCodecs.H264Picture) – aGstCodecs.H264Picture
- Return type:
 
Called with a
GstCodecs.H264Picturewhich is required to be outputted. TheGstVideo.VideoCodecFramemust be consumed by subclass.
- do_start_picture(picture, slice, dpb) virtual¶
 - Parameters:
 picture (
GstCodecs.H264Picture) – aGstCodecs.H264Pictureslice (
GstCodecs.H264Slice) – aGstCodecs.H264Slicedpb (
GstCodecs.H264Dpb) – aGstCodecs.H264Dpb
- Return type:
 
Optional. Called per one
GstCodecs.H264Pictureto notify subclass to prepare decoding process for theGstCodecs.H264Picture
Property Details¶
- GstCodecs.H264Decoder.props.compliance¶
 - Name:
 compliance- Type:
 - Default Value:
 - Flags:
 
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.