gstreamermm 1.10.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Related Functions | List of all members
Gst::TypeFind Class Reference

A class used for stream type detection. More...

`#include <gstreamermm/typefind.h>`

## Public Types
typedef sigc::slot< void > | SlotFind
| For example, void on_find();. More...

## Public Member Functions
| TypeFind (const TypeFind& other) noexcept
TypeFind& | operator= (const TypeFind& other) noexcept
| TypeFind (TypeFind&& other) noexcept
TypeFind& | operator= (TypeFind&& other) noexcept
| TypeFind ()
| TypeFind (const GstTypeFind* gobject)
GstTypeFind* | gobj ()
| Provides access to the underlying C instance. More...
const GstTypeFind* | gobj () const
| Provides access to the underlying C instance. More...
std::vector< guint8 > | peek (gint64 offset, guint size) const
| Returns the size bytes of the stream to identify beginning at offset. More...
void | suggest (guint probability, const Glib::RefPtr< const Gst::Caps >& caps) const
| If a Gst::TypeFind::SlotFind calls this method it suggests the caps with the given probability. More...
guint64 | get_length () const
| Get the length of the data stream. More...

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static bool | register_slot (const Glib::RefPtr< Gst::Plugin >& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions, const Glib::RefPtr< const Gst::Caps >& caps)
| Registers a new typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::RefPtr< Gst::Plugin >& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::RefPtr< const Gst::Caps >& caps)
| Registers a new typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::RefPtr< Gst::Plugin >& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions)
| Registers a new typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::RefPtr< Gst::Plugin >& plugin, const Glib::ustring& name, guint rank, const SlotFind& find_slot)
| Registers a new typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions, const Glib::RefPtr< const Gst::Caps >& caps)
| Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::RefPtr< const Gst::Caps >& caps)
| Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::ustring& name, guint rank, const SlotFind& find_slot, const Glib::StringArrayHandle& extensions)
| Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding. More...
static bool | register_slot (const Glib::ustring& name, guint rank, const SlotFind& find_slot)
| Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding. More...

## Protected Attributes
GstTypeFind | gobject_

## Related Functions
(Note that these are not member functions.)
Gst::TypeFind& | wrap (GstTypeFind* object)
const Gst::TypeFind& | wrap (const GstTypeFind* object)

## Detailed Description

A class used for stream type detection.

Gst::TypeFind methods allow you to detect the media type of an unknown stream.

Last reviewed on 2005-11-09 (0.9.4).

## Member Typedef Documentation

## ◆ SlotFind

typedef sigc::slot<void> Gst::TypeFind::SlotFind

For example, void on_find();.

## Constructor & Destructor Documentation

## ◆ TypeFind() [1/4]

Gst::TypeFind::TypeFind | ( | const TypeFind& | other | ) |
| noexcept

## ◆ TypeFind() [2/4]

Gst::TypeFind::TypeFind | ( | TypeFind&& | other | ) |
| noexcept

## ◆ TypeFind() [3/4]

Gst::TypeFind::TypeFind | ( |  | ) |

## ◆ TypeFind() [4/4]

Gst::TypeFind::TypeFind | ( | const GstTypeFind * | gobject | ) |
| explicit

## Member Function Documentation

## ◆ get_length()

guint64 Gst::TypeFind::get_length | ( |  | ) | const

Get the length of the data stream.

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

## ◆ get_type()

static GType Gst::TypeFind::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ gobj() [1/2]

GstTypeFind* Gst::TypeFind::gobj | ( |  | ) |
| inline

Provides access to the underlying C instance.

## ◆ gobj() [2/2]

const GstTypeFind* Gst::TypeFind::gobj | ( |  | ) | const
| inline

Provides access to the underlying C instance.

## ◆ operator=() [1/2]

TypeFind& Gst::TypeFind::operator= | ( | const TypeFind& | other | ) |
| noexcept

## ◆ operator=() [2/2]

TypeFind& Gst::TypeFind::operator= | ( | TypeFind&& | other | ) |
| noexcept

## ◆ peek()

std::vector<guint8> Gst::TypeFind::peek | ( | gint64 | offset,
|  | guint | size
| ) |  | const

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.

Returns: the requested data, or `nullptr` if that data is not available.

Parameters

  offset | The offset.
  size | The number of bytes to return.

