Callbacks¶
|
|
|
|
|
|
|
|
|
Details¶
- GstVideo.VideoAffineTransformationGetMatrix(meta, matrix)¶
- Parameters:
matrix (
float
) –
- Return type:
- GstVideo.VideoConvertSampleCallback(sample, error, *user_data)¶
- Parameters:
sample (
Gst.Sample
) –error (
GLib.Error
) –
- GstVideo.VideoFormatPack(info, flags, src, sstride, data, stride, chroma_site, y, width)¶
- Parameters:
info (
GstVideo.VideoFormatInfo
) – aGstVideo.VideoFormatInfo
flags (
GstVideo.VideoPackFlags
) – flags to control the packingsstride (
int
) – the source array stridedata (
object
orNone
) – pointers to the destination data planesstride (
int
) – strides of the destination planeschroma_site (
GstVideo.VideoChromaSite
) – the chroma siting of the target when subsampled (not used)y (
int
) – the y position in the image to pack towidth (
int
) – the amount of pixels to pack.
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:
info (
GstVideo.VideoFormatInfo
) – aGstVideo.VideoFormatInfo
flags (
GstVideo.VideoPackFlags
) – flags to control the unpackingstride (
int
) – strides of the planesx (
int
) – the x position in the image to start fromy (
int
) – the y position in the image to start fromwidth (
int
) – the amount of pixels to unpack.
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
orGstVideo.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:
meta (
GstVideo.VideoGLTextureUploadMeta
) –texture_id (
int
) –
- Return type: