|
| 1 | +from collections import deque |
| 2 | +from collections.abc import Iterable |
| 3 | + |
| 4 | +from d3dshot.capture_output import CaptureOutput as CaptureOutput, CaptureOutputs as CaptureOutputs, _Frame |
| 5 | +from d3dshot.display import Display as Display |
| 6 | + |
| 7 | +class Singleton(type): ... |
| 8 | + |
| 9 | +class D3DShot(metaclass=Singleton): |
| 10 | + displays: list[Display] |
| 11 | + display: Display |
| 12 | + capture_output: CaptureOutput |
| 13 | + frame_buffer_size: int |
| 14 | + frame_buffer: deque[_Frame] |
| 15 | + previous_screenshot: _Frame | None |
| 16 | + region: tuple[int, int, int, int] | None |
| 17 | + |
| 18 | + def __init__( |
| 19 | + self, |
| 20 | + capture_output: CaptureOutputs = ..., |
| 21 | + frame_buffer_size: int = ..., |
| 22 | + pil_is_available: bool = ..., |
| 23 | + numpy_is_available: bool = ..., |
| 24 | + pytorch_is_available: bool = ..., |
| 25 | + pytorch_gpu_is_available: bool = ..., |
| 26 | + ) -> None: ... |
| 27 | + @property |
| 28 | + def is_capturing(self) -> bool: ... |
| 29 | + def get_latest_frame(self) -> _Frame | None: ... |
| 30 | + def get_frame(self, frame_index: int) -> _Frame | None: ... |
| 31 | + def get_frames(self, frame_indices: Iterable[int]) -> list[_Frame]: ... |
| 32 | + def get_frame_stack(self, frame_indices: Iterable[int], stack_dimension: str | None = ...) -> _Frame: ... |
| 33 | + def screenshot(self, region: tuple[int, int, int, int] | None = ...) -> _Frame | None: ... |
| 34 | + def screenshot_to_disk( |
| 35 | + self, directory: str | None = ..., file_name: str | None = ..., region: tuple[int, int, int, int] | None = ... |
| 36 | + ) -> str: ... |
| 37 | + def frame_buffer_to_disk(self, directory: str | None = ...) -> None: ... |
| 38 | + def capture(self, target_fps: int = ..., region: tuple[int, int, int, int] | None = ...) -> bool: ... |
| 39 | + def screenshot_every(self, interval: float, region: tuple[int, int, int, int] | None = ...) -> bool: ... |
| 40 | + def screenshot_to_disk_every( |
| 41 | + self, interval: float, directory: str | None = ..., region: tuple[int, int, int, int] | None = ... |
| 42 | + ) -> bool: ... |
| 43 | + def stop(self) -> bool: ... |
| 44 | + def benchmark(self) -> None: ... |
| 45 | + def detect_displays(self) -> None: ... |
0 commit comments