Voice et bot modif
This commit is contained in:
parent
189d56026b
commit
7333a22bcd
10774 changed files with 634644 additions and 933308 deletions
|
|
@ -1,6 +1,6 @@
|
|||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from typing import Any, ClassVar, Union
|
||||
from typing import Any, Union
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
|
@ -8,6 +8,7 @@ from av.frame import Frame
|
|||
|
||||
from .format import VideoFormat
|
||||
from .plane import VideoPlane
|
||||
from .reformatter import ColorPrimaries, ColorTrc
|
||||
|
||||
_SupportedNDarray = Union[
|
||||
np.ndarray[Any, np.dtype[np.uint8]],
|
||||
|
|
@ -28,12 +29,21 @@ class PictureType(IntEnum):
|
|||
SP = 6
|
||||
BI = 7
|
||||
|
||||
class CudaContext:
|
||||
@property
|
||||
def device_id(self) -> int: ...
|
||||
@property
|
||||
def primary_ctx(self) -> bool: ...
|
||||
def __init__(self, device_id: int = 0, primary_ctx: bool = True) -> None: ...
|
||||
|
||||
class VideoFrame(Frame):
|
||||
format: VideoFormat
|
||||
planes: tuple[VideoPlane, ...]
|
||||
pict_type: int
|
||||
colorspace: int
|
||||
color_range: int
|
||||
color_trc: int
|
||||
color_primaries: int
|
||||
|
||||
@property
|
||||
def time(self) -> float: ...
|
||||
|
|
@ -58,6 +68,9 @@ class VideoFrame(Frame):
|
|||
interpolation: int | str | None = None,
|
||||
src_color_range: int | str | None = None,
|
||||
dst_color_range: int | str | None = None,
|
||||
dst_color_trc: int | ColorTrc | None = None,
|
||||
dst_color_primaries: int | ColorPrimaries | None = None,
|
||||
threads: int | None = None,
|
||||
) -> VideoFrame: ...
|
||||
def to_rgb(self, **kwargs: Any) -> VideoFrame: ...
|
||||
def save(self, filepath: str | Path) -> None: ...
|
||||
|
|
@ -84,3 +97,14 @@ class VideoFrame(Frame):
|
|||
flip_horizontal: bool = False,
|
||||
flip_vertical: bool = False,
|
||||
) -> VideoFrame: ...
|
||||
@staticmethod
|
||||
def from_dlpack(
|
||||
planes: object | tuple[object, ...],
|
||||
format: str = "nv12",
|
||||
width: int = 0,
|
||||
height: int = 0,
|
||||
stream: int | None = None,
|
||||
device_id: int | None = None,
|
||||
primary_ctx: bool = True,
|
||||
cuda_context: CudaContext | None = None,
|
||||
) -> VideoFrame: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue