Public Member Functions

QGst::BufferListIterator Class Reference

Wrapper class for GstBufferListIterator. More...

#include <QGst/BufferList>

List of all members.

Public Member Functions

 BufferListIterator (const BufferListPtr &list)
uint buffersInCurrentGroup () const
BufferPtr next ()
void insert (const BufferPtr &buffer)
void remove ()
BufferPtr take ()
void replace (const BufferPtr &other)
void addGroup ()
bool nextGroup ()
BufferPtr mergeGroup () const

Detailed Description

Wrapper class for GstBufferListIterator.

This class allows you to iterate through and modify a BufferList.

The iterator has no current buffer; its cursor position lies between buffers, immediately before the buffer that would be returned by next(). After iterating to the end of a group the iterator must be advanced to the next group by a call to nextGroup() before any further calls to next() can return buffers again.

The cursor position of a newly created iterator lies before the first group; a call to nextGroup() is necessary before calls to next() can return buffers.

See also:
BufferList

Definition at line 71 of file bufferlist.h.


Member Function Documentation

uint QGst::BufferListIterator::buffersInCurrentGroup (  )  const

Returns the number of buffers in the current group

Definition at line 47 of file bufferlist.cpp.

BufferPtr QGst::BufferListIterator::next (  ) 

Advances to the next buffer in the list. If a new group is reached, it will return a null BufferPtr.

Definition at line 52 of file bufferlist.cpp.

void QGst::BufferListIterator::insert ( const BufferPtr buffer  ) 

Inserts a new buffer in the current group, immediately before the buffer that would be returned by next().

Definition at line 57 of file bufferlist.cpp.

void QGst::BufferListIterator::remove (  ) 

Removes the last buffer returned by next() from the list.

Note:
You must call next() before calling this function and make sure it doesn't return a null BufferPtr.

Definition at line 62 of file bufferlist.cpp.

BufferPtr QGst::BufferListIterator::take (  ) 

Removes and returns the last buffer returned by next().

Note:
You must call next() before calling this function and make sure it doesn't return a null BufferPtr.

Definition at line 67 of file bufferlist.cpp.

void QGst::BufferListIterator::replace ( const BufferPtr other  ) 

Replaces the last buffer returned by next() with other. The buffer that was previously in its place will be unrefed.

Note:
You must call next() before calling this function and make sure it doesn't return a null BufferPtr.

Definition at line 74 of file bufferlist.cpp.

void QGst::BufferListIterator::addGroup (  ) 

Adds a new empty group in the list, imeediately before the group that would be returned by nextGroup(). The iterator is advanced to point at the beginning of the new group.

Definition at line 79 of file bufferlist.cpp.

bool QGst::BufferListIterator::nextGroup (  ) 

Advances the iterator to the beginning of the next group and returns true if it succeeded or false if there are no more groups.

Definition at line 84 of file bufferlist.cpp.

BufferPtr QGst::BufferListIterator::mergeGroup (  )  const

Merges all the buffers of the current group in a signle buffer and retruns it.

Definition at line 89 of file bufferlist.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator