Qt 4.8
|
#include <qimagevideobuffer_p.h>
Public Functions | |
uchar * | map (MapMode mode, int *numBytes, int *bytesPerLine) |
Maps the contents of a video buffer to memory. More... | |
MapMode | mapMode () const |
Returns the mode a video buffer is mapped in. More... | |
QImageVideoBuffer (const QImage &image) | |
void | unmap () |
Releases the memory mapped by the map() function. More... | |
~QImageVideoBuffer () | |
Public Functions inherited from QAbstractVideoBuffer | |
virtual QVariant | handle () const |
Returns a type specific handle to the data buffer. More... | |
HandleType | handleType () const |
Returns the type of a video buffer's handle. More... | |
QAbstractVideoBuffer (HandleType type) | |
Constructs an abstract video buffer of the given type. More... | |
virtual | ~QAbstractVideoBuffer () |
Destroys an abstract video buffer. More... | |
Additional Inherited Members | |
Public Types inherited from QAbstractVideoBuffer | |
enum | HandleType { NoHandle, GLTextureHandle, XvShmImageHandle, CoreImageHandle, QPixmapHandle, UserHandle = 1000 } |
Identifies the type of a video buffers handle. More... | |
enum | MapMode { NotMapped = 0x00, ReadOnly = 0x01, WriteOnly = 0x02, ReadWrite = ReadOnly | WriteOnly } |
Enumerates how a video buffer's data is mapped to memory. More... | |
Protected Functions inherited from QAbstractVideoBuffer | |
QAbstractVideoBuffer (QAbstractVideoBufferPrivate &dd, HandleType type) | |
Protected Variables inherited from QAbstractVideoBuffer | |
QAbstractVideoBufferPrivate * | d_ptr |
Definition at line 64 of file qimagevideobuffer_p.h.
QImageVideoBuffer::QImageVideoBuffer | ( | const QImage & | image | ) |
Definition at line 63 of file qimagevideobuffer.cpp.
QImageVideoBuffer::~QImageVideoBuffer | ( | ) |
Definition at line 71 of file qimagevideobuffer.cpp.
Maps the contents of a video buffer to memory.
The map mode indicates whether the contents of the mapped memory should be read from and/or written to the buffer. If the map mode includes the QAbstractVideoBuffer::ReadOnly flag the mapped memory will be populated with the content of the video buffer when mapped. If the map mode includes the QAbstractVideoBuffer::WriteOnly flag the content of the mapped memory will be persisted in the buffer when unmapped.
When access to the data is no longer needed be sure to call the unmap() function to release the mapped memory.
Returns a pointer to the mapped memory region, or a null pointer if the mapping failed. The size in bytes of the mapped memory region is returned in numBytes, and the line stride in bytesPerLine.
When access to the data is no longer needed be sure to unmap() the buffer.
Implements QAbstractVideoBuffer.
Definition at line 80 of file qimagevideobuffer.cpp.
|
virtual |
Returns the mode a video buffer is mapped in.
Implements QAbstractVideoBuffer.
Definition at line 75 of file qimagevideobuffer.cpp.
|
virtual |
Releases the memory mapped by the map() function.
If the QAbstractVideoBuffer::MapMode{MapMode} included the QAbstractVideoBuffer::WriteOnly flag this will persist the current content of the mapped memory to the video frame.
Implements QAbstractVideoBuffer.
Definition at line 99 of file qimagevideobuffer.cpp.