mini_arcade_core.runtime.capture.capture_worker¶
Capture worker thread for saving screenshots.
Classes¶
Job representing a screenshot to be saved. |
|
Result of a completed capture job. |
|
Configuration options for the CaptureWorker. |
|
Capture worker thread for saving screenshots asynchronously. |
Module Contents¶
- class mini_arcade_core.runtime.capture.capture_worker.CaptureJob¶
Bases:
mini_arcade_core.runtime.capture.base_worker.BaseJobJob representing a screenshot to be saved.
- Variables:
- out_path: pathlib.Path¶
- bmp_path: pathlib.Path | None = None¶
- w: int = 0¶
- h: int = 0¶
- pixels: bytes | None = None¶
- fmt: str = 'BGRA'¶
- pitch: int | None = None¶
- class mini_arcade_core.runtime.capture.capture_worker.CaptureResult¶
Result of a completed capture job.
- Variables:
- job_id: str¶
- out_path: pathlib.Path¶
- ok: bool¶
- error: str | None = None¶
- class mini_arcade_core.runtime.capture.capture_worker.WorkerConfig¶
Configuration options for the CaptureWorker.
- Variables:
(int) (queue_size) – Maximum number of jobs to queue.
None]]) (on_done (Optional[Callable[[CaptureResult],) – Optional callback invoked when a job is done.
(str) (name) – Name of the worker thread.
(bool) (delete_temp) – Whether the thread is a daemon thread.
(bool) – Whether to delete temporary bitmap files after saving.
- queue_size: int = 64¶
- on_done: Callable[[CaptureResult], None] | None = None¶
- name: str = 'capture-worker'¶
- daemon: bool = True¶
- delete_temp: bool = True¶
- class mini_arcade_core.runtime.capture.capture_worker.CaptureWorker(worker_config: WorkerConfig | None = None)¶
Bases:
mini_arcade_core.runtime.capture.base_worker.BaseWorkerCapture worker thread for saving screenshots asynchronously.