const PIXEL_NV12
pub const PIXEL_NV12 = 1Purpose
Constant PIXEL_NV12, defining protocol or algorithm parameters.
#gpu/videoPortable multi-plane video surface descriptors and external hardware-memory surface kinds (IOSurface / DMA-BUF / D3D12) for zero-copy GPU video pipelines.
const PIXEL_NV12pub const PIXEL_NV12 = 1Constant PIXEL_NV12, defining protocol or algorithm parameters.
const PIXEL_P010pub const PIXEL_P010 = 2Constant PIXEL_P010, defining protocol or algorithm parameters.
const PIXEL_YUV420Ppub const PIXEL_YUV420P = 3Constant PIXEL_YUV420P, defining protocol or algorithm parameters.
const PIXEL_YUV420P10pub const PIXEL_YUV420P10 = 4Constant PIXEL_YUV420P10, defining protocol or algorithm parameters.
const PIXEL_BGRA8pub const PIXEL_BGRA8 = 5Constant PIXEL_BGRA8, defining protocol or algorithm parameters.
const PIXEL_RGBA16Fpub const PIXEL_RGBA16F = 6Constant PIXEL_RGBA16F, defining protocol or algorithm parameters.
const EXT_NONEpub const EXT_NONE = 0Constant EXT_NONE, defining protocol or algorithm parameters.
const EXT_IOSURFACEpub const EXT_IOSURFACE = 1Constant EXT_IOSURFACE, defining protocol or algorithm parameters.
const EXT_DMABUFpub const EXT_DMABUF = 2Constant EXT_DMABUF, defining protocol or algorithm parameters.
const EXT_D3D12_RESOURCEpub const EXT_D3D12_RESOURCE = 3Constant EXT_D3D12_RESOURCE, defining protocol or algorithm parameters.
struct PlaneDescpub struct PlaneDesc {
pub index int
pub gpu_format int
pub width int
pub height int
pub bytes_per_pixel int
}Structure encapsulating index, gpu_format, width, height, bytes_per_pixel.
index intgpu_format intwidth intheight intbytes_per_pixel intstruct VideoSurfaceDescpub struct VideoSurfaceDesc {
pub pixel_format int
pub width int
pub height int
pub bit_depth int
pub planes []PlaneDesc
}Structure encapsulating pixel_format, width, height, bit_depth, planes.
pixel_format intwidth intheight intbit_depth intplanes []PlaneDescformat_namepub fn format_name(pixel_format int) stringFormat as name.
pixel_format intstring — result string
describepub fn describe(pixel_format int, width int, height int) VideoSurfaceDescExecute describe. Throws on failure; handle the error or propagate it to the caller.
pixel_format intwidth intheight intVideoSurfaceDesc — a value of this type
struct ExternalPlaneHandlepub struct ExternalPlaneHandle {
pub kind int
pub plane_index int
pub native_handle c_ptr
pub fd int
pub stride_bytes int
pub offset_bytes int
pub modifier u64
}Structure encapsulating kind, plane_index, native_handle, fd, stride_bytes.
kind intplane_index intnative_handle c_ptrfd intstride_bytes intoffset_bytes intmodifier u64struct ExternalFenceDescpub struct ExternalFenceDesc {
pub kind int
pub native_handle c_ptr
pub fd int
pub timeline_value u64
}Structure encapsulating kind, native_handle, fd, timeline_value.
kind intnative_handle c_ptrfd inttimeline_value u64struct ExternalSurfaceDescpub struct ExternalSurfaceDesc {
pub surface VideoSurfaceDesc
pub kind int
pub planes []ExternalPlaneHandle
pub sync ExternalFenceDesc
}Structure encapsulating surface, kind, planes, sync.
surface VideoSurfaceDesckind intplanes []ExternalPlaneHandlesync ExternalFenceDesckind_namepub fn kind_name(kind int) stringKind name.
kind intstring — result string
native_kind_for_ospub fn native_kind_for_os(target_os int) intNative kind for os.
target_os intint — a value of this type
is_compute_video_formatpub fn is_compute_video_format(format int) boolWhether it is compute video format.
format intbool — true or false
validate_external_planepub fn validate_external_plane(plane &PlaneDesc, ext &ExternalPlaneHandle) intValidate external plane. Throws on failure; handle the error or propagate it to the caller.
plane &PlaneDescext &ExternalPlaneHandleint — a value of this type
validate_external_surfacepub fn validate_external_surface(desc &ExternalSurfaceDesc) intValidate external surface. Throws on failure; handle the error or propagate it to the caller.
desc &ExternalSurfaceDescint — a value of this type