Skip to main content

tatolab-camera

A camera node built the way a third party builds one: a standalone maturin wheel that depends on tatolab-stream, pyo3 and tatolab-module-sdk, and on no engine crate.

  • CameraSource opens a camera in its own processor interpreter. On setup() it lends its video output to this wheel's Rust, which opens the camera and adopts each capture buffer once through the module host table:

    • on Linux, each V4L2 driver buffer exported as a DMA-BUF (VIDIOC_EXPBUF), with its NV12 or YUYV plane layout;
    • on macOS, each IOSurface an AVFoundation capture session delivers, in 420v or 420f.

    Per frame, the capture thread takes a texture from the node's output pool, has the engine convert the filled buffer into it on the GPU, and publishes a VideoFrame naming it, from start() on. No frame is copied on the CPU, and Python never runs at frame cadence. device_id names a V4L2 node such as /dev/video0 on Linux and an AVFoundation unique ID on macOS.

  • On macOS, camera access is asked for only by a CameraSource, and only in a stream someone loads or starts: it asks without waiting, and frames begin once the user allows it. A stream the runtime re-loads on its own as it starts never asks, and its CameraSource refuses at setup() until access was answered. A stream with no camera node never touches AVFoundation.

  • CaptureToDownstreamLatencyProbe logs the frame rate and the capture-to-read latency of the frames it receives.

Run it

With this machine's runtime running:

cd streams/module-camera
tatolab dev

The stream exposes H.264 at http://127.0.0.1:4446/watch/<machine>/main and logs a CaptureToDownstreamLatencyProbe[...] report every 600 frames; the capture thread logs its own capture-to-publish latency as often.

Check it

cargo fmt --all --check && cargo test --locked --lib && cargo clippy --locked --lib --all-targets -- -D warnings
uv venv --python 3.12 .venv && VIRTUAL_ENV=.venv uv pip install ../../sdk/tatolab-stream mypy
VIRTUAL_ENV=.venv uvx maturin@1.9.6 develop
.venv/bin/python -m mypy.stubtest tatolab.camera._native && uvx pyright@1.1.411

Metadata

Release files for tatolab-camera 0.68.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for tatolab-camera 0.68.22
File Interpreter ABI Platform Actions
tatolab_camera-0.68.22-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for tatolab_camera-0.68.22-cp310-abi3-manylinux_2_28_x86_64.whl
tatolab_camera-0.68.22-cp310-abi3-macosx_15_0_arm64.whl CPython 3.10 abi3 macOS 15.0+ ARM64 Details for tatolab_camera-0.68.22-cp310-abi3-macosx_15_0_arm64.whl

Total release size: 717.8 kB

Release files / tatolab_camera-0.68.22-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL tatolab_camera-0.68.22-cp310-abi3-manylinux_2_28_x86_64.whl
Size 376.5 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
aad87047318bb611bdaa0cbcdd0e5f3280b35aee8228d3e4063b89dfbd11ecd1
BLAKE2b-256 checksum
How to use checksums
3023c26bcfdc8fbada08202f9b74c28960546c1c62875eb43c1dd1c528ff491a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / tatolab_camera-0.68.22-cp310-abi3-macosx_15_0_arm64.whl

Download URL tatolab_camera-0.68.22-cp310-abi3-macosx_15_0_arm64.whl
Size 341.3 kB
Tags CPython 3.10 abi3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5a221ddd2c3538da0926660eb70e677fef9e1c92450447f8bd2abe9001ed6866
BLAKE2b-256 checksum
How to use checksums
4d07e0fd91d015a7dfa48c1256036281d1b63e6248be4504ebd59413c6fccb76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for tatolab-camera 0.68.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page