Callbacks

VideoAffineTransformationGetMatrix (meta, matrix)

VideoConvertSampleCallback (sample, error, *user_data)

VideoFormatPack (info, flags, src, sstride, data, stride, chroma_site, y, width)

VideoFormatUnpack (info, flags, dest, data, stride, x, y, width)

VideoGLTextureUpload (meta, texture_id)

Details

GstVideo.VideoAffineTransformationGetMatrix(meta, matrix)
Parameters:
Return type:

bool

GstVideo.VideoConvertSampleCallback(sample, error, *user_data)
Parameters:
GstVideo.VideoFormatPack(info, flags, src, sstride, data, stride, chroma_site, y, width)
Parameters:

Packs width pixels from src to the given planes and strides in the format info. The pixels from source have each component interleaved and will be packed into the planes in data.

This function operates on pack_lines lines, meaning that src should contain at least pack_lines lines with a stride of sstride and y should be a multiple of pack_lines.

Subsampled formats will use the horizontally and vertically cosited component from the source. Subsampling should be performed before packing.

Because this function does not have a x coordinate, it is not possible to pack pixels starting from an unaligned position. For tiled images this means that packing should start from a tile coordinate. For subsampled formats this means that a complete pixel needs to be packed.

GstVideo.VideoFormatUnpack(info, flags, dest, data, stride, x, y, width)
Parameters:

Unpacks width pixels from the given planes and strides containing data of format info. The pixels will be unpacked into dest with each component interleaved as per info's unpack_format, which will usually be one of GstVideo.VideoFormat.ARGB, GstVideo.VideoFormat.AYUV, GstVideo.VideoFormat.ARGB64 or GstVideo.VideoFormat.AYUV64 depending on the format to unpack. dest should at least be big enough to hold width * bytes_per_pixel bytes where bytes_per_pixel relates to the unpack format and will usually be either 4 or 8 depending on the unpack format. bytes_per_pixel will be the same as the pixel stride for plane 0 for the above formats.

For subsampled formats, the components will be duplicated in the destination array. Reconstruction of the missing components can be performed in a separate step after unpacking.

GstVideo.VideoGLTextureUpload(meta, texture_id)
Parameters:
Return type:

bool