operations tier

operations-camera-liveview

Low-latency MJPEG live-view relay: authenticates to each camera server-side and re-serves its native MJPEG (browsers block credentials in <img> subresource URLs). Pure page/model in the lib; the streaming proxy is the camera-liveview binary. Harvested from frigate-box/crates/liveview.

Low-latency MJPEG live-view relay: authenticates to each camera server-side and re-serves its native MJPEG (browsers block credentials in <img> subresource URLs). Pure page/model in the lib; the streaming proxy is the camera-liveview binary. Harvested from frigate-box/crates/liveview.

Tieroperations
Rolecapability
Pathcrates/operations/camera-liveview
Edition2021
Targetscamera-liveview, operations_camera_liveview
Public items9 across 0 modules
Tests7

What it is for

Low-latency MJPEG live-view relay (Sprint 10, US-10.1).

Frigate's go2rtc live view transcodes and is choppy on the CPU-only box. This serves the Axis cameras' native MJPEG directly in <img> tags — near-zero latency. Because browsers block credentials in subresource URLs, a relay authenticates to each camera server-side and re-serves the stream. This module is the pure part: the camera model + the generated HTML page (grid + click-to-fullscreen toggle). The streaming proxy lives in the frigate-box-liveview binary.

Capabilities

crate root

Low-latency MJPEG live-view relay (Sprint 10, US-10.1).

Item
fn basic_auth(user : & str, pass : & str) -> String
fn snapshot_url(mjpeg_url : & str) -> String
fn normalize_multipart_boundary(content_type : & str) -> String

Feed

Low-latency MJPEG live-view relay (Sprint 10, US-10.1).

Item
pub struct Feed
fn index_html(feeds : & Feed) -> String

LiveConfig

Low-latency MJPEG live-view relay (Sprint 10, US-10.1).

Item
pub struct LiveConfig

ViewerAuth

Low-latency MJPEG live-view relay (Sprint 10, US-10.1).

Item
pub struct ViewerAuth
ViewerAuth :: fn expected_header(& self) -> String
fn viewer_authorized(viewer : Option <& ViewerAuth>, remote_is_loopback : bool, auth_header : Option <& str>,) -> bool

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct FeedOne camera feed in the live view
pub struct LiveConfigRelay config (from /config/live/liveview.toml).
pub struct ViewerAuthViewer login for the live-view page (viewer in liveview.toml)
ViewerAuth :: fn expected_header(& self) -> StringThe exact Authorization header value an authenticated browser must send.
fn viewer_authorized(viewer : Option <& ViewerAuth>, remote_is_loopback : bool, auth_header : Option <& str>,) -> boolWhether a request is allowed to view
fn basic_auth(user : & str, pass : & str) -> StringThe Basic <base64> credential for a feed (server-side auth injection).
fn snapshot_url(mjpeg_url : & str) -> StringDerive a single-JPEG snapshot URL from an Axis MJPEG stream URL
fn normalize_multipart_boundary(content_type : & str) -> StringNormalize a proxied multipart/x-mixed-replace Content-Type so the declared boundary= token exactly matches the --<boundary> separator the camera writes between JPEG frames
fn index_html(feeds : & Feed) -> StringRender the live-view page: a responsive grid of MJPEG tiles, each click-to-fullscreen (click a tile → it fills the window and the rest hide; click again → back to the grid).

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier operations with 40 other crates: operations-approval-workflow, operations-assessments, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-registry, operations-compliance, … (40 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)operations
Architectural role (taxonomy)capability
Locationcrates/operations/camera-liveview
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
base64^0.22noalways
constant_time_eq^0.4noalways
serde^1derivenoalways
tiny_http^0.12noalways
toml^0.8noalways
ureq^2.12noalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bincamera-liveview`src/bin/camera-liveview.rs`
liboperations_camera_liveview`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests7
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root800

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc99
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 9
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines522
Code lines407
Public API items9
Public modules0
Tests7
Examples0
Cargo features0
Direct runtime dependencies6
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "function" : 5
    "method" : 1
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 407
    "Blank or comment" : 115

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All operations · Manual