gstreamermm 1.4.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gst::MiniObject Class Reference

This is a base class for some gstreamermm objects. More...

Inheritance diagram for Gst::MiniObject:
[legend]

## Public Types
typedef sigc::slot< void > | SlotFinalizer

## Public Member Functions
void | reference () const
| Increment the reference count for this object. More...
void | unreference () const
| Decrement the reference count for this object. More...
GstMiniObject* | gobj ()
| Provides access to the underlying C instance. More...
const GstMiniObject* | gobj () const
| Provides access to the underlying C instance. More...
GstMiniObject* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
| ~MiniObject ()
guint | get_flags () const
void | set_flags (const guint& value)
gint | get_refcount () const
gint | get_lockstate () const
bool | lock (LockFlags flags)
| Lock the mini-object with the specified access mode in flags. More...
void | unlock (LockFlags flags)
| Unlock the mini-object with the specified access mode in flags. More...
bool | is_writable () const
| If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object. More...
Glib::RefPtr< MiniObject > | create_writable ()
| Checks if a mini-object is writable. More...
void | set_qdata (GQuark quark, QuarkData* data)
| This sets an opaque, named pointer on a miniobject. More...
QuarkData* | get_qdata (GQuark quark) const
| This function gets back user data pointers stored via set_qdata(). More...
QuarkData* | steal_qdata (GQuark quark)
| This function gets back user data pointers stored via set_qdata() and removes the data from object without invoking its destroy() function (if any was set). More...
void | add_finalize_notifier (const SlotFinalizer& slot)
| Adds notifier when mini object is finalized. More...
void | remove_finalize_notifier ()
| Remove finalize notifier. More...

## Protected Member Functions
| MiniObject ()
void | operator delete (void*, std::size_t)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gst::MiniObject > | wrap (GstMiniObject* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Detailed Description

This is a base class for some gstreamermm objects.

It is similar to Glib::Object but has no GObject property or signal support.

## Member Typedef Documentation

typedef sigc::slot< void > Gst::MiniObject::SlotFinalizer

## Constructor & Destructor Documentation

Gst::MiniObject::MiniObject | ( |  | ) |
| protected

Gst::MiniObject::~MiniObject | ( |  | ) |

## Member Function Documentation

void Gst::MiniObject::add_finalize_notifier | ( | const SlotFinalizer& | slot | ) |

Adds notifier when mini object is finalized.

Parameters

  slot | notifier.

Glib::RefPtr<MiniObject> Gst::MiniObject::create_writable | ( |  | ) |

Checks if a mini-object is writable.

If not, a writable copy is made and returned. This gives away the reference to the original mini object, and returns a reference to the new object.

MT safe

Returns
  A mini-object (possibly the same pointer) that is writable.

guint Gst::MiniObject::get_flags | ( |  | ) | const

gint Gst::MiniObject::get_lockstate | ( |  | ) | const

QuarkData* Gst::MiniObject::get_qdata | ( | GQuark | quark | ) | const

This function gets back user data pointers stored via set_qdata().

Parameters

  quark | a GQuark, naming the user data pointer.

Returns
  the user data pointer set, or NULL.

gint Gst::MiniObject::get_refcount | ( |  | ) | const

GstMiniObject* Gst::MiniObject::gobj | ( |  | ) |

Provides access to the underlying C instance.

const GstMiniObject* Gst::MiniObject::gobj | ( |  | ) | const

Provides access to the underlying C instance.

GstMiniObject* Gst::MiniObject::gobj_copy | ( |  | ) | const

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Gst::MiniObject::is_writable | ( |  | ) | const

If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object.

If the LOCKABLE flag is not set, check if the refcount of mini_object is exactly 1, meaning that no other reference exists to the object and that the object is therefore writable.

Modification of a mini-object should only be done after verifying that it is writable.

Returns
  `true` if the object is writable.

bool Gst::MiniObject::lock | ( | LockFlags | flags | ) |

Lock the mini-object with the specified access mode in flags.

Parameters

  flags | Gst::LockFlags.

Returns
  `true` if object could be locked.

void Gst::MiniObject::operator delete | ( | void * | ,
|  | std::size_t |
| ) |  |
| protected

void Gst::MiniObject::reference | ( |  | ) | const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

void Gst::MiniObject::remove_finalize_notifier | ( |  | ) |

Remove finalize notifier.

void Gst::MiniObject::set_flags | ( | const guint & | value | ) |

void Gst::MiniObject::set_qdata | ( | GQuark | quark,
|  | QuarkData* | data
| ) |  |

This sets an opaque, named pointer on a miniobject.

The name is specified through a #GQuark (retrived e.g. via g_quark_from_static_string()), and the pointer can be gotten back with get_qdata(). Setting a previously set user data pointer, overrides (frees) the old pointer set, using NULL as pointer essentially removes the data stored.

Parameters

  quark | a GQuark, naming the user data pointer.
  data | an opaque user data pointer.

QuarkData* Gst::MiniObject::steal_qdata | ( | GQuark | quark | ) |

This function gets back user data pointers stored via set_qdata() and removes the data from object without invoking its destroy() function (if any was set).

Parameters

  quark | A Quark, naming the user data pointer.

Returns
  The user data pointer set, or `0`.

void Gst::MiniObject::unlock | ( | LockFlags | flags | ) |

Unlock the mini-object with the specified access mode in flags.

Parameters

  flags | Gst::LockFlags.

void Gst::MiniObject::unreference | ( |  | ) | const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

## Friends And Related Function Documentation

Glib::RefPtr< Gst::MiniObject > wrap | ( | GstMiniObject * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

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

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

- gstreamermm/miniobject.h