Gst.TypeFind¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
data |
r/w |
The data used by the caller of the typefinding function. |
|
get_length |
r |
Returns the length of current data. |
|
peek |
r |
Method to peek data. |
|
suggest |
r |
Method to suggest |
Methods¶
class |
|
|
Details¶
- class Gst.TypeFind¶
The following functions allow you to detect the media type of an unknown stream.
- classmethod register(plugin, name, rank, func, extensions, possible_caps, *data)[source]¶
- Parameters:
plugin (
Gst.Plugin
orNone
) – AGst.Plugin
, orNone
for a static typefind functionname (
str
) – The name for registeringrank (
int
) – The rank (or importance) of this typefind functionfunc (
Gst.TypeFindFunction
) – TheGst.TypeFindFunction
to useextensions (
str
orNone
) – Optional comma-separated list of extensions that could belong to this typepossible_caps (
Gst.Caps
orNone
) – Optionally the caps that could be returned when typefinding succeedsdata (
object
orNone
) – Optional user data. This user data must be available until the plugin is unloaded.
- Returns:
- Return type:
Registers a new typefind function to be used for typefinding. After registering this function will be available for typefinding. This function is typically called during an element’s plugin initialization.
- suggest_empty_simple(probability, media_type)[source]¶
- Parameters:
If a
Gst.TypeFindFunction
calls this function it suggests caps of the given media_type with the given probability.This function is similar to gst_type_find_suggest_simple(), but uses a
Gst.Caps
with no fields.New in version 1.20.