Enums

Details

class GstGL.GLBaseMemoryError(value)

Bases: GObject.GEnum

classmethod quark()[source]
Returns:

the quark used for GstGL.GLBaseMemory in GLib.Error's

Return type:

int

FAILED = 0

generic failure

OLD_LIBS = 1

the implementation is too old and doesn’t implement enough features

RESOURCE_UNAVAILABLE = 2

a resource could not be found

class GstGL.GLConfigCaveat(value)

Bases: GObject.GEnum

New in version 1.20.

classmethod to_string(caveat)[source]
Parameters:

caveat (GstGL.GLConfigCaveat) – the GstGL.GLConfigCaveat

Returns:

a string version of caveat or None if caveat does not exist.

Return type:

str or None

New in version 1.20.

NONE = 0

none

SLOW = 1

slow

NON_CONFORMANT = 2

non-conformant

class GstGL.GLContextError(value)

Bases: GObject.GEnum

OpenGL context errors.

classmethod quark()[source]
Returns:

the quark used for GstGL.GLContext in GLib.Error's

Return type:

int

FAILED = 0

Failed for an unspecified reason

WRONG_CONFIG = 1

The configuration requested is not correct

WRONG_API = 2

The OpenGL API requested is not correct

OLD_LIBS = 3

The OpenGL libraries are too old

CREATE_CONTEXT = 4

glXCreateContext (or similar) failed

RESOURCE_UNAVAILABLE = 5

A resource is not available

class GstGL.GLFormat(value)

Bases: GObject.GEnum

classmethod from_video_info(context, vinfo, plane)[source]
Parameters:
Returns:

the GstGL.GLFormat necessary for holding the data in plane of vinfo

Return type:

GstGL.GLFormat

classmethod is_supported(context, format)[source]
Parameters:
Returns:

Whether format is supported by context based on the OpenGL API, version, or available OpenGL extension/s.

Return type:

bool

New in version 1.16.

classmethod type_from_sized_gl_format(format)[source]
Parameters:

format (GstGL.GLFormat) – the sized internal GstGL.GLFormat

Returns:

unsized_format:

location for the resulting unsized GstGL.GLFormat

gl_type:

location for the resulting GL type

Return type:

(unsized_format: GstGL.GLFormat, gl_type: int)

Get the unsized format and type from format for usage in glReadPixels, glTex{Sub}Image*, glTexImage* and similar functions.

New in version 1.16.

classmethod type_n_bytes(format, type)[source]
Parameters:
  • format (int) – the OpenGL format, GL_RGBA, GL_LUMINANCE, etc

  • type (int) – the OpenGL type, GL_UNSIGNED_BYTE, GL_FLOAT, etc

Returns:

the number of bytes the specified format, type combination takes per pixel

Return type:

int

RGB8 = 32849

Three 8-bit components stored in the R, G, and B texture components

RGB16 = 32852

Three 16-bit components stored in the R, G, and B texture components

RGBA8 = 32856

Four 8-bit components stored in the R, G, B, and A texture components respectively.

RGB10_A2 = 32857
RGBA16 = 32859

Four 16-bit components stored in the R, G, B, and A texture components respectively.

DEPTH_COMPONENT16 = 33189

A single 16-bit component for depth information.

RG = 33319

Two components stored in the R and G texture components

R8 = 33321

Single 8-bit component stored in the R texture component

R16 = 33322

Single 16-bit component stored in the R texture component

RG8 = 33323

Two 8-bit components stored in the R and G texture components

RG16 = 33324

Two 16-bit components stored in the R and G texture components

DEPTH24_STENCIL8 = 35056

A 24-bit component for depth information and a 8-bit component for stencil informat.

RGB565 = 36194

Three components of bit depth 5, 6 and 5 stored in the R, G, and B texture components respectively.

RED = 6403

Single component stored in the R texture component

ALPHA = 6406

Single component stored in the A texture component

RGB = 6407

Three components stored in the R, G, and B texture components

RGBA = 6408

Four components stored in the R, G, B, and A texture components respectively.

LUMINANCE = 6409

Single component replicated across R, G, and B textures components

LUMINANCE_ALPHA = 6410

Combination of GstGL.GLFormat.LUMINANCE and GstGL.GLFormat.ALPHA

class GstGL.GLQueryType(value)

Bases: GObject.GEnum

NONE = 0

no query

TIME_ELAPSED = 1

query the time elapsed

TIMESTAMP = 2

query the current time

class GstGL.GLSLError(value)

Bases: GObject.GEnum

Compilation stage that caused an error

New in version 1.8.

classmethod quark()[source]
Returns:

the quark used for GstGLSL in GLib.Error's

Return type:

int

COMPILE = 0

Compilation error occurred

Link error occurred

PROGRAM = 2

General program error occurred

class GstGL.GLSLVersion(value)

Bases: GObject.GEnum

GLSL version list

New in version 1.8.

classmethod from_string(string)[source]
Parameters:

string (str) – a GLSL version string

Returns:

the GstGL.GLSLVersion of string or GstGL.GLSLVersion.NONE on error

Return type:

GstGL.GLSLVersion

classmethod profile_from_string(string)[source]
Parameters:

