GstVideo.VideoColorimetry

Fields

Name

Type

Access

Description

matrix

GstVideo.VideoColorMatrix

r/w

the color matrix. Used to convert between Y’PbPr and non-linear RGB (R’G’B’)

primaries

GstVideo.VideoColorPrimaries

r/w

color primaries. used to convert between R’G’B’ and CIE XYZ

range

GstVideo.VideoColorRange

r/w

the color range. This is the valid range for the samples. It is used to convert the samples to Y’PbPr values.

transfer

GstVideo.VideoTransferFunction

r/w

the transfer function. used to convert between R’G’B’ and RGB

Methods

from_string (color)

is_equal (other)

is_equivalent (bitdepth, other, other_bitdepth)

matches (color)

to_string ()

Details

class GstVideo.VideoColorimetry

Structure describing the color info.

from_string(color)
Parameters:

color (str) – a colorimetry string

Returns:

True if color points to valid colorimetry info.

Return type:

bool

Parse the colorimetry string and update self with the parsed values.

is_equal(other)
Parameters:

other (GstVideo.VideoColorimetry) – another GstVideo.VideoColorimetry

Returns:

True if self and other are equal.

Return type:

bool

Compare the 2 colorimetry sets for equality

New in version 1.6.

is_equivalent(bitdepth, other, other_bitdepth)
Parameters:
Returns:

True if self and other are equivalent.

Return type:

bool

Compare the 2 colorimetry sets for functionally equality

New in version 1.22.

matches(color)
Parameters:

color (str) – a colorimetry string

Returns:

True if color conveys the same colorimetry info as the color information in info.

Return type:

bool

Check if the colorimetry information in info matches that of the string color.

to_string()
Returns:

a string representation of self or None if all the entries of self are unknown values.

Return type:

str or None

Make a string representation of self.