Functions

  codec_utils_aac_caps_set_level_and_profile (caps, audio_config)
  codec_utils_aac_get_channels (audio_config)
  codec_utils_aac_get_index_from_sample_rate (rate)
  codec_utils_aac_get_level (audio_config)
  codec_utils_aac_get_profile (audio_config)
  codec_utils_aac_get_sample_rate (audio_config)
  codec_utils_aac_get_sample_rate_from_index (sr_idx)
  codec_utils_h264_caps_set_level_and_profile (caps, sps)
  codec_utils_h264_get_level (sps)
  codec_utils_h264_get_level_idc (level)
  codec_utils_h264_get_profile (sps)
  codec_utils_h265_caps_set_level_tier_and_profile (caps, profile_tier_level)
  codec_utils_h265_get_level (profile_tier_level)
  codec_utils_h265_get_level_idc (level)
  codec_utils_h265_get_profile (profile_tier_level)
  codec_utils_h265_get_tier (profile_tier_level)
  codec_utils_mpeg4video_caps_set_level_and_profile (caps, vis_obj_seq)
  codec_utils_mpeg4video_get_level (vis_obj_seq)
  codec_utils_mpeg4video_get_profile (vis_obj_seq)
  codec_utils_opus_create_caps (rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping)
  codec_utils_opus_create_caps_from_header (header, comments)
  codec_utils_opus_create_header (rate, channels, channel_mapping_family, stream_count, coupled_count, channel_mapping, pre_skip, output_gain)
  codec_utils_opus_parse_caps (caps)
  codec_utils_opus_parse_header (header)
  encoding_list_all_targets (categoryname)
  encoding_list_available_categories ()
  install_plugins_async (details, ctx, func, *user_data)
  install_plugins_installation_in_progress ()
  install_plugins_return_get_name (ret)
  install_plugins_supported ()
  install_plugins_sync (details, ctx)
  is_missing_plugin_message (msg)
  missing_decoder_installer_detail_new (decode_caps)
  missing_decoder_message_new (element, decode_caps)
  missing_element_installer_detail_new (factory_name)
  missing_element_message_new (element, factory_name)
  missing_encoder_installer_detail_new (encode_caps)
  missing_encoder_message_new (element, encode_caps)
  missing_plugin_message_get_description (msg)
  missing_plugin_message_get_installer_detail (msg)
  missing_uri_sink_installer_detail_new (protocol)
  missing_uri_sink_message_new (element, protocol)
  missing_uri_source_installer_detail_new (protocol)
  missing_uri_source_message_new (element, protocol)
  pb_utils_add_codec_description_to_tag_list (taglist, codec_tag, caps)
  pb_utils_get_codec_description (caps)
  pb_utils_get_decoder_description (caps)
  pb_utils_get_element_description (factory_name)
  pb_utils_get_encoder_description (caps)
  pb_utils_get_sink_description (protocol)
  pb_utils_get_source_description (protocol)
  pb_utils_init ()
  plugins_base_version ()
  plugins_base_version_string ()

Details

GstPbutils.codec_utils_aac_caps_set_level_and_profile(caps, audio_config)[source]
Parameters:
  • caps (Gst.Caps) – the Gst.Caps to which level and profile fields are to be added
  • audio_config (bytes) – a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)
Returns:

True if the level and profile could be set, False otherwise.

Return type:

bool

Sets the level and profile on caps if it can be determined from audio_config. See GstPbutils.codec_utils_aac_get_level() and GstPbutils.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:int

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:int

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:str

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:str

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:int

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:int

Translates the sample rate index found in AAC headers to the actual sample rate.

GstPbutils.codec_utils_h264_caps_set_level_and_profile(caps, sps)[source]
Parameters:
  • caps (Gst.Caps) – the Gst.Caps to which the level and profile are to be added
  • sps (bytes) – Pointer to the sequence parameter set for the stream.
Returns:

True if the level and profile could be set, False otherwise.

Return type:

bool

Sets the level and profile in caps if it can be determined from sps. See GstPbutils.codec_utils_h264_get_level() and GstPbutils.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:str

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:int

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:str

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_h265_caps_set_level_tier_and_profile(caps, profile_tier_level)[source]
Parameters:
  • caps (Gst.Caps) – the Gst.Caps to which the level, tier and profile are to be added
  • profile_tier_level (bytes) – Pointer to the profile_tier_level struct
Returns:

True if the level, tier, profile could be set, False otherwise.

Return type:

bool

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() and GstPbutils.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:str

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:int

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:str

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 - general_reserved_zero_44bits
  • 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:str

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]
Parameters:
  • caps (Gst.Caps) – the Gst.Caps to which the level and profile are to be added
  • vis_obj_seq (bytes) – Pointer to the visual object sequence for the stream.
