GstGL.GLMemoryPBO

Fields

Name

Type

Access

Description

mem

GstGL.GLMemory

r

pbo

GstGL.GLBuffer

r

Methods

class

init_once ()

copy_into_texture (tex_id, target, tex_format, width, height, stride, respecify)

download_transfer ()

upload_transfer ()

Details

class GstGL.GLMemoryPBO

GstGL.GLMemoryPBO is created or wrapped through GstGL.GLBaseMemory.alloc() with GstGL.GLVideoAllocationParams.

Data is uploaded or downloaded from the GPU as is necessary.

classmethod init_once()[source]
copy_into_texture(tex_id, target, tex_format, width, height, stride, respecify)[source]
Parameters:
Returns:

Whether the copy succeeded

Return type:

bool

Copies self into the texture specified by tex_id. The format of tex_id is specified by tex_format, width and height.

If respecify is True, then the copy is performed in terms of the texture data. This is useful for splitting RGBA textures into RG or R textures or vice versa. The requirement for this to succeed is that the backing texture data must be the same size, i.e. say a RGBA8 texture is converted into a RG8 texture, then the RG texture must have twice as many pixels available for output as the RGBA texture.

Otherwise, if respecify is False, then the copy is performed per texel using glCopyTexImage. See the OpenGL specification for details on the mappings between texture formats.

New in version 1.8.

download_transfer()[source]

Transfer the texture data from the texture into the PBO if necessary.

New in version 1.8.

upload_transfer()[source]

Transfer the texture data from the PBO into the texture if necessary.

New in version 1.8.