# typefind

Determines the media-type of a stream. It applies typefind functions in the order of their rank. Once the type has been detected it sets its src pad caps to the found media type.

Whenever a type is found the have-type signal is emitted, either from the streaming thread or the application thread (the latter may happen when typefinding is done pull-based from the state change function).

Plugins can register custom typefinders by using GstTypeFindFactory.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──typefind

## Factory details

Authors: – Benjamin Otte <in7y118@public.uni-hamburg.de></in7y118@public.uni-hamburg.de>

Classification: – `Generic`

Rank – none

Plugin – coreelements

Package – GStreamer

## Pad Templates

### `sink`

    ANY

Presence – always

Direction – sink

Object type – GstPad

### `src`

    ANY

Presence – always

Direction – src

Object type – GstPad

## Signals

### have-type

    have_type_callback (GstElement * typefind,
                        guint probability,
                        GstCaps * caps,
                        gpointer udata)

    def have_type_callback (typefind, probability, caps, udata):
        #python callback for the 'have-type' signal

    function have_type_callback(typefind: GstElement * typefind, probability: guint probability, caps: GstCaps * caps, udata: gpointer udata): {
        // javascript callback for the 'have-type' signal
    }

This signal gets emitted when the type and its probability has been found.

Parameters:

`typefind` –

the typefind instance

`probability` –

the probability of the type found

`caps` –

the caps of the type found

`udata` –
No description available

Flags: Run Last

## Properties

### caps

    “caps” GstCaps *

detected capabilities in stream

Flags : Read

### force-caps

    “force-caps” GstCaps *

force caps without doing a typefind

Flags : Read / Write

### minimum

    “minimum” guint

minimum probability required to accept caps

Flags : Read / Write

Default value : 1

The results of the search are