Functions¶
Details¶
- GstPbutils.codec_utils_aac_caps_set_level_and_profile(caps, audio_config)[source]¶
-
Sets the level and profile on caps if it can be determined from audio_config. See
GstPbutils.codec_utils_aac_get_level
() andGstPbutils.codec_utils_aac_get_profile
() for more details on the parameters. caps must be audio/mpeg caps with an “mpegversion” field of either 2 or 4. If mpegversion is 4, the “base-profile” field is also set in caps.
- GstPbutils.codec_utils_aac_get_channels(audio_config)[source]¶
- Parameters:
audio_config (
bytes
) – a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.- Returns:
The channels or 0 if the channel could not be determined.
- Return type:
Returns the channels of the given AAC stream.
New in version 1.10.
- GstPbutils.codec_utils_aac_get_index_from_sample_rate(rate)[source]¶
- Parameters:
rate (
int
) – Sample rate- Returns:
The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.
- Return type:
Translates the sample rate to the index corresponding to it in AAC spec.
- GstPbutils.codec_utils_aac_get_level(audio_config)[source]¶
- Parameters:
audio_config (
bytes
) – a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.- Returns:
The level as a const string and
None
if the level could not be determined.- Return type:
Determines the level of a stream as defined in ISO/IEC 14496-3. For AAC LC streams, the constraints from the AAC audio profile are applied. For AAC Main, LTP, SSR and others, the Main profile is used.
The audio_config parameter follows the following format, starting from the most significant bit of the first byte:
Bit 0:4 contains the AudioObjectType (if this is 0x5, then the real AudioObjectType is carried after the rate and channel data)
Bit 5:8 contains the sample frequency index (if this is 0xf, then the next 24 bits define the actual sample frequency, and subsequent fields are appropriately shifted).
Bit 9:12 contains the channel configuration
- GstPbutils.codec_utils_aac_get_profile(audio_config)[source]¶
- Parameters:
audio_config (
bytes
) – a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.- Returns:
The profile as a const string and
None
if the profile could not be determined.- Return type:
Returns the profile of the given AAC stream as a string. The profile is normally determined using the AudioObjectType field which is in the first 5 bits of audio_config
- GstPbutils.codec_utils_aac_get_sample_rate(audio_config)[source]¶
- Parameters:
audio_config (
bytes
) – a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.- Returns:
The sample rate if sr_idx is valid, 0 otherwise.
- Return type:
Translates the sample rate index found in AAC headers to the actual sample rate.
New in version 1.10.
- GstPbutils.codec_utils_aac_get_sample_rate_from_index(sr_idx)[source]¶
- Parameters:
sr_idx (
int
) – Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header- Returns:
The sample rate if sr_idx is valid, 0 otherwise.
- Return type:
Translates the sample rate index found in AAC headers to the actual sample rate.
- GstPbutils.codec_utils_caps_from_mime_codec(codecs_field)[source]¶
- Parameters:
codecs_field (
str
) – A mime codec string field- Returns:
- Return type:
Converts a RFC 6381 compatible codec string to
Gst.Caps
. More than one codec string can be present (separated by,
).Registered codecs can be found at http://mp4ra.org/#/codecs
New in version 1.22.
- GstPbutils.codec_utils_caps_get_mime_codec(caps)[source]¶
- Parameters:
- Returns:
a RFC 6381 compatible codec string or
None
- Return type:
Converts caps to a RFC 6381 compatible codec string if possible.
Useful for providing the ‘codecs’ field inside the ‘Content-Type’ HTTP header for containerized formats, such as mp4 or matroska.
Registered codecs can be found at http://mp4ra.org/#/codecs
New in version 1.20.
- GstPbutils.codec_utils_h264_caps_set_level_and_profile(caps, sps)[source]¶
-
Sets the level and profile in caps if it can be determined from sps. See
GstPbutils.codec_utils_h264_get_level
() andGstPbutils.codec_utils_h264_get_profile
() for more details on the parameters.
- GstPbutils.codec_utils_h264_get_level(sps)[source]¶
- Parameters:
sps (
bytes
) – Pointer to the sequence parameter set for the stream.- Returns:
The level as a const string, or
None
if there is an error.- Return type:
Converts the level indication (level_idc) in the stream’s sequence parameter set into a string. The SPS is expected to have the same format as for
GstPbutils.codec_utils_h264_get_profile
().
- GstPbutils.codec_utils_h264_get_level_idc(level)[source]¶
- Parameters:
level (
str
) – A level string from caps- Returns:
the level_idc or 0 if the level is unknown
- Return type:
Transform a level string from the caps into the level_idc
- GstPbutils.codec_utils_h264_get_profile(sps)[source]¶
- Parameters:
sps (
bytes
) – Pointer to the sequence parameter set for the stream.- Returns:
The profile as a const string, or
None
if there is an error.- Return type:
Converts the profile indication (profile_idc) in the stream’s sequence parameter set into a string. The SPS is expected to have the following format, as defined in the H.264 specification. The SPS is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.
Bit 0:7 - Profile indication
Bit 8 - constraint_set0_flag
Bit 9 - constraint_set1_flag
Bit 10 - constraint_set2_flag
Bit 11 - constraint_set3_flag
Bit 12 - constraint_set3_flag
Bit 13:15 - Reserved
Bit 16:24 - Level indication
- GstPbutils.codec_utils_h264_get_profile_flags_level(codec_data)[source]¶
- Parameters:
codec_data (
bytes
) – H264 AVCC extradata- Returns:
- Return type:
Parses profile, flags, and level from a H264 AVCC extradata/sequence_header. These are most commonly retrieved from a video/x-h264 caps with a codec_data buffer.
The format of H264 AVCC extradata/sequence_header is documented in the ITU-T H.264 specification section 7.3.2.1.1 as well as in ISO/IEC 14496-15 section 5.3.3.1.2.
New in version 1.20.
- GstPbutils.codec_utils_h265_caps_set_level_tier_and_profile(caps, profile_tier_level)[source]¶
-
Sets the level, tier and profile in caps if it can be determined from profile_tier_level. See
GstPbutils.codec_utils_h265_get_level
(),GstPbutils.codec_utils_h265_get_tier
() andGstPbutils.codec_utils_h265_get_profile
() for more details on the parameters.New in version 1.4.
- GstPbutils.codec_utils_h265_get_level(profile_tier_level)[source]¶
- Parameters:
profile_tier_level (
bytes
) – Pointer to the profile_tier_level for the stream- Returns:
The level as a const string, or
None
if there is an error.- Return type:
Converts the level indication (general_level_idc) in the stream’s profile_tier_level structure into a string. The profiel_tier_level is expected to have the same format as for
GstPbutils.codec_utils_h264_get_profile
().New in version 1.4.
- GstPbutils.codec_utils_h265_get_level_idc(level)[source]¶
- Parameters:
level (
str
) – A level string from caps- Returns:
the level_idc or 0 if the level is unknown
- Return type:
Transform a level string from the caps into the level_idc
New in version 1.4.
- GstPbutils.codec_utils_h265_get_profile(profile_tier_level)[source]¶
- Parameters:
profile_tier_level (
bytes
) – Pointer to the profile_tier_level structure for the stream.- Returns:
The profile as a const string, or
None
if there is an error.- Return type:
Converts the profile indication (general_profile_idc) in the stream’s profile_level_tier structure into a string. The profile_tier_level is expected to have the following format, as defined in the H.265 specification. The profile_tier_level is viewed as a bitstream here, with bit 0 being the most significant bit of the first byte.
Bit 0:1 - general_profile_space
Bit 2 - general_tier_flag
Bit 3:7 - general_profile_idc
Bit 8:39 - gernal_profile_compatibility_flags
Bit 40 - general_progressive_source_flag
Bit 41 - general_interlaced_source_flag
Bit 42 - general_non_packed_constraint_flag
Bit 43 - general_frame_only_constraint_flag
Bit 44:87 - See below
Bit 88:95 - general_level_idc
New in version 1.4.
- GstPbutils.codec_utils_h265_get_tier(profile_tier_level)[source]¶
- Parameters:
profile_tier_level (
bytes
) – Pointer to the profile_tier_level for the stream.- Returns:
The tier as a const string, or
None
if there is an error.- Return type:
Converts the tier indication (general_tier_flag) in the stream’s profile_tier_level structure into a string. The profile_tier_level is expected to have the same format as for
GstPbutils.codec_utils_h264_get_profile
().New in version 1.4.
- GstPbutils.codec_utils_mpeg4video_caps_set_level_and_profile(caps, vis_obj_seq)[source]¶
-
Sets the level and profile in caps if it can be determined from vis_obj_seq. See
GstPbutils.codec_utils_mpeg4video_get_level
() andGstPbutils.codec_utils_mpeg4video_get_profile
() for more details on the parameters.
- GstPbutils.codec_utils_mpeg4video_get_level(vis_obj_seq)[source]¶
- Parameters:
vis_obj_seq (
bytes
) – Pointer to the visual object sequence for the stream.- Returns:
The level as a const string, or
None
if there is an error.- Return type:
Converts the level indication in the stream’s visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.
- GstPbutils.codec_utils_mpeg4video_get_profile(vis_obj_seq)[source]¶
- Parameters:
vis_obj_seq (
bytes
) – Pointer to the visual object sequence for the stream.- Returns:
The profile as a const string, or
None
if there is an error.- Return type:
Converts the profile indication in the stream’s visual object sequence into a string. vis_obj_seq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.
- GstPbutils.codec_utils_opus_create_caps(rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping)[source]¶
- Parameters:
- Returns:
The
Gst.Caps
, orNone
if the parameters would lead to invalid Opus caps.- Return type:
Creates Opus caps from the given parameters.
New in version 1.8.
- GstPbutils.codec_utils_opus_create_caps_from_header(header, comments)[source]¶
- Parameters:
header (
Gst.Buffer
) – OpusHead headercomments (
Gst.Buffer
orNone
) – Comment header orNone
- Returns:
The
Gst.Caps
.- Return type:
Creates Opus caps from the given OpusHead header and comment header comments.
New in version 1.8.
- GstPbutils.codec_utils_opus_create_header(rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping, pre_skip, output_gain)[source]¶
- Parameters:
rate (
int
) – the sample ratechannels (
int
) – the number of channelschannel_mapping_family (
int
) – the channel mapping familystream_count (
int
) – the number of independent streamscoupled_count (
int
) – the number of stereo streamschannel_mapping (
bytes
orNone
) – the mapping between the streamspre_skip (
int
) – Pre-skip in 48kHz samples or 0output_gain (
int
) – Output gain or 0
- Returns:
The
Gst.Buffer
containing the OpusHead.- Return type:
Gst.Buffer
orNone
Creates OpusHead header from the given parameters.
New in version 1.8.
- GstPbutils.codec_utils_opus_parse_caps(caps)[source]¶
- Parameters:
- Returns:
True
if parsing was successful,False
otherwise.- rate:
the sample rate
- channels:
the number of channels
- channel_mapping_family:
the channel mapping family
- stream_count:
the number of independent streams
- coupled_count:
the number of stereo streams
- channel_mapping:
the mapping between the streams
- Return type:
(
bool
, rate:int
, channels:int
, channel_mapping_family:int
, stream_count:int
, coupled_count:int
, channel_mapping:bytes
)
Parses Opus caps and fills the different fields with defaults if possible.
New in version 1.8.
- GstPbutils.codec_utils_opus_parse_header(header)[source]¶
- Parameters:
header (
Gst.Buffer
) – the OpusHeadGst.Buffer
- Returns:
True
if parsing was successful,False
otherwise.- rate:
the sample rate
- channels:
the number of channels
- channel_mapping_family:
the channel mapping family
- stream_count:
the number of independent streams
- coupled_count:
the number of stereo streams
- channel_mapping:
the mapping between the streams
- pre_skip:
Pre-skip in 48kHz samples or 0
- output_gain:
Output gain or 0
- Return type:
(
bool
, rate:int
, channels:int
, channel_mapping_family:int
, stream_count:int
, coupled_count:int
, channel_mapping:bytes
, pre_skip:int
, output_gain:int
)
Parses the OpusHead header.
New in version 1.8.
- GstPbutils.encoding_list_all_targets(categoryname)[source]¶
- Parameters:
categoryname (
str
orNone
) – The category, for ex:GstPbutils.ENCODING_CATEGORY_DEVICE
. Can beNone
.- Returns:
The list of
GstPbutils.EncodingTarget
- Return type:
List all available
GstPbutils.EncodingTarget
for the specified category, or all categories if categoryname isNone
.
- GstPbutils.encoding_list_available_categories()[source]¶
- Returns:
A list of
GstPbutils.EncodingTarget
categories.- Return type:
[
str
]
Lists all
GstPbutils.EncodingTarget
categories present on disk.
- GstPbutils.install_plugins_async(details, ctx, func, *user_data)[source]¶
- Parameters:
details ([
str
]) –None
-terminated array of installer string details (see below)ctx (
GstPbutils.InstallPluginsContext
orNone
) – aGstPbutils.InstallPluginsContext
, orNone
func (
GstPbutils.InstallPluginsResultFunc
) – the function to call when the installer program returnsuser_data (
object
orNone
) – the user data to pass to func when called, orNone
- Returns:
result code whether an external installer could be started
- Return type:
Requests plugin installation without blocking. Once the plugins have been installed or installation has failed, func will be called with the result of the installation and your provided user_data pointer.
This function requires a running GLib/Gtk main loop. If you are not running a GLib/Gtk main loop, make sure to regularly call
GLib.MainContext.iteration
(None
,:obj:False).The installer strings that make up detail are typically obtained by calling
GstPbutils.missing_plugin_message_get_installer_detail
() on missing-plugin messages that have been caught on a pipeline’s bus or created by the application via the provided API, such asGstPbutils.missing_element_message_new
().It is possible to request the installation of multiple missing plugins in one go (as might be required if there is a demuxer for a certain format installed but no suitable video decoder and no suitable audio decoder).
- GstPbutils.install_plugins_installation_in_progress()[source]¶
-
Checks whether plugin installation (initiated by this application only) is currently in progress.
- GstPbutils.install_plugins_return_get_name(ret)[source]¶
- Parameters:
ret (
GstPbutils.InstallPluginsReturn
) – the return status code- Returns:
a descriptive string for the status code in ret
- Return type:
Convenience function to return the descriptive string associated with a status code. This function returns English strings and should not be used for user messages. It is here only to assist in debugging.
- GstPbutils.install_plugins_supported()[source]¶
-
Checks whether plugin installation is likely to be supported by the current environment. This currently only checks whether the helper script that is to be provided by the distribution or operating system vendor exists.
- GstPbutils.install_plugins_sync(details, ctx)[source]¶
- Parameters:
details ([
str
]) –None
-terminated array of installer string detailsctx (
GstPbutils.InstallPluginsContext
orNone
) – aGstPbutils.InstallPluginsContext
, orNone
- Returns:
the result of the installation.
- Return type:
Requests plugin installation and block until the plugins have been installed or installation has failed.
This function should almost never be used, it only exists for cases where a non-GLib main loop is running and the user wants to run it in a separate thread and marshal the result back asynchronously into the main thread using the other non-GLib main loop. You should almost always use
GstPbutils.install_plugins_async
() instead of this function.
- GstPbutils.is_missing_plugin_message(msg)[source]¶
- Parameters:
msg (
Gst.Message
) – aGst.Message
- Returns:
- Return type:
Checks whether msg is a missing plugins message.
- GstPbutils.missing_decoder_installer_detail_new(decode_caps)[source]¶
- Parameters:
decode_caps (
Gst.Caps
) – the (fixed) caps for which a decoder element is needed- Returns:
a newly-allocated detail string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
- GstPbutils.missing_decoder_message_new(element, decode_caps)[source]¶
- Parameters:
element (
Gst.Element
) – theGst.Element
posting the messagedecode_caps (
Gst.Caps
) – the (fixed) caps for which a decoder element is needed
- Returns:
a new
Gst.Message
- Return type:
Creates a missing-plugin message for element to notify the application that a decoder element for a particular set of (fixed) caps is missing. This function is mainly for use in plugins.
- GstPbutils.missing_element_installer_detail_new(factory_name)[source]¶
- Parameters:
factory_name (
str
) – the name of the missing element (element factory), e.g. “videoscale” or “cdparanoiasrc”- Returns:
a newly-allocated detail string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
- GstPbutils.missing_element_message_new(element, factory_name)[source]¶
- Parameters:
element (
Gst.Element
) – theGst.Element
posting the messagefactory_name (
str
) – the name of the missing element (element factory), e.g. “videoscale” or “cdparanoiasrc”
- Returns:
a new
Gst.Message
- Return type:
Creates a missing-plugin message for element to notify the application that a certain required element is missing. This function is mainly for use in plugins.
- GstPbutils.missing_encoder_installer_detail_new(encode_caps)[source]¶
- Parameters:
encode_caps (
Gst.Caps
) – the (fixed) caps for which an encoder element is needed- Returns:
a newly-allocated detail string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
- GstPbutils.missing_encoder_message_new(element, encode_caps)[source]¶
- Parameters:
element (
Gst.Element
) – theGst.Element
posting the messageencode_caps (
Gst.Caps
) – the (fixed) caps for which an encoder element is needed
- Returns:
a new
Gst.Message
- Return type:
Creates a missing-plugin message for element to notify the application that an encoder element for a particular set of (fixed) caps is missing. This function is mainly for use in plugins.
- GstPbutils.missing_plugin_message_get_description(msg)[source]¶
- Parameters:
msg (
Gst.Message
) – a missing-pluginGst.Message
of typeGst.MessageType.ELEMENT
- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing the missing feature, for use in error dialogs and the like. Should never return
None
unless msg is not a valid missing-plugin message.This function is mainly for applications that need a human-readable string describing a missing plugin, given a previously collected missing-plugin message
- GstPbutils.missing_plugin_message_get_installer_detail(msg)[source]¶
- Parameters:
msg (
Gst.Message
) – a missing-pluginGst.Message
of typeGst.MessageType.ELEMENT
- Returns:
a newly-allocated detail string, or
None
on error. Free string withGLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions.
- GstPbutils.missing_uri_sink_installer_detail_new(protocol)[source]¶
- Parameters:
protocol (
str
) – the URI protocol the missing source needs to implement, e.g. “http” or “mms”- Returns:
a newly-allocated detail string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
- GstPbutils.missing_uri_sink_message_new(element, protocol)[source]¶
- Parameters:
element (
Gst.Element
) – theGst.Element
posting the messageprotocol (
str
) – the URI protocol the missing sink needs to implement, e.g. “http” or “smb”
- Returns:
a new
Gst.Message
- Return type:
Creates a missing-plugin message for element to notify the application that a sink element for a particular URI protocol is missing. This function is mainly for use in plugins.
- GstPbutils.missing_uri_source_installer_detail_new(protocol)[source]¶
- Parameters:
protocol (
str
) – the URI protocol the missing source needs to implement, e.g. “http” or “mms”- Returns:
a newly-allocated detail string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns an opaque string containing all the details about the missing element to be passed to an external installer called via
GstPbutils.install_plugins_async
() orGstPbutils.install_plugins_sync
().This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions in the case where the application knows exactly what kind of plugin it is missing.
- GstPbutils.missing_uri_source_message_new(element, protocol)[source]¶
- Parameters:
element (
Gst.Element
) – theGst.Element
posting the messageprotocol (
str
) – the URI protocol the missing source needs to implement, e.g. “http” or “mms”
- Returns:
a new
Gst.Message
- Return type:
Creates a missing-plugin message for element to notify the application that a source element for a particular URI protocol is missing. This function is mainly for use in plugins.
- GstPbutils.pb_utils_add_codec_description_to_tag_list(taglist, codec_tag, caps)[source]¶
- Parameters:
taglist (
Gst.TagList
) – aGst.TagList
codec_tag (
str
orNone
) – a GStreamer codec tag such asGst.TAG_AUDIO_CODEC
,Gst.TAG_VIDEO_CODEC
orGst.TAG_CODEC
. If none is specified, the function will attempt to detect the appropriate category.caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which a codec tag should be added.
- Returns:
- Return type:
Adds a codec tag describing the format specified by caps to taglist.
- GstPbutils.pb_utils_get_caps_description_flags(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which flags are requested- Returns:
GstPbutils.PbUtilsCapsDescriptionFlags
that describe caps, or no flags if the caps are unknown.- Return type:
Returns flags that describe the format of the caps if known. No flags are set for unknown caps.
New in version 1.20.
- GstPbutils.pb_utils_get_codec_description(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which an format description is needed- Returns:
a newly-allocated description string, or
None
on error. Free string withGLib.free
() when not needed any longer.- Return type:
Returns a localised (as far as this is possible) string describing the media format specified in caps, for use in error dialogs or other messages to be seen by the user. Should never return
None
unless caps is invalid.Also see the convenience function
GstPbutils.pb_utils_add_codec_description_to_tag_list
().
- GstPbutils.pb_utils_get_decoder_description(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which an decoder description is needed- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing an decoder for the format specified in caps, for use in error dialogs or other messages to be seen by the user.
This function is mainly for internal use, applications would typically use
GstPbutils.missing_plugin_message_get_description
() to get a description of a missing feature from a missing-plugin message.
- GstPbutils.pb_utils_get_element_description(factory_name)[source]¶
- Parameters:
factory_name (
str
) – the name of the element, e.g. “giosrc”- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing the given element, for use in error dialogs or other messages to be seen by the user.
This function is mainly for internal use, applications would typically use
GstPbutils.missing_plugin_message_get_description
() to get a description of a missing feature from a missing-plugin message.
- GstPbutils.pb_utils_get_encoder_description(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which an encoder description is needed- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing an encoder for the format specified in caps, for use in error dialogs or other messages to be seen by the user.
This function is mainly for internal use, applications would typically use
GstPbutils.missing_plugin_message_get_description
() to get a description of a missing feature from a missing-plugin message.
- GstPbutils.pb_utils_get_file_extension_from_caps(caps)[source]¶
- Parameters:
caps (
Gst.Caps
) – the (fixed)Gst.Caps
for which a file extension is needed- Returns:
a newly-allocated file extension string, or
None
on error. Free string withGLib.free
() when not needed any longer.- Return type:
Returns a possible file extension for the given caps, if known.
New in version 1.20.
- GstPbutils.pb_utils_get_sink_description(protocol)[source]¶
- Parameters:
protocol (
str
) – the protocol the sink element needs to handle, e.g. “http”- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing a sink element handling the protocol specified in protocol, for use in error dialogs or other messages to be seen by the user.
This function is mainly for internal use, applications would typically use
GstPbutils.missing_plugin_message_get_description
() to get a description of a missing feature from a missing-plugin message.
- GstPbutils.pb_utils_get_source_description(protocol)[source]¶
- Parameters:
protocol (
str
) – the protocol the source element needs to handle, e.g. “http”- Returns:
a newly-allocated description string. Free string with
GLib.free
() when not needed any longer.- Return type:
Returns a localised string describing a source element handling the protocol specified in protocol, for use in error dialogs or other messages to be seen by the user.
This function is mainly for internal use, applications would typically use
GstPbutils.missing_plugin_message_get_description
() to get a description of a missing feature from a missing-plugin message.
- GstPbutils.pb_utils_init()[source]¶
Initialises the base utils support library. This function is not thread-safe. Applications should call it after calling
Gst.init
(), plugins should call it from their plugin_init function.This function may be called multiple times. It will do nothing if the library has already been initialised.
- GstPbutils.plugins_base_version()[source]¶
- Returns:
- Return type:
Gets the version number of the GStreamer Plugins Base libraries.
- GstPbutils.plugins_base_version_string()[source]¶
- Returns:
a newly allocated string describing this version of gst-plugins-base
- Return type:
This function returns a string that is useful for describing this version of GStreamer’s gst-plugins-base libraries to the outside world: user agent strings, logging, about dialogs …