Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing stub in av.sidedata #1308

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading