Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Related Functions

Gst::TypeFind Class Reference

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

List of all members.

Public Types

typedef sigc::slot< void > SlotFind
 For example, void on_find();.

Public Member Functions

 TypeFind ()
 TypeFind (const GstTypeFind* gobject)
GstTypeFind* gobj ()
 Provides access to the underlying C instance.
const GstTypeFind* gobj () const
 Provides access to the underlying C instance.
Glib::ArrayHandle< guint8 > peek (gint64 offset, guint size) const
 Returns the size bytes of the stream to identify beginning at offset.
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.
guint64 get_length () const
 Get the length of the data stream.

Static Public Member Functions

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.
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.
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.
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.
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.
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.
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.
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.

Protected Attributes

GstTypeFind gobject_

Related Functions

(Note that these are not member functions.)


Gst::TypeFindwrap (GstTypeFind* object)
const Gst::TypeFindwrap (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

For example, void on_find();.


Constructor & Destructor Documentation

Gst::TypeFind::TypeFind (  )
Gst::TypeFind::TypeFind ( const GstTypeFind *  gobject ) [explicit]

Member Function Documentation

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.
GstTypeFind* Gst::TypeFind::gobj (  ) [inline]

Provides access to the underlying C instance.

const GstTypeFind* Gst::TypeFind::gobj (  ) const [inline]

Provides access to the underlying C instance.

Glib::ArrayHandle<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 0 if that data is not available.

Parameters:
offsetThe offset.
sizeThe number of bytes to return.
Returns:
The requested data, or 0 if that data is not available.
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:
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
extensionsExtensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
capsThe caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).
Returns:
true on success, false otherwise.
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:
pluginA Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
Returns:
true on success, false otherwise.
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:
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
extensionsExtensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
Returns:
true on success, false otherwise.
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:
pluginA Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
capsThe caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).
Returns:
true on success, false otherwise.
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:
pluginA Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
extensionsExtensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
capsThe caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).
Returns:
true on success, false otherwise.
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:
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
Returns:
true on success, false otherwise.
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:
pluginA Gst::Plugin (for a static typefind function, i.e. one not related to any Gst::Plugin, use register_slot() without the Gst::Plugin argument).
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
extensionsExtensions belonging to this type (for no extensions use register_slot() with no extensions parameter).
Returns:
true on success, false otherwise.
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:
nameThe name for registering.
rankThe rank (or importance) of this typefind function.
find_slotThe Gst::TypeFind::SlotFind to use.
capsThe caps to be returned when typefinding succeeds (for no caps, use register_slot() with no caps argument).
Returns:
true on success, false otherwise.
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:
probabilityThe probability in percent that the suggestion is right.
capsThe fixed Gst::Caps to suggest.

Friends And Related Function Documentation

Gst::TypeFind& wrap ( GstTypeFind *  object ) [related]
Parameters:
objectThe C instance
Returns:
A C++ instance that wraps this C instance.
const Gst::TypeFind& wrap ( const GstTypeFind *  object ) [related]
Parameters:
objectThe C instance
Returns:
A C++ instance that wraps this C instance.

Member Data Documentation

GstTypeFind Gst::TypeFind::gobject_ [protected]

The documentation for this class was generated from the following file: