QAbstractVideoBuffer

Synopsis

Functions

Virtual functions

Detailed Description

The PySide.QtMultimedia.QAbstractVideoBuffer class is an abstraction for video data.

The PySide.QtMultimedia.QVideoFrame class makes use of a PySide.QtMultimedia.QAbstractVideoBuffer internally to reference a buffer of video data. Creating a subclass of PySide.QtMultimedia.QAbstractVideoBuffer will allow you to construct video frames from preallocated or static buffers.

The contents of a buffer can be accessed by mapping the buffer to memory using the PySide.QtMultimedia.QAbstractVideoBuffer.map() function which returns a pointer to memory containing the contents of the the video buffer. The memory returned by PySide.QtMultimedia.QAbstractVideoBuffer.map() is released by calling the PySide.QtMultimedia.QAbstractVideoBuffer.unmap() function.

The PySide.QtMultimedia.QAbstractVideoBuffer.handle() of a buffer may also be used to manipulate it’s contents using type specific APIs. The type of a buffer’s handle is given by the PySide.QtMultimedia.QAbstractVideoBuffer.handleType() function.

class PySide.QtMultimedia.QAbstractVideoBuffer(type)
Parameters:typePySide.QtMultimedia.QAbstractVideoBuffer.HandleType

Constructs an abstract video buffer of the given type .

PySide.QtMultimedia.QAbstractVideoBuffer.MapMode

Enumerates how a video buffer’s data is mapped to memory.

Constant Description
QAbstractVideoBuffer.NotMapped The video buffer has is not mapped to memory.
QAbstractVideoBuffer.ReadOnly The mapped memory is populated with data from the video buffer when mapped, but the content of the mapped memory may be discarded when unmapped.
QAbstractVideoBuffer.WriteOnly The mapped memory is uninitialized when mapped, and the content will be used to populate the video buffer when unmapped.
QAbstractVideoBuffer.ReadWrite The mapped memory is populated with data from the video buffer, and the video buffer is repopulated with the content of the mapped memory.

See also

PySide.QtMultimedia.QAbstractVideoBuffer.mapMode() PySide.QtMultimedia.QAbstractVideoBuffer.map()

PySide.QtMultimedia.QAbstractVideoBuffer.HandleType

Identifies the type of a video buffers handle.

Constant Description
QAbstractVideoBuffer.NoHandle The buffer has no handle, its data can only be accessed by mapping the buffer.
QAbstractVideoBuffer.GLTextureHandle The handle of the buffer is an OpenGL texture ID.
QAbstractVideoBuffer.XvShmImageHandle The handle contains pointer to shared memory XVideo image.
QAbstractVideoBuffer.CoreImageHandle The handle contains pointer to Mac OS X CIImage.
QAbstractVideoBuffer.QPixmapHandle The handle of the buffer is a PySide.QtGui.QPixmap .
QAbstractVideoBuffer.UserHandle Start value for user defined handle types.
PySide.QtMultimedia.QAbstractVideoBuffer.handle()
Return type:object

Returns a type specific handle to the data buffer.

The type of the handle is given by PySide.QtMultimedia.QAbstractVideoBuffer.handleType() function.

PySide.QtMultimedia.QAbstractVideoBuffer.handleType()
Return type:PySide.QtMultimedia.QAbstractVideoBuffer.HandleType

Returns the type of a video buffer’s handle.

PySide.QtMultimedia.QAbstractVideoBuffer.mapMode()
Return type:PySide.QtMultimedia.QAbstractVideoBuffer.MapMode

Returns the mode a video buffer is mapped in.

See also

PySide.QtMultimedia.QAbstractVideoBuffer.map()

PySide.QtMultimedia.QAbstractVideoBuffer.unmap()

Releases the memory mapped by the PySide.QtMultimedia.QAbstractVideoBuffer.map() function

If the QAbstractVideoBuffer.MapMode included the QAbstractVideoBuffer.WriteOnly flag this will persist the current content of the mapped memory to the video frame.

See also

PySide.QtMultimedia.QAbstractVideoBuffer.map()