GstPbutils.EncodingProfile¶
- Subclasses:
GstPbutils.EncodingAudioProfile
,GstPbutils.EncodingContainerProfile
,GstPbutils.EncodingVideoProfile
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
The element properties to use. Example: {properties,boolean-prop=true,string-prop=”hi”}. |
||
r/w/en |
The restriction caps to use |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GstPbutils.EncodingProfile(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The opaque base class object for all encoding profiles. This contains generic information like name, description, format and preset.
- classmethod find(targetname, profilename, category)[source]¶
- Parameters:
- Returns:
The matching
GstPbutils.EncodingProfile
orNone
.- Return type:
Find the
GstPbutils.EncodingProfile
with the specified name and category.
- classmethod from_discoverer(info)[source]¶
- Parameters:
info (
GstPbutils.DiscovererInfo
) – TheGstPbutils.DiscovererInfo
to read from- Returns:
The new
GstPbutils.EncodingProfile
orNone
.- Return type:
Creates a
GstPbutils.EncodingProfile
matching the formats from the givenGstPbutils.DiscovererInfo
. Streams other than audio or video (eg, subtitles), are currently ignored.
- copy()[source]¶
- Returns:
The copy of self
- Return type:
Makes a deep copy of self
New in version 1.12.
- get_allow_dynamic_output()[source]¶
- Return type:
Get whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
- get_element_properties()[source]¶
- Returns:
The properties that are going to be set on the underlying element
- Return type:
New in version 1.20.
- get_input_caps()[source]¶
- Returns:
The full caps the given self can consume. Call gst_caps_unref() when you are done with the caps.
- Return type:
Computes the full output caps that this self will be able to consume.
- get_presence()[source]¶
- Returns:
The number of times the profile is used in its parent container profile. If 0, it is not a mandatory stream.
- Return type:
- get_preset()[source]¶
- Returns:
the name of the
Gst.Preset
to be used in the profile. This is the name that has been set when saving the preset.- Return type:
- get_preset_name()[source]¶
- Returns:
the name of the
Gst.Preset
factory to be used in the profile.- Return type:
- get_restriction()[source]¶
- Returns:
The restriction
Gst.Caps
to apply before the encoder that will be used in the profile. The fields present in restriction caps are properties of the raw stream (that is before encoding), such as height and width for video and depth and sampling rate for audio. Does not apply toGstPbutils.EncodingContainerProfile
(since there is no corresponding raw stream). Can beNone
. Unref after usage.- Return type:
- get_single_segment()[source]¶
- Returns:
True
if the stream represented by self should use a single segment before the encoder,False
otherwise. This means that buffers will be retimestamped and segments will be eat so as to appear as one segment.- Return type:
New in version 1.18.
- is_equal(b)[source]¶
- Parameters:
b (
GstPbutils.EncodingProfile
) – aGstPbutils.EncodingProfile
- Returns:
- Return type:
Checks whether the two
GstPbutils.EncodingProfile
are equal
- set_allow_dynamic_output(allow_dynamic_output)[source]¶
- Parameters:
allow_dynamic_output (
bool
) – Whether the format that has been negotiated first can be renegotiated during the encoding
Sets whether the format that has been negotiated in at some point can be renegotiated later during the encoding.
- set_description(description)[source]¶
-
Set description as the given description for the self. A copy of description will be made internally.
- set_element_properties(element_properties)[source]¶
- Parameters:
element_properties (
Gst.Structure
) – AGst.Structure
defining the properties to be set to the element the profile represents.
This allows setting the muxing/encoding element properties.
**Set properties generically**
- `` properties
[element-properties, boolean-prop=true, string-prop=”hi”]
**Mapping properties with well known element factories**
`` properties element-properties-map, map = {
[openh264enc, gop-size=32, ], [x264enc, key-int-max=32, tune=zerolatency],
}
New in version 1.20.
- set_format(format)[source]¶
- Parameters:
format (
Gst.Caps
) – the media format to use in the profile.
Sets the media format used in the profile.
- set_name(name)[source]¶
-
Set name as the given name for the self. A copy of name will be made internally.
- set_presence(presence)[source]¶
- Parameters:
presence (
int
) – the number of time the profile can be used
Set the number of time the profile is used in its parent container profile. If 0, it is not a mandatory stream
- set_preset(preset)[source]¶
-
Sets the name of the
Gst.Element
that implements theGst.Preset
interface to use for the profile. This is the name that has been set when saving the preset.
- set_preset_name(preset_name)[source]¶
-
Sets the name of the
Gst.Preset
's factory to be used in the profile.
- set_restriction(restriction)[source]¶
-
Set the restriction
Gst.Caps
to apply before the encoder that will be used in the profile. SeeGstPbutils.EncodingProfile.get_restriction
() for more about restrictions. Does not apply toGstPbutils.EncodingContainerProfile
.
- set_single_segment(single_segment)[source]¶
- Parameters:
single_segment (
bool
) –True
if the stream represented by self should use a single segment before the encoder,False
otherwise.
If using a single segment, buffers will be retimestamped and segments will be eat so as to appear as one segment.
*NOTE*: Single segment is not property supported when using #encodebin:avoid-reencoding
New in version 1.18.
Property Details¶
- GstPbutils.EncodingProfile.props.element_properties¶
- Name:
element-properties
- Type:
- Default Value:
- Flags:
A
Gst.Structure
defining the properties to be set to the element the profile represents.For example for
av1enc
:`` element-properties,row-mt=true, end-usage=vbr ``
New in version 1.20.