gstreamermm: Gst::MiniObject Class Reference

# Gst::MiniObject Class Reference

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

`#include <miniobject.h>`

Inheritance diagram for Gst::MiniObject:

List of all members.

## Public Member Functions
| MiniObject ()
| MiniObject (GstMiniObject* castitem, bool take_copy=false)
virtual | ~MiniObject ()
| MiniObject (const MiniObject&)
| A copy constructor.
MiniObject& | operator= (const MiniObject&)
| Assignment operator.
guint | get_flags () const
| Returns the entire set of flags for the mini-object.
bool | flag_is_set (guint flag) const
| Checks to see if the given flag is set.
void | set_flag (guint flag)
| Sets the given bits.
void | unset_flag (guint flag)
| Unsets the given bits.
Glib::RefPtr<Gst::MiniObject> | copy () const
| Creates a copy of the mini-object.
bool | is_writable () const
| Checks if a mini-object is writable.
Glib::RefPtr<Gst::MiniObject> | create_writable ()
| Checks if a mini-object is writable.
void | reference () const
void | unreference () const
GstMiniObject* | gobj ()
| Provides access to the underlying C GstMiniObject.
const GstMiniObject* | gobj () const
| Provides access to the underlying C GstMiniObject.
## Protected Member Functions
void | swap (MiniObject& other)
## Protected Attributes
GstMiniObject* | gobject_
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr<Gst::MiniObject> | wrap (GstMiniObject* object, bool take_copy=false)

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

## Constructor & Destructor Documentation

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

Gst::MiniObject::MiniObject | ( | GstMiniObject * | castitem,
|  | bool | take_copy = `false` |
| ) |  |  |

virtual Gst::MiniObject::~MiniObject | ( |  | ) | `[virtual]`

Gst::MiniObject::MiniObject | ( | const MiniObject& |  | ) |

A copy constructor.

Please note that copying is actually only supported in sub-classes that define their own custom copy function in the C API such as Gst::Event, Gst::Buffer, etc. otherwise the copy is not successful and a warning is issued.

## Member Function Documentation

MiniObject& Gst::MiniObject::operator= | ( | const MiniObject& |  | ) |

Assignment operator.

Please note that copying is actually only supported in sub-classes that define their own custom copy function in the C API such as Gst::Event, Gst::Buffer, etc. otherwise the copy is not successful and a warning is issued.

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

Returns the entire set of flags for the mini-object.

Returns:
  The Gst::MiniObject flags.

bool Gst::MiniObject::flag_is_set | ( | guint | flag | ) | const

Checks to see if the given flag is set.

Parameters:

  | flag | The flag to check for.

void Gst::MiniObject::set_flag | ( | guint | flag | ) |

Sets the given bits.

Parameters:

  | flag | The flag to set, can by any number of bits in guint32.

void Gst::MiniObject::unset_flag | ( | guint | flag | ) |

Unsets the given bits.

Parameters:

  | flag | The flag to unset, must be a single bit in guint32.

Glib::RefPtr<Gst::MiniObject> Gst::MiniObject::copy | ( |  | ) | const

Creates a copy of the mini-object.

Please note that copying is supported only by sub-classes of Gst::MiniObject such as Gst::Event, Gst::Buffer, etc. that define their own custom copy function in the C API and not directly by Gst::MiniObject, a base class. If used from only a Gst::MiniObject instance and not a sub-class instance the copy is not successful and a warning is issued.

MT safe.

Returns:
  A copy of the mini-object or warn if this object is only a Gst::MiniObject and not a sub-class that defines its own copy function.

Reimplemented in Gst::Buffer, Gst::Event, Gst::Message, and Gst::Query.

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

Checks if a mini-object is writable.

A mini-object is writable if the reference count is one and the Gst::MINI_OBJECT_FLAG_READONLY flag is not set. Modification of a mini-object should only be done after verifying that it is writable.

MT safe

Returns:
  true if the object is writable.

Glib::RefPtr<Gst::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.

Reimplemented in Gst::Buffer, Gst::Event, Gst::Message, and Gst::Query.

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

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

GstMiniObject* Gst::MiniObject::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GstMiniObject.

Reimplemented in Gst::Buffer, Gst::Event, Gst::Message, and Gst::Query.

References gobject_.

const GstMiniObject* Gst::MiniObject::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GstMiniObject.

Reimplemented in Gst::Buffer, Gst::Event, Gst::Message, and Gst::Query.

References gobject_.

void Gst::MiniObject::swap | ( | MiniObject& | other | ) | `[protected]`

## Friends And Related Function Documentation

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

## Member Data Documentation

GstMiniObject* Gst::MiniObject::gobject_`[protected]`

Referenced by Gst::Query::gobj(), and gobj().

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

- miniobject.h
- wrap.h