QAbstractPlanarVideoBuffer Class

The QAbstractPlanarVideoBuffer class is an abstraction for planar video data. More...

Header: #include <QAbstractPlanarVideoBuffer>
qmake: QT += multimedia
Since: Qt 5.4
Inherits: QAbstractVideoBuffer

Public Functions

QAbstractPlanarVideoBuffer(QAbstractVideoBuffer::HandleType type)
virtual ~QAbstractPlanarVideoBuffer()
virtual int map(QAbstractVideoBuffer::MapMode mode, int *numBytes, int [4] bytesPerLine = ..., uchar *[4] data = ...) = 0

Additional Inherited Members

Detailed Description

The QAbstractPlanarVideoBuffer class is an abstraction for planar video data.

QAbstractPlanarVideoBuffer extends QAbstractVideoBuffer to support mapping non-continuous planar video data. Implement this instead of QAbstractVideoBuffer when the abstracted video data stores planes in separate buffers or includes padding between planes which would interfere with calculating offsets from the bytes per line and frame height.

See also QAbstractVideoBuffer::mapPlanes().

Member Function Documentation

QAbstractPlanarVideoBuffer::QAbstractPlanarVideoBuffer(QAbstractVideoBuffer::HandleType type)

Constructs an abstract planar video buffer of the given type.

[virtual] QAbstractPlanarVideoBuffer::~QAbstractPlanarVideoBuffer()

Destroys an abstract planar video buffer.

[pure virtual] int QAbstractPlanarVideoBuffer::map(QAbstractVideoBuffer::MapMode mode, int *numBytes, int [4] bytesPerLine = ..., uchar *[4] data = ...)

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 buffer when initially mapped. If the map mode includes the QAbstractVideoBuffer::WriteOnly flag the content of the possibly modified mapped memory will be written back to 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 and possibly update the buffer contents.

Returns the number of planes in the mapped video data. For each plane the line stride of that plane will be returned in bytesPerLine, and a pointer to the plane data will be returned in data. The accumulative size of the mapped data is returned in numBytes.

See also QAbstractVideoBuffer::map(), QAbstractVideoBuffer::unmap(), and QAbstractVideoBuffer::mapMode().

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.