st12-1
SMPTE ST 12-1:2014 "Time and Control Code" — the §9 Linear Time Code (LTC)
80-bit logical codeword, no_std.
- [
LtcFrame] — the 80-bit LTC codeword (§9.2): BCD hours/minutes/ seconds/frames, the drop-frame and color-frame flags, the four rate-dependent flag bits (polarity correction / BGF0 / BGF1 / BGF2 — resolved via [FrameRate], since the codeword itself carries no self-describing frame-rate field), the eight 4-bit binary groups ("user bits"), and the fixed synchronization word. - [
FrameRate] — which of ST 12-1 Table 3's three flag-bit-position columns (30-frame / 25-frame / 24-frame) applies. - [
BinaryGroupUsage] / [BinaryGroupFlags] — Table 1's classification of what the binary groups contain.
See docs/st12-1.md for the curated ST 12-1 §8/§9 transcription this crate
implements field-for-field, including a verified-against-the-rendered-PDF
note on Table 3's frame-rate-dependent bit-position swap.
Scope
This crate models only the already-demodulated logical 80-bit codeword — never the §9.3 biphase-mark-encoded physical/analog audio waveform LTC is carried as on a wire. That line-encoding/clock-recovery layer is out of scope for this project (the same way it never decodes PCM or AC-3 audio samples).
#![no_std]; depends only on broadcast-common.
Quick start
use ;
use LtcFrame;
let frame = LtcFrame ;
let mut bytes = ;
frame.serialize_into.unwrap;
assert_eq!;
Examples
Features
| Feature | Default | Description |
|---|---|---|
std |
yes | Link the standard library. Without it the crate is #![no_std]. |
serde |
no | serde::Serialize/Deserialize derives on public types. |
Minimum Supported Rust Version
1.86
License
MIT OR Apache-2.0