gi-gstpbutils-1.0.25: GStreamer Plugins Base Utils bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstPbutils.Functions

Contents

Description

 
Synopsis

Methods

codecUtilsAacCapsSetLevelAndProfile

codecUtilsAacCapsSetLevelAndProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the Caps to which level and profile fields are to be added

-> ByteString

audioConfig: a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1. (See below for more details)

-> m Bool

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

Sets the level and profile on caps if it can be determined from audioConfig. See codecUtilsAacGetLevel and codecUtilsAacGetProfile 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.

codecUtilsAacGetChannels

codecUtilsAacGetChannels Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

audioConfig: a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

-> m Word32

Returns: The channels or 0 if the channel could not be determined.

Returns the channels of the given AAC stream.

Since: 1.10

codecUtilsAacGetIndexFromSampleRate

codecUtilsAacGetIndexFromSampleRate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

rate: Sample rate

-> m Int32

Returns: The AAC index for this sample rate, -1 if the rate is not a valid AAC sample rate.

Translates the sample rate to the index corresponding to it in AAC spec.

codecUtilsAacGetLevel

codecUtilsAacGetLevel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

audioConfig: a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

-> m (Maybe Text)

Returns: The level as a const string and Nothing if the level could not be determined.

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 audioConfig 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

codecUtilsAacGetProfile

codecUtilsAacGetProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

audioConfig: a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

-> m (Maybe Text)

Returns: The profile as a const string and Nothing if the profile could not be determined.

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 audioConfig

codecUtilsAacGetSampleRate

codecUtilsAacGetSampleRate Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

audioConfig: a pointer to the AudioSpecificConfig as specified in the Elementary Stream Descriptor (esds) in ISO/IEC 14496-1.

-> m Word32

Returns: The sample rate if sr_idx is valid, 0 otherwise.

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

Since: 1.10

codecUtilsAacGetSampleRateFromIndex

codecUtilsAacGetSampleRateFromIndex Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

srIdx: Sample rate index as from the AudioSpecificConfig (MPEG-4 container) or ADTS frame header

-> m Word32

Returns: The sample rate if srIdx is valid, 0 otherwise.

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

codecUtilsCapsGetMimeCodec

codecUtilsCapsGetMimeCodec Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: A Caps to convert to mime codec

-> m (Maybe Text)

Returns: a RFC 6381 compatible codec string or Nothing

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

Since: 1.20

codecUtilsH264CapsSetLevelAndProfile

codecUtilsH264CapsSetLevelAndProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the Caps to which the level and profile are to be added

-> ByteString

sps: Pointer to the sequence parameter set for the stream.

-> m Bool

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

Sets the level and profile in caps if it can be determined from sps. See codecUtilsH264GetLevel and codecUtilsH264GetProfile for more details on the parameters.

codecUtilsH264GetLevel

codecUtilsH264GetLevel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

sps: Pointer to the sequence parameter set for the stream.

-> m (Maybe Text)

Returns: The level as a const string, or Nothing if there is an error.

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 codecUtilsH264GetProfile.

codecUtilsH264GetLevelIdc

codecUtilsH264GetLevelIdc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

level: A level string from caps

-> m Word8

Returns: the level_idc or 0 if the level is unknown

Transform a level string from the caps into the level_idc

codecUtilsH264GetProfile

codecUtilsH264GetProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

sps: Pointer to the sequence parameter set for the stream.

-> m (Maybe Text)

Returns: The profile as a const string, or Nothing if there is an error.

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

codecUtilsH264GetProfileFlagsLevel

codecUtilsH264GetProfileFlagsLevel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

codecData: H264 AVCC extradata

-> m (Bool, Word8, Word8, Word8)

Returns: True on success, False on failure

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.

Since: 1.20

codecUtilsH265CapsSetLevelTierAndProfile

codecUtilsH265CapsSetLevelTierAndProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the Caps to which the level, tier and profile are to be added

-> ByteString

profileTierLevel: Pointer to the profile_tier_level struct

-> m Bool

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

Sets the level, tier and profile in caps if it can be determined from profileTierLevel. See codecUtilsH265GetLevel, codecUtilsH265GetTier and codecUtilsH265GetProfile for more details on the parameters.

Since: 1.4

codecUtilsH265GetLevel

codecUtilsH265GetLevel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

profileTierLevel: Pointer to the profile_tier_level for the stream

-> m (Maybe Text)

Returns: The level as a const string, or Nothing if there is an error.

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 codecUtilsH264GetProfile.

Since: 1.4

codecUtilsH265GetLevelIdc

codecUtilsH265GetLevelIdc Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

level: A level string from caps

-> m Word8

Returns: the level_idc or 0 if the level is unknown

Transform a level string from the caps into the level_idc

Since: 1.4

codecUtilsH265GetProfile

codecUtilsH265GetProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

profileTierLevel: Pointer to the profile_tier_level structure for the stream.

-> m (Maybe Text)

Returns: The profile as a const string, or Nothing if there is an error.

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

Since: 1.4

codecUtilsH265GetTier

codecUtilsH265GetTier Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

profileTierLevel: Pointer to the profile_tier_level for the stream.

-> m (Maybe Text)

Returns: The tier as a const string, or Nothing if there is an error.

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 codecUtilsH264GetProfile.

Since: 1.4

codecUtilsMpeg4videoCapsSetLevelAndProfile

codecUtilsMpeg4videoCapsSetLevelAndProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the Caps to which the level and profile are to be added

-> ByteString

visObjSeq: Pointer to the visual object sequence for the stream.

-> m Bool

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

Sets the level and profile in caps if it can be determined from visObjSeq. See codecUtilsMpeg4videoGetLevel and codecUtilsMpeg4videoGetProfile for more details on the parameters.

codecUtilsMpeg4videoGetLevel

codecUtilsMpeg4videoGetLevel Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

visObjSeq: Pointer to the visual object sequence for the stream.

-> m (Maybe Text)

Returns: The level as a const string, or NULL if there is an error.

Converts the level indication in the stream's visual object sequence into a string. visObjSeq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

codecUtilsMpeg4videoGetProfile

codecUtilsMpeg4videoGetProfile Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

visObjSeq: Pointer to the visual object sequence for the stream.

-> m (Maybe Text)

Returns: The profile as a const string, or NULL if there is an error.

Converts the profile indication in the stream's visual object sequence into a string. visObjSeq is expected to be the data following the visual object sequence start code. Only the first byte (profile_and_level_indication) is used.

codecUtilsOpusCreateCaps

codecUtilsOpusCreateCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

rate: the sample rate

-> Word8

channels: the number of channels

-> Word8

channelMappingFamily: the channel mapping family

-> Word8

streamCount: the number of independent streams

-> Word8

coupledCount: the number of stereo streams

-> Maybe (Ptr Word8)

channelMapping: the mapping between the streams

-> m Caps

Returns: The Caps, or Nothing if the parameters would lead to invalid Opus caps.

Creates Opus caps from the given parameters.

Since: 1.8

codecUtilsOpusCreateCapsFromHeader

codecUtilsOpusCreateCapsFromHeader Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Buffer

header: OpusHead header

-> Maybe Buffer

comments: Comment header or NULL

-> m Caps

Returns: The Caps.

Creates Opus caps from the given OpusHead header and comment header comments.

Since: 1.8

codecUtilsOpusCreateHeader

codecUtilsOpusCreateHeader Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Word32

rate: the sample rate

-> Word8

channels: the number of channels

-> Word8

channelMappingFamily: the channel mapping family

-> Word8

streamCount: the number of independent streams

-> Word8

coupledCount: the number of stereo streams

-> Maybe (Ptr Word8)

channelMapping: the mapping between the streams

-> Word16

preSkip: Pre-skip in 48kHz samples or 0

-> Int16

outputGain: Output gain or 0

-> m Buffer

Returns: The Buffer containing the OpusHead.

Creates OpusHead header from the given parameters.

Since: 1.8

codecUtilsOpusParseCaps

codecUtilsOpusParseCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the Caps to parse the data from

-> m (Bool, Word32, Word8, Word8, Word8, Word8, ByteString)

Returns: True if parsing was successful, False otherwise.

Parses Opus caps and fills the different fields with defaults if possible.

Since: 1.8

codecUtilsOpusParseHeader

codecUtilsOpusParseHeader Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Buffer

header: the OpusHead Buffer

