Struct gstreamer::TypeFind[][src]

#[repr(transparent)]
pub struct TypeFind(_);
Expand description

The following functions allow you to detect the media type of an unknown stream.

Implementations

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.

plugin

A Plugin, or None for a static typefind function

name

The name for registering

rank

The rank (or importance) of this typefind function

func

The GstTypeFindFunction to use

extensions

Optional comma-separated list of extensions that could belong to this type

possible_caps

Optionally the caps that could be returned when typefinding succeeds

data_notify

a GDestroyNotify that will be called on data when the plugin is unloaded.

Returns

true on success, false otherwise

Returns the size bytes of the stream to identify beginning at offset. If offset is a positive number, the offset is relative to the beginning of the stream, if offset is a negative number the offset is relative to the end of the stream. The returned memory is valid until the typefinding function returns and must not be freed.

offset

The offset

Returns

the requested data, or None if that data is not available.

If a GstTypeFindFunction calls this function it suggests the caps with the given probability. A GstTypeFindFunction may supply different suggestions in one call. It is up to the caller of the GstTypeFindFunction to interpret these values.

probability

The probability in percent that the suggestion is right

caps

The fixed Caps to suggest

Get the length of the data stream.

Returns

The length of the data stream, or 0 if it is not available.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.