string (str) – a valid GLSL #version string

Returns:

True if a valid #version string was found, False otherwise

version_ret:

resulting GstGL.GLSLVersion

profile_ret:

resulting GstGL.GLSLVersion

Return type:

(bool, version_ret: GstGL.GLSLVersion, profile_ret: GstGL.GLSLProfile)

Note: this function expects either a #version GLSL preprocesser directive or a valid GLSL version and/or profile.

classmethod profile_to_string(version, profile)[source]
Parameters:
Returns:

the combined GLSL #version string for version and profile

Return type:

str or None

classmethod to_string(version)[source]
Parameters:

version (GstGL.GLSLVersion) – a GstGL.GLSLVersion

Returns:

the name of version or None on error

Return type:

str or None

NONE = 0

no version

100 = 100
_100 = 100

version 100 (only valid for ES)

110 = 110
_110 = 110

version 110 (only valid for compatibility desktop GL)

120 = 120
_120 = 120

version 120 (only valid for compatibility desktop GL)

130 = 130
_130 = 130

version 130 (only valid for compatibility desktop GL)

140 = 140
_140 = 140

version 140 (only valid for compatibility desktop GL)

150 = 150
_150 = 150

version 150 (valid for compatibility/core desktop GL)

300 = 300
_300 = 300

version 300 (only valid for ES)

310 = 310
_310 = 310

version 310 (only valid for ES)

320 = 320
_320 = 320

version 320 (only valid for ES)

330 = 330
_330 = 330

version 330 (valid for compatibility/core desktop GL)

400 = 400
_400 = 400

version 400 (valid for compatibility/core desktop GL)

410 = 410
_410 = 410

version 410 (valid for compatibility/core desktop GL)

420 = 420
_420 = 420

version 420 (valid for compatibility/core desktop GL)

430 = 430
_430 = 430

version 430 (valid for compatibility/core desktop GL)

440 = 440
_440 = 440

version 440 (valid for compatibility/core desktop GL)

450 = 450
_450 = 450

version 450 (valid for compatibility/core desktop GL)

class GstGL.GLStereoDownmix(value)

Bases: GObject.GEnum

Output anaglyph type to generate when downmixing to mono

GREEN_MAGENTA_DUBOIS = 0

Dubois optimised Green-Magenta anaglyph

RED_CYAN_DUBOIS = 1

Dubois optimised Red-Cyan anaglyph

AMBER_BLUE_DUBOIS = 2

Dubois optimised Amber-Blue anaglyph

class GstGL.GLTextureTarget(value)

Bases: GObject.GEnum

The OpenGL texture target that an OpenGL texture can be bound to. The GstGL.gl_value_set_texture_target_from_mask(), GstGL.gl_value_get_texture_target_mask(), and GstGL.gl_value_set_texture_target() functions can be used for handling texture targets with GObject.Value's when e.g. dealing with Gst.Caps.

New in version 1.8.

classmethod from_gl(target)[source]
Parameters:

target (int) – an OpenGL texture binding target

Returns:

the GstGL.GLTextureTarget that’s equiavalant to target or GstGL.GLTextureTarget.NONE

Return type:

GstGL.GLTextureTarget

classmethod from_string(str)[source]
Parameters:

str (str) – a string equivalent to one of the GST_GL_TEXTURE_TARGET_*_STR values

Returns:

the GstGL.GLTextureTarget represented by str or GstGL.GLTextureTarget.NONE

Return type:

GstGL.GLTextureTarget

classmethod to_buffer_pool_option(target)[source]
Parameters:

target (GstGL.GLTextureTarget) – a GstGL.GLTextureTarget

Returns:

a string representing the GstBufferPoolOption specified by target

Return type:

str or None

classmethod to_gl(target)[source]
Parameters:

target (GstGL.GLTextureTarget) – a GstGL.GLTextureTarget

Returns:

the OpenGL value for binding the target with glBindTexture() and similar functions or 0

Return type:

int

classmethod to_string(target)[source]
Parameters:

target (GstGL.GLTextureTarget) – a GstGL.GLTextureTarget

Returns:

the stringified version of target or None

Return type:

str or None

NONE = 0

no texture target

2D = 1
_2D = 1

2D texture target (GL_TEXTURE_2D)

RECTANGLE = 2

rectangle texture target (GL_TEXTURE_RECTANGLE)

EXTERNAL_OES = 3

external oes texture target (GL_TEXTURE_EXTERNAL_OES)

class GstGL.GLUploadReturn(value)

Bases: GObject.GEnum

ERROR = -1

An unspecified error occurred

UNSHARED_GL_CONTEXT = -100

private return value.

UNSUPPORTED = -2

The configuration is unsupported.

RECONFIGURE = -3

This element requires a reconfiguration.

DONE = 1

No further processing required

class GstGL.GLWindowError(value)

Bases: GObject.GEnum

classmethod quark()[source]
Returns:

the quark used for GstGL.GLWindow in GLib.Error's

Return type:

int

FAILED = 0

failed for a unspecified reason

OLD_LIBS = 1

the implementation is too old

RESOURCE_UNAVAILABLE = 2

no such resource was found