TypeFind

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

Members

Functions

getLength
ulong getLength()

Get the length of the data stream.

peek
const(ubyte)* peek(long offset, uint size)

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.

suggest
void suggest(uint probability, gst.caps.Caps caps)

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.

suggestEmptySimple
void suggestEmptySimple(uint probability, string mediaType)

If a #GstTypeFindFunction calls this function it suggests caps of the given media_type with the given probability.

Static functions

register
bool register(gst.plugin.Plugin plugin, string name, uint rank, gst.types.TypeFindFunction func, string extensions, gst.caps.Caps possibleCaps)

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.