gstreamermm
1.10.0
|
A grouped scatter data buffer type for data-passing. More...
#include <gstreamermm/bufferlist.h>
Public Types | |
typedef sigc::slot< bool, Glib::RefPtr< Gst::Buffer >&, guint > | SlotForeach |
For example, Gst::BufferListItem on_foreach(const Glib::RefPtr<Gst::Buffer>& buffer, guint group, guint idx);. More... | |
![]() | |
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... | |
GstBufferList* | gobj () |
Provides access to the underlying C instance. More... | |
const GstBufferList* | gobj () const |
Provides access to the underlying C instance. More... | |
GstBufferList* | 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... | |
BufferList ()=delete | |
BufferList (const BufferList&)=delete | |
BufferList& | operator= (const BufferList&)=delete |
void | remove (guint idx, guint length) |
Remove length buffers starting from idx in list. More... | |
Glib::RefPtr< Gst::Buffer > | remove (guint idx) |
Get the buffer at idx. More... | |
guint | length () const |
Returns the number of buffers in list. More... | |
void | copy () const |
Create a shallow copy of the given buffer list. More... | |
void | copy_deep () const |
Create a copy of the given buffer list. More... | |
void | insert (gint idx, Glib::RefPtr< Gst::Buffer >&& buffer) |
Insert buffer at idx in list. More... | |
void | insert (gint idx, const Glib::RefPtr< Gst::Buffer >& buffer) |
A insert() convenience overload. Allows to re-use buffer parameter after function call. More... | |
void | foreach (const SlotForeach& slot) |
Call slot for each buffer in list. More... | |
Glib::RefPtr< Gst::Buffer > | get (guint idx) |
Get the buffer at idx. More... | |
Glib::RefPtr< const Gst::Buffer > | get (guint idx) const |
Get the buffer at idx. More... | |
![]() | |
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 ()=delete | |
MiniObject (const MiniObject&)=delete | |
MiniObject& | operator= (const MiniObject&)=delete |
~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... | |
Static Public Member Functions | |
static Glib::RefPtr< BufferList > | create () |
Protected Member Functions | |
void | operator delete (void*, std::size_t) |
![]() | |
void | operator delete (void*, std::size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gst::BufferList > | wrap (GstBufferList* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
![]() | |
Glib::RefPtr< Gst::MiniObject > | wrap (GstMiniObject* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
A grouped scatter data buffer type for data-passing.
Buffer lists are units of grouped scatter/gather data transfer in GStreamer.
Buffer lists are created with create() and filled with data using a Gst::BufferListIterator. The iterator has no current buffer; its cursor position lies between buffers, immediately before the buffer that would be returned by Gst::BufferListIterator::next(). After iterating to the end of a group the iterator must be advanced to the next group by a call to Gst::BufferListIterator::next_group() before any further calls to Gst::BufferListIterator::next() can return buffers again. The cursor position of a newly created iterator lies before the first group; a call to Gst::BufferListIterator::next_group() is necessary before calls to Gst::BufferListIterator::next() can return buffers.
For more details, see the C API docs.
typedef sigc::slot< bool, Glib::RefPtr<Gst::Buffer>&, guint> Gst::BufferList::SlotForeach |
For example, Gst::BufferListItem on_foreach(const Glib::RefPtr<Gst::Buffer>& buffer, guint group, guint idx);.
A slot that will be called from foreach(). The buffer field will be a reference to the buffer at idx in group.
When this function returns Gst::BUFFER_LIST_CONTINUE, the next buffer will be returned. When Gst::BUFFER_LIST_SKIP_GROUP is returned, all remaining buffers in the current group will be skipped and the first buffer of the next group is returned (if any). When Gst::BUFFER_LIST_END is returned, foreach() will return.
When the buffer is set to 0, the item will be removed from the bufferlist. When the buffer has been made writable, the new buffer reference can be assigned to the buffer.
|
delete |
|
delete |
void Gst::BufferList::copy | ( | ) | const |
Create a shallow copy of the given buffer list.
This will make a newly allocated copy of the source list with copies of buffer pointers. The refcount of buffers pointed to will be increased by one.
void Gst::BufferList::copy_deep | ( | ) | const |
Create a copy of the given buffer list.
This will make a newly allocated copy of the buffer that the source buffer list contains.
|
static |
void Gst::BufferList::foreach | ( | const SlotForeach& | slot | ) |
Call slot for each buffer in list.
slot can modify the passed buffer pointer or its contents. The return value of slot define if this function returns or if the remaining buffers in a group should be skipped.
slot | A SlotForeach to call on each buffer. |
Since 0.10.24
Glib::RefPtr<Gst::Buffer> Gst::BufferList::get | ( | guint | idx | ) |
Get the buffer at idx.
idx | The index. |
nullptr
when there is no buffer. The buffer remains valid as long as list is valid and buffer is not removed from the list. Glib::RefPtr<const Gst::Buffer> Gst::BufferList::get | ( | guint | idx | ) | const |
Get the buffer at idx.
idx | The index. |
nullptr
when there is no buffer. The buffer remains valid as long as list is valid and buffer is not removed from the list. GstBufferList* Gst::BufferList::gobj | ( | ) |
Provides access to the underlying C instance.
const GstBufferList* Gst::BufferList::gobj | ( | ) | const |
Provides access to the underlying C instance.
GstBufferList* Gst::BufferList::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::BufferList::insert | ( | gint | idx, |
Glib::RefPtr< Gst::Buffer >&& | buffer | ||
) |
Insert buffer at idx in list.
Other buffers are moved to make room for this new buffer.
A -1 value for idx will append the buffer at the end.
idx | The index. |
buffer | A Gst::Buffer. |
void Gst::BufferList::insert | ( | gint | idx, |
const Glib::RefPtr< Gst::Buffer >& | buffer | ||
) |
A insert() convenience overload. Allows to re-use buffer parameter after function call.
guint Gst::BufferList::length | ( | ) | const |
Returns the number of buffers in list.
|
protected |
|
delete |
void Gst::BufferList::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::BufferList::remove | ( | guint | idx, |
guint | length | ||
) |
Remove length buffers starting from idx in list.
The following buffers are moved to close the gap.
idx | The index. |
length | The amount to remove. |
Glib::RefPtr<Gst::Buffer> Gst::BufferList::remove | ( | guint | idx | ) |
Get the buffer at idx.
idx | The index. |
nullptr
when there is no buffer. The buffer remains valid as long as list is valid and buffer is not removed from the list. void Gst::BufferList::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
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. |