## typefind

typefind

## Properties

GstCaps * | caps | Read
GstCaps * | force-caps | Read / Write
guint | minimum | Read / Write

## Signals

void | have-type | Run Last

## Types and Values

struct | GstTypeFindElement

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstTypeFindElement

## Description

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.

## Synopsis

### Element Information

plugin | coreelements
author | Benjamin Otte <in7y118@public.uni-hamburg.de>
class | Generic

### Element Pads

name | sink
direction | sink
presence | always
details | ANY

name | src
direction | source
presence | always
details | ANY

## Functions

## Types and Values

### struct GstTypeFindElement

    struct GstTypeFindElement;

Opaque GstTypeFindElement data structure

## Property Details

### The `“caps”` property

      “caps”                     GstCaps *

detected capabilities in stream.

Flags: Read

### The `“force-caps”` property

      “force-caps”               GstCaps *

force caps without doing a typefind.

Flags: Read / Write

### The `“minimum”` property

      “minimum”                  guint

minimum probability required to accept caps.

Flags: Read / Write

Allowed values: [1,100]

Default value: 1

## Signal Details

### The `“have-type”` signal

    void
    user_function (GstTypeFindElement *typefind,
                   guint               probability,
                   GstCaps            *caps,
                   gpointer            user_data)

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 |
user_data | user data set when the signal handler was connected. |

Flags: Run Last