Skip to content

Commit

Permalink
add missing stub in av.sidedata
Browse files Browse the repository at this point in the history
  • Loading branch information
laggykiller committed Mar 5, 2024
1 parent e4aa4c6 commit ec3c6d8
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
22 changes: 22 additions & 0 deletions av/sidedata/motionvectors.pyi
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions av/sidedata/sidedata.pyi
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ec3c6d8

Please sign in to comment.