maxTrajectorySamples top-level constant
The most samples one count-prefixed trajectory may declare — a Rig Trajectory, an Object Track, or the Camera record's suggested path.
MAX_TRAJECTORY_SAMPLES in Python, Rust and TypeScript, and 1,000,000 here
because it is 1,000,000 there. A ceiling only one implementation has means a
file that decodes in three SDKs and is refused in the fourth, which is a
conformance split rather than hardening; the number is shared by value for
that reason, and not because a Dart list costs what a Rust Vec does.
A ten-minute capture at 100 Hz is sixty thousand samples; this ceiling is an order of magnitude above that and still a refusal rather than an allocation a hostile file chooses.
Sized to stay under maxFrontMatterBytes, the 64 MiB range cap the indexed
path enforces: at 64 bytes a sample this is 64 MB of samples, leaving room
for the name, the count and the record framing. 1 << 20 would have been 64
MiB of samples exactly, so a trajectory at the ceiling parsed on the
streamed path and was refused on the indexed one — the same file, two
answers from one SDK.
Implementation
const int maxTrajectorySamples = 1000000;