Functions

enhancer_check (iface_type, scheme, host)

get_global_enhancer_proxies ()

get_major_version ()

get_micro_version ()

get_minor_version ()

get_version_s ()

init (argv)

init_check (argv)

Details

Clapper.enhancer_check(iface_type, scheme, host)
Parameters:
Returns:

whether a plausible enhancer was found.

name:

return location for found enhancer name

Return type:

(bool, name: str)

Check if an enhancer of type is available for given scheme and host.

A check that compares requested capabilites of all available Clapper enhancers, thus it is fast but does not guarantee that the found one will succeed. Please note that this function will always return False if Clapper was built without enhancers loader functionality. To check that, use [const`Clapper`.WITH_ENHANCERS_LOADER].

This function can be used to quickly determine early if Clapper will at least try to handle URI and with one of its enhancers and which one.

Example:

``c gboolean supported = clapper_enhancer_check (CLAPPER_TYPE_EXTRACTABLE, “https”, “example.com”, NULL); ``

For self hosted services a custom URI scheme without host can be used. Enhancers should announce support for such schemes by defining them in their plugin info files.

``c gboolean supported = clapper_enhancer_check (CLAPPER_TYPE_EXTRACTABLE, “example”, NULL, NULL); ``

New in version 0.8.

Deprecated since version 0.10: Use list of enhancer proxies from [func`Clapper`.get_global_enhancer_proxies] or [property`Clapper`.Player:enhancer-proxies] and check if any proxy matches your search criteria.

Clapper.get_global_enhancer_proxies()
Returns:

a global Clapper.EnhancerProxyList of enhancer proxies.

Return type:

Clapper.EnhancerProxyList

Get a list of available enhancers in the form of [class`Clapper`.EnhancerProxy] objects.

This returns a global list of enhancer proxy objects. You can use it to inspect available enhancers without creating a new player instance.

Remember to initialize Clapper library before using this function.

Only enhancer properties with [flags`Clapper`.EnhancerParamFlags.GLOBAL] flag can be set on proxies in this list. These are meant to be set ONLY by users, not applications as they carry over to all player instances (possibly including other apps). Applications should instead be changing properties with [flags`Clapper`.EnhancerParamFlags.LOCAL] flag set from individual proxy lists from [property`Clapper`.Player:enhancer-proxies] which will affect only that single player instance given list belongs to.

New in version 0.10.

Clapper.get_major_version()
Returns:

the major version number of the Clapper library

Return type:

int

Clapper runtime major version component

This returns the Clapper library version your code is running against unlike [const`Clapper`.MAJOR_VERSION] which represents compile time version.

New in version 0.10.

Clapper.get_micro_version()
Returns:

the micro version number of the Clapper library

Return type:

int

Clapper runtime micro version component

This returns the Clapper library version your code is running against unlike [const`Clapper`.MICRO_VERSION] which represents compile time version.

New in version 0.10.

Clapper.get_minor_version()
Returns:

the minor version number of the Clapper library

Return type:

int

Clapper runtime minor version component

This returns the Clapper library version your code is running against unlike [const`Clapper`.MINOR_VERSION] which represents compile time version.

New in version 0.10.

Clapper.get_version_s()
Returns:

the version of the Clapper library as string

Return type:

str

Clapper runtime version as string

This returns the Clapper library version your code is running against unlike [const`Clapper`.VERSION_S] which represents compile time version.

New in version 0.10.

Clapper.init(argv)
Parameters:

argv ([str] or None) – pointer to application’s argv

Returns:

pointer to application’s argv

Return type:

argv: [str]

Initializes the Clapper library. Implementations must always call this before using Clapper API.

Because Clapper uses GStreamer internally, this function will also initialize GStreamer before initializing Clapper itself for user convienience, so application does not have to do so anymore.

WARNING: This function will terminate your program if it was unable to initialize for some reason. If you want to do some fallback logic, use [func`Clapper`.init_check] instead.

Clapper.init_check(argv)
Parameters:

argv ([str] or None) – pointer to application’s argv

Returns:

True if Clapper could be initialized, False otherwise.

argv:

pointer to application’s argv

Return type:

(bool, argv: [str])

This function does the same thing as [func`Clapper`.init], but instead of terminating on failure it returns False.