gstreamermm  1.4.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gst::Memory Class Reference

GstMemory is a lightweight refcounted object that wraps a region of memory. More...

Inheritance diagram for Gst::Memory:
Inheritance graph
[legend]
Collaboration diagram for Gst::Memory:
Collaboration graph
[legend]

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...
 
GstMemory* gobj ()
 Provides access to the underlying C instance. More...
 
const GstMemory* gobj () const
 Provides access to the underlying C instance. More...
 
GstMemory* 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...
 
gsize get_maxsize () const
 
gsize get_align () const
 
gsize get_offset () const
 
gsize get_size () const
 
- Public Member Functions inherited from Gst::MiniObject
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< MiniObjectcreate_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...
 
QuarkDataget_qdata (GQuark quark) const
 This function gets back user data pointers stored via set_qdata(). More...
 
QuarkDatasteal_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...
 

Static Public Member Functions

static Glib::RefPtr< Memorycreate (Gst::MemoryFlags flags, gpointer data, gsize maxsize, gsize offset, gsize size)
 

Protected Member Functions

 Memory ()
 
void operator delete (void*, std::size_t)
 
- Protected Member Functions inherited from Gst::MiniObject
 MiniObject ()
 
void operator delete (void*, std::size_t)
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gst::Memorywrap (GstMemory* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Additional Inherited Members

- Public Types inherited from Gst::MiniObject
typedef sigc::slot< void > SlotFinalizer
 

Detailed Description

GstMemory is a lightweight refcounted object that wraps a region of memory.

They are typically used to manage the data of a #GstBuffer.

A GstMemory object has an allocated region of memory of maxsize. The maximum size does not change during the lifetime of the memory object. The memory also has an offset and size property that specifies the valid range of memory in the allocated region.

Constructor & Destructor Documentation

Gst::Memory::Memory ( )
protected

Member Function Documentation

static Glib::RefPtr<Memory> Gst::Memory::create ( Gst::MemoryFlags  flags,
gpointer  data,
gsize  maxsize,
gsize  offset,
gsize  size 
)
static
gsize Gst::Memory::get_align ( ) const
gsize Gst::Memory::get_maxsize ( ) const
gsize Gst::Memory::get_offset ( ) const
gsize Gst::Memory::get_size ( ) const
GstMemory* Gst::Memory::gobj ( )

Provides access to the underlying C instance.

const GstMemory* Gst::Memory::gobj ( ) const

Provides access to the underlying C instance.

GstMemory* Gst::Memory::gobj_copy ( ) const

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

void Gst::Memory::operator delete ( void *  ,
std::size_t   
)
protected
void Gst::Memory::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::Memory::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::Memory > wrap ( GstMemory *  object,
bool  take_copy = false 
)
related

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

Parameters
objectThe C instance.
take_copyFalse 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: