# GstTypeFindHelper

Utility functions for elements doing typefinding: gst_type_find_helper does typefinding in pull mode, while gst_type_find_helper_for_buffer is useful for elements needing to do typefinding in push mode from a chain function.

## GstTypeFindData

The opaque GstTypeFindData structure.

Since : 1.22

## GstBase.TypeFindData

The opaque GstBase.TypeFindData structure.

Since : 1.22

## GstBase.TypeFindData

The opaque GstBase.TypeFindData structure.

Since : 1.22

### Methods

#### gst_type_find_data_free

    gst_type_find_data_free (GstTypeFindData * data)

Parameters:

`data` –

GstTypeFindData * to free

Since : 1.22

#### gst_type_find_data_get_caps

    GstCaps *
    gst_type_find_data_get_caps (GstTypeFindData * data)

Returns GstCaps associated with GstTypeFindData

Parameters:

`data` –

GstTypeFindData *

Returns ( [transfer: full][nullable]) –

GstCaps.

Since : 1.22

#### gst_type_find_data_get_probability

    GstTypeFindProbability
    gst_type_find_data_get_probability (GstTypeFindData * data)

Returns GstTypeFindProbability associated with GstTypeFindData

Parameters:

`data` –

GstTypeFindData *

Returns –

GstTypeFindProbability.

Since : 1.22

#### gst_type_find_data_get_typefind

    GstTypeFind *
    gst_type_find_data_get_typefind (GstTypeFindData * data)

Returns GstTypeFind associated with GstTypeFindData

Parameters:

`data` –

GstTypeFindData *

Returns –

GstTypeFind.

Since : 1.22

### Functions

#### gst_type_find_data_new

    GstTypeFindData *
    gst_type_find_data_new (GstObject * obj,
                            const guint8 * data,
                            gsize size)

Free-function: gst_type_find_data_free

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`data` ( [transfer: none][arraylength=size]) –

a pointer with data to typefind

`size` –

the size of data

Returns ( [transfer: full]) –

the GstTypeFindData. The caller should free the returned GstTypeFindData with gst_type_find_data_free.

Since : 1.22

## Functions

### gst_type_find_helper

    GstCaps *
    gst_type_find_helper (GstPad * src,
                          guint64 size)

Tries to find what type of data is flowing from the given source GstPad.

Free-function: gst_caps_unref

Parameters:

`src` –

A source GstPad

`size` –

The length in bytes

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data stream. Returns NULL if no GstCaps matches the data stream.

### GstBase.prototype.type_find_helper

    function GstBase.prototype.type_find_helper(src: Gst.Pad, size: Number): {
        // javascript wrapper for 'gst_type_find_helper'
    }

Tries to find what type of data is flowing from the given source Gst.Pad.

Free-function: gst_caps_unref

Parameters:

`src` (Gst.Pad) –

A source Gst.Pad

`size` (Number) –

The length in bytes

Returns (Gst.Caps) –

the Gst.Caps corresponding to the data stream. Returns null if no Gst.Caps matches the data stream.

### GstBase.type_find_helper

    def GstBase.type_find_helper (src, size):
        #python wrapper for 'gst_type_find_helper'

Tries to find what type of data is flowing from the given source Gst.Pad.

Free-function: gst_caps_unref

Parameters:

`src` (Gst.Pad) –

A source Gst.Pad

`size` (int) –

The length in bytes

Returns (Gst.Caps) –

the Gst.Caps corresponding to the data stream. Returns None if no Gst.Caps matches the data stream.

### gst_type_find_helper_for_buffer

    GstCaps *
    gst_type_find_helper_for_buffer (GstObject * obj,
                                     GstBuffer * buf,
                                     GstTypeFindProbability * prob)

Tries to find what type of data is contained in the given GstBuffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of GST_TYPE_FIND_MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or NULL if the content of the buffer could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`buf` ( [in][transfer: none]) –

a GstBuffer with data to typefind

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

### GstBase.prototype.type_find_helper_for_buffer

    function GstBase.prototype.type_find_helper_for_buffer(obj: Gst.Object, buf: Gst.Buffer): {
        // javascript wrapper for 'gst_type_find_helper_for_buffer'
    }

Tries to find what type of data is contained in the given Gst.Buffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of the buffer could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### GstBase.type_find_helper_for_buffer

    def GstBase.type_find_helper_for_buffer (obj, buf):
        #python wrapper for 'gst_type_find_helper_for_buffer'

Tries to find what type of data is contained in the given Gst.Buffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or None if the content of the buffer could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### gst_type_find_helper_for_buffer_with_caps

    GstCaps *
    gst_type_find_helper_for_buffer_with_caps (GstObject * obj,
                                               GstBuffer * buf,
                                               GstCaps * caps,
                                               GstTypeFindProbability * prob)

Tries to find if type of media contained in the given GstBuffer, matches caps specified, assumption being that the buffer represents the beginning of the stream or file.

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or NULL if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`buf` ( [transfer: none]) –

a GstBuffer with data to typefind

`caps` –

caps of the media

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

Since : 1.22

### GstBase.prototype.type_find_helper_for_buffer_with_caps

    function GstBase.prototype.type_find_helper_for_buffer_with_caps(obj: Gst.Object, buf: Gst.Buffer, caps: Gst.Caps): {
        // javascript wrapper for 'gst_type_find_helper_for_buffer_with_caps'
    }

Tries to find if type of media contained in the given Gst.Buffer, matches caps specified, assumption being that the buffer represents the beginning of the stream or file.

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or null if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

`caps` (Gst.Caps) –

caps of the media

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.22

### GstBase.type_find_helper_for_buffer_with_caps

    def GstBase.type_find_helper_for_buffer_with_caps (obj, buf, caps):
        #python wrapper for 'gst_type_find_helper_for_buffer_with_caps'

Tries to find if type of media contained in the given Gst.Buffer, matches caps specified, assumption being that the buffer represents the beginning of the stream or file.

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or None if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

`caps` (Gst.Caps) –

caps of the media

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.22

### gst_type_find_helper_for_buffer_with_extension

    GstCaps *
    gst_type_find_helper_for_buffer_with_extension (GstObject * obj,
                                                    GstBuffer * buf,
                                                    const gchar * extension,
                                                    GstTypeFindProbability * prob)

Tries to find what type of data is contained in the given GstBuffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of GST_TYPE_FIND_MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or NULL if the content of the buffer could not be identified.

When extension is not NULL, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`buf` ( [in][transfer: none]) –

a GstBuffer with data to typefind

`extension` ( [nullable]) –

extension of the media, or NULL

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

Since : 1.16

### GstBase.prototype.type_find_helper_for_buffer_with_extension

    function GstBase.prototype.type_find_helper_for_buffer_with_extension(obj: Gst.Object, buf: Gst.Buffer, extension: String): {
        // javascript wrapper for 'gst_type_find_helper_for_buffer_with_extension'
    }

Tries to find what type of data is contained in the given Gst.Buffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of the buffer could not be identified.

When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

`extension` (String) –

extension of the media, or null

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.16

### GstBase.type_find_helper_for_buffer_with_extension

    def GstBase.type_find_helper_for_buffer_with_extension (obj, buf, extension):
        #python wrapper for 'gst_type_find_helper_for_buffer_with_extension'

Tries to find what type of data is contained in the given Gst.Buffer, the assumption being that the buffer represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or None if the content of the buffer could not be identified.

When extension is not None, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`buf` (Gst.Buffer) –

a Gst.Buffer with data to typefind

`extension` (str) –

extension of the media, or None

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.16

### gst_type_find_helper_for_data

    GstCaps *
    gst_type_find_helper_for_data (GstObject * obj,
                                   const guint8 * data,
                                   gsize size,
                                   GstTypeFindProbability * prob)

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of GST_TYPE_FIND_MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or NULL if the content of data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`data` ( [transfer: none][arraylength=size]) –

- a pointer with data to typefind

`size` –

the size of data

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

### GstBase.prototype.type_find_helper_for_data

    function GstBase.prototype.type_find_helper_for_data(obj: Gst.Object, data: [ Number ], size: Number): {
        // javascript wrapper for 'gst_type_find_helper_for_data'
    }

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`data` ([ Number ]) –

- a pointer with data to typefind

`size` (Number) –

the size of data

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### GstBase.type_find_helper_for_data

    def GstBase.type_find_helper_for_data (obj, data, size):
        #python wrapper for 'gst_type_find_helper_for_data'

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or None if the content of data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`data` ([ int ]) –

- a pointer with data to typefind

`size` (int) –

the size of data

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### gst_type_find_helper_for_data_with_caps

    GstCaps *
    gst_type_find_helper_for_data_with_caps (GstObject * obj,
                                             const guint8 * data,
                                             gsize size,
                                             GstCaps * caps,
                                             GstTypeFindProbability * prob)

Tries to find if type of media contained in the given data, matches the caps specified, assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or NULL if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`data` ( [transfer: none][arraylength=size]) –

a pointer with data to typefind

`size` –

the size of data

`caps` –

caps of the media

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

Since : 1.22

### GstBase.prototype.type_find_helper_for_data_with_caps

    function GstBase.prototype.type_find_helper_for_data_with_caps(obj: Gst.Object, data: [ Number ], size: Number, caps: Gst.Caps): {
        // javascript wrapper for 'gst_type_find_helper_for_data_with_caps'
    }

Tries to find if type of media contained in the given data, matches the caps specified, assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or null if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`data` ([ Number ]) –

a pointer with data to typefind

`size` (Number) –

the size of data

`caps` (Gst.Caps) –

caps of the media

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.22

### GstBase.type_find_helper_for_data_with_caps

    def GstBase.type_find_helper_for_data_with_caps (obj, data, size, caps):
        #python wrapper for 'gst_type_find_helper_for_data_with_caps'

Tries to find if type of media contained in the given data, matches the caps specified, assumption being that the data represents the beginning of the stream or file.

Only the typefinder matching the given caps will be called, if found. The caps with the highest probability will be returned, or None if the content of the data could not be identified.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`data` ([ int ]) –

a pointer with data to typefind

`size` (int) –

the size of data

`caps` (Gst.Caps) –

caps of the media

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.22

### gst_type_find_helper_for_data_with_extension

    GstCaps *
    gst_type_find_helper_for_data_with_extension (GstObject * obj,
                                                  const guint8 * data,
                                                  gsize size,
                                                  const gchar * extension,
                                                  GstTypeFindProbability * prob)

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of GST_TYPE_FIND_MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or NULL if the content of data could not be identified.

When extension is not NULL, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`data` ( [transfer: none][arraylength=size]) –

- a pointer with data to typefind

`size` –

the size of data

`extension` ( [nullable]) –

extension of the media, or NULL

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

Since : 1.16

### GstBase.prototype.type_find_helper_for_data_with_extension

    function GstBase.prototype.type_find_helper_for_data_with_extension(obj: Gst.Object, data: [ Number ], size: Number, extension: String): {
        // javascript wrapper for 'gst_type_find_helper_for_data_with_extension'
    }

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or null if the content of data could not be identified.

When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`data` ([ Number ]) –

- a pointer with data to typefind

`size` (Number) –

the size of data

`extension` (String) –

extension of the media, or null

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.16

### GstBase.type_find_helper_for_data_with_extension

    def GstBase.type_find_helper_for_data_with_extension (obj, data, size, extension):
        #python wrapper for 'gst_type_find_helper_for_data_with_extension'

Tries to find what type of data is contained in the given data, the assumption being that the data represents the beginning of the stream or file.

All available typefinders will be called on the data in order of rank. If a typefinding function returns a probability of Gst.TypeFindProbability.MAXIMUM, typefinding is stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and the caps with the highest probability will be returned, or None if the content of data could not be identified.

When extension is not None, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`data` ([ int ]) –

- a pointer with data to typefind

`size` (int) –

the size of data

`extension` (str) –

extension of the media, or None

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

Since : 1.16

### gst_type_find_helper_for_extension

    GstCaps *
    gst_type_find_helper_for_extension (GstObject * obj,
                                        const gchar * extension)

Tries to find the best GstCaps associated with extension.

All available typefinders will be checked against the extension in order of rank. The caps of the first typefinder that can handle extension will be returned.

Free-function: gst_caps_unref

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`extension` –

an extension

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to extension, or NULL if no type could be found. The caller should free the caps returned with gst_caps_unref.

### GstBase.prototype.type_find_helper_for_extension

    function GstBase.prototype.type_find_helper_for_extension(obj: Gst.Object, extension: String): {
        // javascript wrapper for 'gst_type_find_helper_for_extension'
    }

Tries to find the best Gst.Caps associated with extension.

All available typefinders will be checked against the extension in order of rank. The caps of the first typefinder that can handle extension will be returned.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`extension` (String) –

an extension

Returns (Gst.Caps) –

the Gst.Caps corresponding to extension, or null if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### GstBase.type_find_helper_for_extension

    def GstBase.type_find_helper_for_extension (obj, extension):
        #python wrapper for 'gst_type_find_helper_for_extension'

Tries to find the best Gst.Caps associated with extension.

All available typefinders will be checked against the extension in order of rank. The caps of the first typefinder that can handle extension will be returned.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`extension` (str) –

an extension

Returns (Gst.Caps) –

the Gst.Caps corresponding to extension, or None if no type could be found. The caller should free the caps returned with gst_caps_unref (not introspectable).

### gst_type_find_helper_get_range

    GstCaps *
    gst_type_find_helper_get_range (GstObject * obj,
                                    GstObject * parent,
                                    GstTypeFindHelperGetRangeFunction func,
                                    guint64 size,
                                    const gchar * extension,
                                    GstTypeFindProbability * prob)

Utility function to do pull-based typefinding. Unlike gst_type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not NULL, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` –

A GstObject that will be passed as first argument to func

`parent` ( [nullable]) –

the parent of obj or NULL

`func` ( [scope call]) –

A generic GstTypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` –

The length in bytes

`extension` ( [nullable]) –

extension of the media, or NULL

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns ( [transfer: full][nullable]) –

the GstCaps corresponding to the data stream. Returns NULL if no GstCaps matches the data stream.

### GstBase.prototype.type_find_helper_get_range

    function GstBase.prototype.type_find_helper_get_range(obj: Gst.Object, parent: Gst.Object, func: GstBase.TypeFindHelperGetRangeFunction, size: Number, extension: String): {
        // javascript wrapper for 'gst_type_find_helper_get_range'
    }

Utility function to do pull-based typefinding. Unlike GstBase.prototype.type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

A Gst.Object that will be passed as first argument to func

`parent` (Gst.Object) –

the parent of obj or null

`func` (GstBase.TypeFindHelperGetRangeFunction) –

A generic GstBase.TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` (Number) –

The length in bytes

`extension` (String) –

extension of the media, or null

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data stream. Returns null if no Gst.Caps matches the data stream.

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data stream. Returns null if no Gst.Caps matches the data stream.

### GstBase.type_find_helper_get_range

    def GstBase.type_find_helper_get_range (obj, parent, func, size, extension):
        #python wrapper for 'gst_type_find_helper_get_range'

Utility function to do pull-based typefinding. Unlike GstBase.type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not None, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Free-function: gst_caps_unref

Parameters:

`obj` (Gst.Object) –

A Gst.Object that will be passed as first argument to func

`parent` (Gst.Object) –

the parent of obj or None

`func` (GstBase.TypeFindHelperGetRangeFunction) –

A generic GstBase.TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` (int) –

The length in bytes

`extension` (str) –

extension of the media, or None

Returns a tuple made of:

(Gst.Caps ) –

the Gst.Caps corresponding to the data stream. Returns None if no Gst.Caps matches the data stream.

`prob` (Gst.TypeFindProbability ) –

the Gst.Caps corresponding to the data stream. Returns None if no Gst.Caps matches the data stream.

### gst_type_find_helper_get_range_full

    GstFlowReturn
    gst_type_find_helper_get_range_full (GstObject * obj,
                                         GstObject * parent,
                                         GstTypeFindHelperGetRangeFunction func,
                                         guint64 size,
                                         const gchar * extension,
                                         GstCaps ** caps,
                                         GstTypeFindProbability * prob)

Utility function to do pull-based typefinding. Unlike gst_type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not NULL, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Parameters:

`obj` –

A GstObject that will be passed as first argument to func

`parent` ( [nullable]) –

the parent of obj or NULL

`func` ( [scope call]) –

A generic GstTypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` –

The length in bytes

`extension` ( [nullable]) –

extension of the media, or NULL

`caps` ( [out][transfer: full]) –

returned caps

`prob` ( [out][optional]) –

location to store the probability of the found caps, or NULL

Returns –

the last GstFlowReturn from pulling a buffer or GST_FLOW_OK if typefinding was successful.

Since : 1.14.3

### GstBase.prototype.type_find_helper_get_range_full

    function GstBase.prototype.type_find_helper_get_range_full(obj: Gst.Object, parent: Gst.Object, func: GstBase.TypeFindHelperGetRangeFunction, size: Number, extension: String): {
        // javascript wrapper for 'gst_type_find_helper_get_range_full'
    }

Utility function to do pull-based typefinding. Unlike GstBase.prototype.type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not null, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Parameters:

`obj` (Gst.Object) –

A Gst.Object that will be passed as first argument to func

`parent` (Gst.Object) –

the parent of obj or null

`func` (GstBase.TypeFindHelperGetRangeFunction) –

A generic GstBase.TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` (Number) –

The length in bytes

`extension` (String) –

extension of the media, or null

Returns a tuple made of:

(Gst.FlowReturn ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

`caps` (Gst.Caps ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

`prob` (Gst.TypeFindProbability ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

Since : 1.14.3

### GstBase.type_find_helper_get_range_full

    def GstBase.type_find_helper_get_range_full (obj, parent, func, size, extension):
        #python wrapper for 'gst_type_find_helper_get_range_full'

Utility function to do pull-based typefinding. Unlike GstBase.type_find_helper however, this function will use the specified function func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for the tag size, for example).

When extension is not None, this function will first try the typefind functions for the given extension, which might speed up the typefinding in many cases.

Parameters:

`obj` (Gst.Object) –

A Gst.Object that will be passed as first argument to func

`parent` (Gst.Object) –

the parent of obj or None

`func` (GstBase.TypeFindHelperGetRangeFunction) –

A generic GstBase.TypeFindHelperGetRangeFunction that will be used to access data at random offsets when doing the typefinding

`size` (int) –

The length in bytes

`extension` (str) –

extension of the media, or None

Returns a tuple made of:

(Gst.FlowReturn ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

`caps` (Gst.Caps ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

`prob` (Gst.TypeFindProbability ) –

the last Gst.FlowReturn from pulling a buffer or Gst.FlowReturn.OK if typefinding was successful.

Since : 1.14.3

### gst_type_find_list_factories_for_caps

    GList *
    gst_type_find_list_factories_for_caps (GstObject * obj,
                                           GstCaps * caps)

Tries to find the best GstTypeFindFactory associated with caps.

The typefinder that can handle caps will be returned.

Free-function: g_list_free

Parameters:

`obj` ( [nullable]) –

object doing the typefinding, or NULL (used for logging)

`caps` –

caps of the media

Returns ( [transfer: full][nullable][element-typeGst.TypeFindFactory]) –

the list of GstTypeFindFactory corresponding to caps, or NULL if no typefinder could be found. Caller should free the returned list with g_list_free and list elements with gst_object_unref.

Since : 1.22

### GstBase.prototype.type_find_list_factories_for_caps

    function GstBase.prototype.type_find_list_factories_for_caps(obj: Gst.Object, caps: Gst.Caps): {
        // javascript wrapper for 'gst_type_find_list_factories_for_caps'
    }

Tries to find the best Gst.TypeFindFactory associated with caps.

The typefinder that can handle caps will be returned.

Free-function: g_list_free

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or null (used for logging)

`caps` (Gst.Caps) –

caps of the media

Returns ([ Gst.TypeFindFactory ]) –

the list of Gst.TypeFindFactory corresponding to caps, or null if no typefinder could be found. Caller should free the returned list with g_list_free (not introspectable) and list elements with Gst.Object.prototype.unref.

Since : 1.22

### GstBase.type_find_list_factories_for_caps

    def GstBase.type_find_list_factories_for_caps (obj, caps):
        #python wrapper for 'gst_type_find_list_factories_for_caps'

Tries to find the best Gst.TypeFindFactory associated with caps.

The typefinder that can handle caps will be returned.

Free-function: g_list_free

Parameters:

`obj` (Gst.Object) –

object doing the typefinding, or None (used for logging)

`caps` (Gst.Caps) –

caps of the media

Returns ([ Gst.TypeFindFactory ]) –

the list of Gst.TypeFindFactory corresponding to caps, or None if no typefinder could be found. Caller should free the returned list with g_list_free (not introspectable) and list elements with Gst.Object.unref.

Since : 1.22

## Callbacks

### GstTypeFindHelperGetRangeFunction

    GstFlowReturn
    (*GstTypeFindHelperGetRangeFunction) (GstObject * obj,
                                          GstObject * parent,
                                          guint64 offset,
                                          guint length,
                                          GstBuffer ** buffer)

This function will be called by gst_type_find_helper_get_range when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.

This function is supposed to behave exactly like a GstPadGetRangeFunction.

Parameters:

`obj` –

a GstObject that will handle the getrange request

`parent` ( [allow-none]) –

the parent of obj or NULL

`offset` –

the offset of the range

`length` –

the length of the range

`buffer` ( [out]) –

a memory location to hold the result buffer

Returns –

GST_FLOW_OK for success

### GstBase.TypeFindHelperGetRangeFunction

    function GstBase.TypeFindHelperGetRangeFunction(obj: Gst.Object, parent: Gst.Object, offset: Number, length: Number): {
        // javascript wrapper for 'GstTypeFindHelperGetRangeFunction'
    }

This function will be called by GstBase.prototype.type_find_helper_get_range when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.

This function is supposed to behave exactly like a Gst.PadGetRangeFunction.

Parameters:

`obj` (Gst.Object) –

a Gst.Object that will handle the getrange request

`parent` (Gst.Object) –

the parent of obj or null

`offset` (Number) –

the offset of the range

`length` (Number) –

the length of the range

Returns a tuple made of:

(Gst.FlowReturn ) –

GST_FLOW_OK for success

`buffer` (Gst.Buffer ) –

GST_FLOW_OK for success

### GstBase.TypeFindHelperGetRangeFunction

    def GstBase.TypeFindHelperGetRangeFunction (obj, parent, offset, length):
        #python wrapper for 'GstTypeFindHelperGetRangeFunction'

This function will be called by GstBase.type_find_helper_get_range when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in buffer. The contents of buffer is invalid for any other return value.

This function is supposed to behave exactly like a Gst.PadGetRangeFunction.

Parameters:

`obj` (Gst.Object) –

a Gst.Object that will handle the getrange request

`parent` (Gst.Object) –

the parent of obj or None

`offset` (int) –

the offset of the range

`length` (int) –

the length of the range

Returns a tuple made of:

(Gst.FlowReturn ) –

GST_FLOW_OK for success

`buffer` (Gst.Buffer ) –

GST_FLOW_OK for success

The results of the search are