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.30

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.30
File Interpreter ABI Platform Actions
tatolab_camera-0.68.30-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details for tatolab_camera-0.68.30-cp312-abi3-manylinux_2_28_x86_64.whl
tatolab_camera-0.68.30-cp312-abi3-macosx_15_0_arm64.whl CPython 3.12 abi3 macOS 15.0+ ARM64 Details for tatolab_camera-0.68.30-cp312-abi3-macosx_15_0_arm64.whl

Total release size: 702.2 kB

Release files / tatolab_camera-0.68.30-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL tatolab_camera-0.68.30-cp312-abi3-manylinux_2_28_x86_64.whl
Size 369.7 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
12974552a58b61df8b50598586128d054a5dbbe9f54d5946712c455bdf10c4f0
BLAKE2b-256 checksum
How to use checksums
d1c4d2c959b03ca67a92a11b623c8e3e6b2457eea16c5caca0337e77143d206b
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.30-cp312-abi3-macosx_15_0_arm64.whl

Download URL tatolab_camera-0.68.30-cp312-abi3-macosx_15_0_arm64.whl
Size 332.5 kB
Tags CPython 3.12 abi3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c9658b004e01d0396bf6d02058b3802df00c09990a04c4e786a5f9d3e963ab55
BLAKE2b-256 checksum
How to use checksums
8810c0adba670e344bf3ad69dd67394e83cd1558777e1183563dae4419cfb8f6
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.30

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