Functions¶
|
|
|
|
|
Details¶
- Clapper.enhancer_check(iface_type, scheme, host)¶
- Parameters:
iface_type (
GObject.GType
) – an interfaceGObject.GType
scheme (
str
) – an URI scheme
- Returns:
whether a plausible enhancer was found.
- name:
return location for found enhancer name
- Return type:
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.
- Clapper.init(argv)¶
- Parameters:
- 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.