Returns
  The requested data, or `nullptr` if that data is not available.

## ◆ register_slot() [1/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::RefPtr< Gst::Plugin >& | plugin,
|  | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot
| ) |  |
| static

Registers a new typefind slot to be used for typefinding.

After registering the slot will be available for typefinding. This method is typically called during an element's plugin initialization.

Parameters

  plugin | A Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.

Returns
  true on success, false otherwise.

## ◆ register_slot() [2/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::RefPtr< Gst::Plugin >& | plugin,
|  | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::RefPtr< const Gst::Caps >& | caps
| ) |  |
| static

Registers a new typefind slot to be used for typefinding.

After registering the slot will be available for typefinding. This method is typically called during an element's plugin initialization.

Parameters

  plugin | A Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  caps | The caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).

Returns
  true on success, false otherwise.

## ◆ register_slot() [3/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::RefPtr< Gst::Plugin >& | plugin,
|  | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::StringArrayHandle & | extensions
| ) |  |
| static

Registers a new typefind slot to be used for typefinding.

After registering the slot will be available for typefinding. This method is typically called during an element's plugin initialization.

Parameters

  plugin | A Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  extensions | Extensions belonging to this type (for no extensions use register_slot() with no extensions parameter).

Returns
  true on success, false otherwise.

## ◆ register_slot() [4/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::RefPtr< Gst::Plugin >& | plugin,
|  | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::StringArrayHandle & | extensions,
|  | const Glib::RefPtr< const Gst::Caps >& | caps
| ) |  |
| static

Registers a new typefind slot to be used for typefinding.

After registering the slot will be available for typefinding. This method is typically called during an element's plugin initialization.

Parameters

  plugin | A Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  extensions | Extensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
  caps | The caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).

Returns
  true on success, false otherwise.

## ◆ register_slot() [5/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot
| ) |  |
| static

Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding.

After registering the slot will be available for typefinding.

Parameters

  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.

Returns
  true on success, false otherwise.

## ◆ register_slot() [6/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::RefPtr< const Gst::Caps >& | caps
| ) |  |
| static

Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding.

After registering the slot will be available for typefinding.

Parameters

  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  caps | The caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).

Returns
  true on success, false otherwise.

## ◆ register_slot() [7/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::StringArrayHandle & | extensions
| ) |  |
| static

Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding.

After registering the slot will be available for typefinding.

Parameters

  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  extensions | Extensions belonging to this type (for no extensions use register_slot() with no extensions parameter).

Returns
  true on success, false otherwise.

## ◆ register_slot() [8/8]

static bool Gst::TypeFind::register_slot | ( | const Glib::ustring & | name,
|  | guint | rank,
|  | const SlotFind& | find_slot,
|  | const Glib::StringArrayHandle & | extensions,
|  | const Glib::RefPtr< const Gst::Caps >& | caps
| ) |  |
| static

Registers a new static (not requiring a Gst::Plugin) typefind slot to be used for typefinding.

After registering the slot will be available for typefinding.

Parameters

  name | The name for registering.
  rank | The rank (or importance) of this typefind function.
  find_slot | The Gst::TypeFind::SlotFind to use.
  extensions | Extensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
  caps | The caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).

Returns
  true on success, false otherwise.

## ◆ suggest()

void Gst::TypeFind::suggest | ( | guint | probability,
|  | const Glib::RefPtr< const Gst::Caps >& | caps
| ) |  | const

If a Gst::TypeFind::SlotFind calls this method it suggests the caps with the given probability.

A Gst::TypeFind::SlotFind may supply different suggestions in one call. It is up to the caller of the Gst::TypeFind::SlotFind to interpret these values.

Parameters

  probability | The probability in percent that the suggestion is right.
  caps | The fixed Gst::Caps to suggest.

## Friends And Related Function Documentation

## ◆ wrap() [1/2]

const Gst::TypeFind& wrap | ( | const GstTypeFind * | object | ) |
| related

Parameters

  object | The C instance

Returns
  A C++ instance that wraps this C instance.

## ◆ wrap() [2/2]

Gst::TypeFind& wrap | ( | GstTypeFind * | object | ) |
| related

Parameters

  object | The C instance

Returns
  A C++ instance that wraps this C instance.

## Member Data Documentation

## ◆ gobject_

GstTypeFind Gst::TypeFind::gobject_
| protected