gstreamermm: Gst::Allocator Class Reference

gstreamermm 1.4.3

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

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

Public Member Functions | Static Public Member Functions | Related Functions | List of all members
Gst::Allocator Class Reference
Inheritance diagram for Gst::Allocator:
[legend]
Collaboration diagram for Gst::Allocator:
[legend]

## Public Member Functions
virtual | ~Allocator ()
GstAllocator* | gobj ()
| Provides access to the underlying C GObject. More...
const GstAllocator* | gobj () const
| Provides access to the underlying C GObject. More...
GstAllocator* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Public Member Functions inherited from Gst::Object
virtual | ~Object ()
GstObject* | gobj ()
| Provides access to the underlying C GObject. More...
const GstObject* | gobj () const
| Provides access to the underlying C GObject. More...
GstObject* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | is_element () const
bool | is_element_factory () const
bool | is_pad () const
bool | is_pad_template () const
bool | is_bin () const
guint32 | get_flags () const
| Returns the entire set of flags for the object. More...
bool | set_name (const Glib::ustring& name)
| Sets the name of object, or gives object a guaranteed unique name (if name is `0`). More...
Glib::ustring | get_name () const
| Returns a copy of the name of object. More...
bool | set_parent (const Glib::RefPtr< Gst::Object >& parent)
| Sets the parent of object to parent. More...
Glib::RefPtr< Gst::Object > | get_parent ()
| Returns the parent of object. More...
Glib::RefPtr< const Gst::Object > | get_parent () const
| Returns the parent of object. More...
void | unparent ()
| Clear the parent of object, removing the associated reference. More...
bool | has_ancestor (const Glib::RefPtr< const Gst::Object >& ancestor) const
| Check if object has an ancestor ancestor somewhere up in the hierarchy. More...
Glib::ustring | get_path_string ()
| Generates a string describing the path of object in the object hierarchy. More...
Glib::PropertyProxy < Glib::ustring > | property_name ()
| The name of the object. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_name () const
| The name of the object. More...
Glib::SignalProxy2< void, const Glib::RefPtr< Object > &, GParamSpec* > | signal_deep_notify ()
int | get_refcount () const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
Static Public Member Functions inherited from Gst::Object
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static bool | check_uniqueness (const Glib::ListHandle< const Gst::Object >& list, const Glib::ustring& name)
| Checks to see if there is any object named name in list. More...

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

## : the name of the allocator
: (transfer full): #GstAllocator
void | register_allocator (const Glib::ustring& name)
void | set_default ()
| Set the default allocator. More...
void | free (Glib::RefPtr< Gst::Memory >& memory)
| Free memory that was previously allocated with alloc(). More...
Glib::RefPtr< Gst::Memory > | alloc (gsize size, AllocationParams params)
| Use allocator to allocate a new memory block with memory that is at least size big. More...
virtual Glib::RefPtr< Gst::Memory > | alloc_vfunc (gsize size, AllocationParams params)
virtual void | free_vfunc (Glib::RefPtr< Gst::Memory >& memory)
static Glib::RefPtr < Gst::Allocator > | find (const Glib::ustring& name)
static Glib::RefPtr < Gst::Allocator > | get_default_allocator ()
| Find default allocator. More...

## Additional Inherited Members
Protected Member Functions inherited from Gst::Object
virtual void | on_deep_notify (const Glib::RefPtr< Object >& prop_object, GParamSpec* prop)
| This is a default handler for the signal signal_deep_notify(). More...

## Constructor & Destructor Documentation

virtual Gst::Allocator::~Allocator | ( |  | ) |
| virtual

## Member Function Documentation

Glib::RefPtr<Gst::Memory> Gst::Allocator::alloc | ( | gsize | size,
|  | AllocationParams | params
| ) |  |

Use allocator to allocate a new memory block with memory that is at least size big.

The optional params can specify the prefix and padding for the memory. If `0` is passed, no flags, no extra prefix/padding and a default alignment is used.

The prefix/padding will be filled with 0 if flags contains Gst::MEMORY_FLAG_ZERO_PREFIXED and Gst::MEMORY_FLAG_ZERO_PADDED respectively.

When allocator is `0`, the default allocator will be used.

The alignment in params is given as a bitmask so that align + 1 equals the amount of bytes to align to. For example, to align to 8 bytes, use an alignment of 7.

Parameters

  size | Size of the visible memory area.
  params | Optional parameters.

Returns
  A new Gst::Memory.

virtual Glib::RefPtr<Gst::Memory> Gst::Allocator::alloc_vfunc | ( | gsize | size,
|  | AllocationParams | params
| ) |  |
| virtual

static Glib::RefPtr<Gst::Allocator> Gst::Allocator::find | ( | const Glib::ustring & | name | ) |
| static

void Gst::Allocator::free | ( | Glib::RefPtr< Gst::Memory >& | memory | ) |

Free memory that was previously allocated with alloc().

Parameters

  memory | The memory to free.

virtual void Gst::Allocator::free_vfunc | ( | Glib::RefPtr< Gst::Memory >& | memory | ) |
| virtual

static Glib::RefPtr<Gst::Allocator> Gst::Allocator::get_default_allocator | ( |  | ) |
| static

Find default allocator.

Returns
  : default allocator.

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

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

GstAllocator* Gst::Allocator::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GstAllocator* Gst::Allocator::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GstAllocator* Gst::Allocator::gobj_copy | ( |  | ) |

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

void Gst::Allocator::register_allocator | ( | const Glib::ustring & | name | ) |

void Gst::Allocator::set_default | ( |  | ) |

Set the default allocator.

## Friends And Related Function Documentation

Glib::RefPtr< Gst::Allocator > wrap | ( | GstAllocator * | 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/allocator.h