Skip to content

Commit

Permalink
Merge branch 'issue_540' of https://github.com/RomanArzumanyan/VideoP…
Browse files Browse the repository at this point in the history
…rocessingFramework into issue_540
  • Loading branch information
Roman Arzumanyan committed Oct 19, 2023
2 parents fd7afed + f4425ad commit 938c8f4
Showing 1 changed file with 48 additions and 15 deletions.
63 changes: 48 additions & 15 deletions src/PyNvCodec/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from typing import Any, ClassVar, Dict
from typing import Any, ClassVar, Dict, Tuple

from typing import overload
import numpy
ASYNC_ENCODE_SUPPORT: NV_ENC_CAPS
BGR: PixelFormat
BIT_DEPTH_MINUS_8: NV_DEC_CAPS
BIT_DEPTH_NOT_SUPPORTED: TaskExecInfo
BT_601: ColorSpace
BT_709: ColorSpace
DYNAMIC_QUERY_ENCODER_CAPACITY: NV_ENC_CAPS
END_OF_STREAM: TaskExecInfo
EXACT_FRAME: SeekMode
EXPOSED_COUNT: NV_ENC_CAPS
FAIL: TaskExecInfo
H264: CudaVideoCodec
HEIGHT_MAX: NV_ENC_CAPS
HEIGHT_MIN: NV_ENC_CAPS
Expand All @@ -28,6 +31,7 @@ MB_NUM_MAX: NV_ENC_CAPS
MB_PER_SEC_MAX: NV_ENC_CAPS
MIN_HEIGHT: NV_DEC_CAPS
MIN_WIDTH: NV_DEC_CAPS
MORE_DATA_NEEDED: TaskExecInfo
MPEG: ColorRange
NO_PTS: int
NUM_MAX_BFRAMES: NV_ENC_CAPS
Expand All @@ -44,6 +48,7 @@ RGB_32F: PixelFormat
RGB_32F_PLANAR: PixelFormat
RGB_PLANAR: PixelFormat
SEPARATE_COLOUR_PLANE: NV_ENC_CAPS
SUCCESS: TaskExecInfo
SUPPORTED_RATECONTROL_MODES: NV_ENC_CAPS
SUPPORT_10BIT_ENCODE: NV_ENC_CAPS
SUPPORT_ADAPTIVE_TRANSFORM: NV_ENC_CAPS
Expand Down Expand Up @@ -377,15 +382,18 @@ class PyFFmpegDemuxer:

class PyFfmpegDecoder:
def __init__(self, input: str, opts: Dict[str,str], gpu_id: int = ...) -> None: ...
def AvgFramerate(self) -> float: ...
def Codec(self) -> CudaVideoCodec: ...
def ColorRange(self) -> ColorRange: ...
def ColorSpace(self) -> ColorSpace: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> Tuple[bool,TaskExecInfo]: ...
def DecodeSingleSurface(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
def Framerate(self) -> float: ...
def GetMotionVectors(self) -> numpy.ndarray[MotionVector]: ...
def Height(self) -> int: ...
def Numframes(self) -> int: ...
def Timebase(self) -> float: ...
def Width(self) -> int: ...

class PyFrameUploader:
Expand Down Expand Up @@ -414,33 +422,33 @@ class PyNvDecoder:
def ColorRange(self) -> ColorRange: ...
def ColorSpace(self) -> ColorSpace: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8]) -> bool: ...
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8]) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8]) -> bool: ...
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8]) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def DecodeFrameFromPacket(self, frame: numpy.ndarray[numpy.uint8], packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], sei: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext) -> Tuple[bool,TaskExecInfo]: ...
@overload
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> bool: ...
def DecodeSingleFrame(self, frame: numpy.ndarray[numpy.uint8], seek_context: SeekContext, pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
def DecodeSingleSurface(self, *args, **kwargs) -> Any: ...
def DecodeSurfaceFromPacket(self, enc_packet_data: PacketData, packet: numpy.ndarray[numpy.uint8], pkt_data: PacketData, bool_nvcv_check: bool) -> object: ...
@overload
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> bool: ...
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8]) -> Tuple[bool,TaskExecInfo]: ...
@overload
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> bool: ...
def FlushSingleFrame(self, frame: numpy.ndarray[numpy.uint8], pkt_data: PacketData) -> Tuple[bool,TaskExecInfo]: ...
def FlushSingleSurface(self, *args, **kwargs) -> Any: ...
def Format(self) -> PixelFormat: ...
def Framerate(self) -> float: ...
Expand Down Expand Up @@ -608,5 +616,30 @@ class SurfacePlane:
def Pitch(self) -> int: ...
def Width(self) -> int: ...

class TaskExecDetails:
info: TaskExecInfo
def __init__(self) -> None: ...

class TaskExecInfo:
__members__: ClassVar[dict] = ... # read-only
BIT_DEPTH_NOT_SUPPORTED: ClassVar[TaskExecInfo] = ...
END_OF_STREAM: ClassVar[TaskExecInfo] = ...
FAIL: ClassVar[TaskExecInfo] = ...
MORE_DATA_NEEDED: ClassVar[TaskExecInfo] = ...
SUCCESS: ClassVar[TaskExecInfo] = ...
__entries: ClassVar[dict] = ...
def __init__(self, value: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __getstate__(self) -> int: ...
def __hash__(self) -> int: ...
def __index__(self) -> int: ...
def __int__(self) -> int: ...
def __ne__(self, other: object) -> bool: ...
def __setstate__(self, state: int) -> None: ...
@property
def name(self) -> str: ...
@property
def value(self) -> int: ...

def GetNumGpus() -> int: ...
def GetNvencParams() -> Dict[str,str]: ...

0 comments on commit 938c8f4

Please sign in to comment.