diff --git a/av/sidedata/motionvectors.pyi b/av/sidedata/motionvectors.pyi new file mode 100644 index 000000000..5fe4e733a --- /dev/null +++ b/av/sidedata/motionvectors.pyi @@ -0,0 +1,22 @@ +from typing import Any, Sequence + +import numpy as np + +from .sidedata import SideData + +class MotionVectors(SideData, Sequence[Any]): + def __getitem__(self, index: int) -> MotionVector: ... + def __len__(self) -> int: ... + def to_ndarray(self) -> np.ndarray[Any, Any]: ... + +class MotionVector: + source: int + w: int + h: int + src_x: int + src_y: int + dst_x: int + dst_y: int + motion_x: int + motion_y: int + motion_scale: int diff --git a/av/sidedata/sidedata.pyi b/av/sidedata/sidedata.pyi new file mode 100644 index 000000000..c0d4ba314 --- /dev/null +++ b/av/sidedata/sidedata.pyi @@ -0,0 +1,31 @@ +from collections.abc import Mapping + +from av.buffer import Buffer +from av.enum import EnumItem +from av.frame import Frame + +class Type(EnumItem): + PANSCAN: int + A53_CC: int + STEREO3D: int + MATRIXENCODING: int + DOWNMIX_INFO: int + REPLAYGAIN: int + DISPLAYMATRIX: int + AFD: int + MOTION_VECTORS: int + SKIP_SAMPLES: int + AUDIO_SERVICE_TYPE: int + MASTERING_DISPLAY_METADATA: int + GOP_TIMECODE: int + SPHERICAL: int + CONTENT_LIGHT_LEVEL: int + ICC_PROFILE: int + SEI_UNREGISTERED: int + +class SideData(Buffer): + type: Type + DISPLAYMATRIX: int + +class SideDataContainer(Mapping[str, int]): + frame: Frame