-> m (Bool, Word32, Word8, Word8, Word8, Word8, ByteString, Word16, Int16)

Returns: True if parsing was successful, False otherwise.

Parses the OpusHead header.

Since: 1.8

encodingListAllTargets

encodingListAllTargets Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

categoryname: The category, for ex: ENCODING_CATEGORY_DEVICE. Can be Nothing.

-> m [EncodingTarget]

Returns: The list of EncodingTarget

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

encodingListAvailableCategories

encodingListAvailableCategories Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m [Text]

Returns: A list of EncodingTarget categories.

Lists all EncodingTarget categories present on disk.

installPluginsAsync

installPluginsAsync Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Text]

details: NULL-terminated array of installer string details (see below)

-> Maybe InstallPluginsContext

ctx: a InstallPluginsContext, or NULL

-> InstallPluginsResultFunc

func: the function to call when the installer program returns

-> m InstallPluginsReturn

Returns: result code whether an external installer could be started

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 userData 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 g_main_context_iteration(NULL,FALSE).

The installer strings that make up detail are typically obtained by calling missingPluginMessageGetInstallerDetail on missing-plugin messages that have been caught on a pipeline's bus or created by the application via the provided API, such as missingElementMessageNew.

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).

installPluginsInstallationInProgress

installPluginsInstallationInProgress Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Bool

Returns: TRUE if plugin installation is in progress, otherwise FALSE

Checks whether plugin installation (initiated by this application only) is currently in progress.

installPluginsSupported

installPluginsSupported Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Bool

Returns: TRUE if plugin installation is likely to be supported.

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.

installPluginsSync

installPluginsSync Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Text]

details: NULL-terminated array of installer string details

-> Maybe InstallPluginsContext

ctx: a InstallPluginsContext, or NULL

-> m InstallPluginsReturn

Returns: the result of the installation.

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 installPluginsAsync instead of this function.

isMissingPluginMessage

isMissingPluginMessage Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Message

msg: a Message

-> m Bool

Returns: True if msg is a missing-plugins message, otherwise False.

Checks whether msg is a missing plugins message.

missingDecoderInstallerDetailNew

missingDecoderInstallerDetailNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

decodeCaps: the (fixed) caps for which a decoder element is needed

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

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.

missingDecoderMessageNew

missingDecoderMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsElement a) 
=> a

element: the Element posting the message

-> Caps

decodeCaps: the (fixed) caps for which a decoder element is needed

-> m Message

Returns: a new Message, or NULL on error

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.

missingElementInstallerDetailNew

missingElementInstallerDetailNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

factoryName: the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc"

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

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.

missingElementMessageNew

missingElementMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsElement a) 
=> a

element: the Element posting the message

-> Text

factoryName: the name of the missing element (element factory), e.g. "videoscale" or "cdparanoiasrc"

-> m Message

Returns: a new Message, or NULL on error

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.

missingEncoderInstallerDetailNew

missingEncoderInstallerDetailNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

encodeCaps: the (fixed) caps for which an encoder element is needed

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

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.

missingEncoderMessageNew

missingEncoderMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsElement a) 
=> a

element: the Element posting the message

-> Caps

encodeCaps: the (fixed) caps for which an encoder element is needed

-> m Message

Returns: a new Message, or NULL on error

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.

missingPluginMessageGetDescription

missingPluginMessageGetDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Message

msg: a missing-plugin Message of type GST_MESSAGE_ELEMENT

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

Returns a localised string describing the missing feature, for use in error dialogs and the like. Should never return NULL 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

missingPluginMessageGetInstallerDetail

missingPluginMessageGetInstallerDetail Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Message

msg: a missing-plugin Message of type GST_MESSAGE_ELEMENT

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

This function is mainly for applications that call external plugin installation mechanisms using one of the two above-mentioned functions.

missingUriSinkInstallerDetailNew

missingUriSinkInstallerDetailNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

protocol: the URI protocol the missing source needs to implement, e.g. "http" or "mms"

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

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.

missingUriSinkMessageNew

missingUriSinkMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsElement a) 
=> a

element: the Element posting the message

-> Text

protocol: the URI protocol the missing sink needs to implement, e.g. "http" or "smb"

-> m Message

Returns: a new Message, or NULL on error

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.

missingUriSourceInstallerDetailNew

missingUriSourceInstallerDetailNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

protocol: the URI protocol the missing source needs to implement, e.g. "http" or "mms"

-> m Text

Returns: a newly-allocated detail string, or NULL on error. Free string with free when not needed any longer.

Returns an opaque string containing all the details about the missing element to be passed to an external installer called via installPluginsAsync or installPluginsSync.

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.

missingUriSourceMessageNew

missingUriSourceMessageNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsElement a) 
=> a

element: the Element posting the message

-> Text

protocol: the URI protocol the missing source needs to implement, e.g. "http" or "mms"

-> m Message

Returns: a new Message, or NULL on error

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.

pbUtilsAddCodecDescriptionToTagList

pbUtilsAddCodecDescriptionToTagList Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> TagList

taglist: a TagList

-> Maybe Text

codecTag: a GStreamer codec tag such as TAG_AUDIO_CODEC, TAG_VIDEO_CODEC or TAG_CODEC. If none is specified, the function will attempt to detect the appropriate category.

-> Caps

caps: the (fixed) Caps for which a codec tag should be added.

-> m Bool

Returns: TRUE if a codec tag was added, FALSE otherwise.

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

pbUtilsGetCapsDescriptionFlags

pbUtilsGetCapsDescriptionFlags Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the (fixed) Caps for which flags are requested

-> m [PbUtilsCapsDescriptionFlags]

Returns: PbUtilsCapsDescriptionFlags that describe caps, or no flags if the caps are unknown.

Returns flags that describe the format of the caps if known. No flags are set for unknown caps.

Since: 1.20

pbUtilsGetCodecDescription

pbUtilsGetCodecDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the (fixed) Caps for which an format description is needed

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless caps is invalid.

Also see the convenience function pbUtilsAddCodecDescriptionToTagList.

pbUtilsGetDecoderDescription

pbUtilsGetDecoderDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the (fixed) Caps for which an decoder description is needed

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless factoryName or caps are invalid.

This function is mainly for internal use, applications would typically use missingPluginMessageGetDescription to get a description of a missing feature from a missing-plugin message.

pbUtilsGetElementDescription

pbUtilsGetElementDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

factoryName: the name of the element, e.g. "giosrc"

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless factoryName is invalid.

This function is mainly for internal use, applications would typically use missingPluginMessageGetDescription to get a description of a missing feature from a missing-plugin message.

pbUtilsGetEncoderDescription

pbUtilsGetEncoderDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the (fixed) Caps for which an encoder description is needed

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless factoryName or caps are invalid.

This function is mainly for internal use, applications would typically use missingPluginMessageGetDescription to get a description of a missing feature from a missing-plugin message.

pbUtilsGetFileExtensionFromCaps

pbUtilsGetFileExtensionFromCaps Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Caps

caps: the (fixed) Caps for which a file extension is needed

-> m (Maybe Text)

Returns: a newly-allocated file extension string, or NULL on error. Free string with free when not needed any longer.

Returns a possible file extension for the given caps, if known.

Since: 1.20

pbUtilsGetSinkDescription

pbUtilsGetSinkDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

protocol: the protocol the sink element needs to handle, e.g. "http"

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless protocol is invalid.

This function is mainly for internal use, applications would typically use missingPluginMessageGetDescription to get a description of a missing feature from a missing-plugin message.

pbUtilsGetSourceDescription

pbUtilsGetSourceDescription Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

protocol: the protocol the source element needs to handle, e.g. "http"

-> m Text

Returns: a newly-allocated description string, or NULL on error. Free string with free when not needed any longer.

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 NULL unless protocol is invalid.

This function is mainly for internal use, applications would typically use missingPluginMessageGetDescription to get a description of a missing feature from a missing-plugin message.

pbUtilsInit

pbUtilsInit :: (HasCallStack, MonadIO m) => m () Source #

Initialises the base utils support library. This function is not thread-safe. Applications should call it after calling 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.

pluginsBaseVersion

pluginsBaseVersion :: (HasCallStack, MonadIO m) => m (Word32, Word32, Word32, Word32) Source #

Gets the version number of the GStreamer Plugins Base libraries.

pluginsBaseVersionString

pluginsBaseVersionString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Text

Returns: a newly allocated string describing this version of gst-plugins-base

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 ...