Returns:

True if the level and profile could be set, False otherwise.

Return type:

bool

Sets the level and profile in caps if it can be determined from vis_obj_seq. See GstPbutils.codec_utils_mpeg4video_get_level() and GstPbutils.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:str

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:str

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:
  • rate (int) – the sample rate
  • channels (int) – the number of channels
  • channel_mapping_family (int) – the channel mapping family
  • stream_count (int) – the number of independent streams
  • coupled_count (int) – the number of stereo streams
  • channel_mapping (bytes or None) – the mapping between the streams
Returns:

The Gst.Caps, or None if the parameters would lead to invalid Opus caps.

Return type:

Gst.Caps

Creates Opus caps from the given parameters.

New in version 1.8.

GstPbutils.codec_utils_opus_create_caps_from_header(header, comments)[source]
Parameters:
Returns:

The Gst.Caps.

Return type:

Gst.Caps

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 rate
  • channels (int) – the number of channels
  • channel_mapping_family (int) – the channel mapping family
  • stream_count (int) – the number of independent streams
  • coupled_count (int) – the number of stereo streams
  • channel_mapping (bytes or None) – the mapping between the streams
  • pre_skip (int) – Pre-skip in 48kHz samples or 0
  • output_gain (int) – Output gain or 0
Returns:

The Gst.Buffer containing the OpusHead.

Return type:

Gst.Buffer

Creates OpusHead header from the given parameters.

New in version 1.8.

GstPbutils.codec_utils_opus_parse_caps(caps)[source]
Parameters:caps (Gst.Caps) – the Gst.Caps to parse the data from
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 OpusHead Gst.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 or None) – The category, for ex: GstPbutils.ENCODING_CATEGORY_DEVICE. Can be None.
Returns:The list of GstPbutils.EncodingTarget
Return type:[GstPbutils.EncodingTarget]

List all available GstPbutils.EncodingTarget for the specified category, or all categories if categoryname is None.

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:
Returns:

result code whether an external installer could be started

Return type:

GstPbutils.InstallPluginsReturn

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 as GstPbutils.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]
Returns:True if plugin installation is in progress, otherwise False
Return type:bool

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:str

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]
Returns:True if plugin installation is likely to be supported.
Return type:bool

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:
Returns:

the result of the installation.

Return type:

GstPbutils.InstallPluginsReturn

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) – a Gst.Message
Returns:True if msg is a missing-plugins message, otherwise False.
Return type:bool

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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:
Returns:

a new Gst.Message, or None on error

Return type:

Gst.Message

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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) – the Gst.Element posting the message
  • factory_name (str) – the name of the missing element (element factory), e.g. “videoscale” or “cdparanoiasrc”
Returns:

a new Gst.Message, or None on error

Return type:

Gst.Message

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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:
Returns:

a new Gst.Message, or None on error

Return type:

Gst.Message

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-plugin Gst.Message of type Gst.MessageType.ELEMENT
Returns:a newly-allocated description string, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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-plugin Gst.Message of type Gst.MessageType.ELEMENT
Returns:a newly-allocated detail string, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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) – the Gst.Element posting the message
  • protocol (str) – the URI protocol the missing sink needs to implement, e.g. “http” or “smb”
Returns:

a new Gst.Message, or None on error

Return type:

Gst.Message

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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() or GstPbutils.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) – the Gst.Element posting the message
  • protocol (str) – the URI protocol the missing source needs to implement, e.g. “http” or “mms”
Returns:

a new Gst.Message, or None on error

Return type:

Gst.Message

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:
Returns:

True if a codec tag was added, False otherwise.

Return type:

bool

Adds a codec tag describing the format specified by caps to taglist.

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 with GLib.free() when not needed any longer.
Return type:str

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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. Should never return None unless factory_name or caps are invalid.

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

Returns a localised string describing the given element, for use in error dialogs or other messages to be seen by the user. Should never return None unless factory_name is invalid.

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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. Should never return None unless factory_name or caps are invalid.

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_sink_description(protocol)[source]
Parameters:protocol (str) – the protocol the sink element needs to handle, e.g. “http”
Returns:a newly-allocated description string, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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. Should never return None unless protocol is invalid.

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, or None on error. Free string with GLib.free() when not needed any longer.
Return type:str

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. Should never return None unless protocol is invalid.

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:
major:pointer to a int to store the major version number, or None
minor:pointer to a int to store the minor version number, or None
micro:pointer to a int to store the micro version number, or None
nano:pointer to a int to store the nano version number, or None
Return type:(major: int, minor: int, micro: int, nano: int)

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:str

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 …