Skip to main content

Crate videre_core

Crate videre_core 

Source

Modules§

atomic_file
Atomic publication for rebuildable cache and local state files.
basemap
The basemap module: the offline PMTiles archive and its bounded first-use downloader. The offline basemap archive: one PMTiles file per machine, downloaded once on first /map use into the shared geo cache, then served to the gallery client by a Range-capable endpoint. View time never touches the network.
classify
Classifications table: one row per unique content hash (photo/screenshot/ document/meme/unknown), keyed to embeddings.hash. Zero-shot classification reuses embeddings videre embed already computed.
db
decode_failures
Records files that a decode stage tried and could not turn into pixels, so a guaranteed failure is not re-attempted on every run.
disk
What videre is using on disk, and which part of it is what.
embeddings
Embeddings table: one row per unique content hash, keyed to file_hashes.hash.
embeddings_db
Per-model embedding databases: one SQLite file per (library, model) pair, attached to the main connection as emb.
error_kind
Known classes of failure, attached where the cause is detected and read where the error is logged. A lower level adds one with .context(ErrorKind::...); the boundary that logs the error finds it with ErrorKind::in_chain and records its code and remediation. Adding a variant is how a new failure class gets a remediation; nothing matches on error text.
error_log
Where per-command logs live, the one function that turns a failure into a logged event, and the reader. Writer and reader share the names here so they cannot disagree about the layout.
face_cluster
face_db
face_learning
face_match
Bounding-box geometry for matching XMP face regions to detected faces. Pure: no I/O, no database, so the matching rule is tested in isolation.
fix_dates_target
The fix-dates target transform, shared by [videre fix-dates](the command that applies it) and videre status (which reports how many rows would change without applying anything).
geocode
Forward geocoding: place name (e.g. “Berlin, Germany”) -> (lat, lon), via the free public Nominatim (OpenStreetMap) API, with a local cache so a repeated query never repeats the network call.
heic
hf_cache
Where Hugging Face weights land locally.
image_decode
Orientation-aware decode of source image files.
import_location
Where an import’s source files live.
import_providers
Which import sources exist, and how to recognise them.
io_timeout
library
The explicit identity of one media library.
library_config
Library-scoped settings: the type, its built-in defaults, and the config.toml under the library’s reserved state directory.
library_db
The library database: the schema it is written with, the one entry point allowed to create it, and the reader path that never creates anything.
library_guard
The guard between user-supplied path filters and one selected library.
library_io
Originals and sidecars reach the disk only through the pinned root.
library_locks
Library-scoped advisory locks: how videre processes coordinate around one library, keyed by the library’s own state directory instead of a process-global home.
library_state
Small key-value state for library-scoped bookkeeping that is neither a pipeline run nor a setting: one row per key, integer values, table created on first use. Used today for the face recluster watermark; kept generic so the next piece of watch state does not grow its own table.
library_stats
Aggregate library statistics for dashboard-style callers. Plain queries over an open rusqlite::Connection, shared source of truth for the gallery’s stats tile, videre stats, and any other embedder.
location
location_cluster
GPS coordinate clustering: groups nearby (lat, lon) points by haversine distance into named location clusters, persisted to location_clusters + file_hashes.location_cluster_id.
marks
Per-photo marks: rating, pick, colour label, like. One row per photo, keyed by content hash so a mark follows a photo across duplicates and moves.
mime_probe
Identify a file’s real type from its leading bytes.
person
Two forms of a person’s name: one to identify them by, one to show.
person_search
pipeline_runs
Per-command pipeline run history and liveness, surfaced by videre stats and other dashboard-style callers.
progress
query
Composable search predicates.
recompute_cost
How long the last full place recompute and face regroup took, so videre watch can choose per batch between redoing the whole partition and placing only the new files.
selection
Shared vocabulary for saying which files a command should work on.
semaphore
shutdown
A flush hook for process exits that bypass main: the SIGINT handler exits with 130 from inside core, so the binary registers how to flush its buffered output and the handler calls it first.
status_report
The shared status model: one producer for everything that reports pipeline state, so the CLI, stats, and the MCP tools cannot drift into telling different stories about the same library (the duplication this closes was flagged as DEBT:8).
tags
Free-form tags, stored many-to-many by content hash so they follow a photo across duplicates and moves, exactly like marks. A tag is one opaque string; a /-separated path is stored verbatim with no hierarchy semantics (that is a deferred follow-up). Mirrors the shape of videre_core::marks.
thumb_cache
vectors
f32 <-> f16 BLOB conversion and L2 normalization for stored embeddings. Storage format: little-endian f16, 2 bytes per dimension.
video_meta
Date, location, dimensions, duration and codec from a QuickTime/MP4 container, without decoding anything.
video_probe
Detect whether a QuickTime/MP4 container has a video track, without decoding anything.
work
One place that decides whether there is work, and therefore whether a model is ever loaded.
xmp_gather
Collects the non-face owned labels for one photo hash (image dimensions, resolved location name, zero-shot category) that a sidecar export needs. Faces are gathered separately via face_db::labeled_faces_by_hash. Returns plain data; the binary assembles the XMP model, because that type is binary-only.