Skip to content

docs: split the reference into Guides and API, and fix the Windows setup - #13

Merged
alesanfra merged 3 commits into
mainfrom
docs/api-and-guides
Sep 28, 2026
Merged

alesanfra merged 3 commits into
mainfrom
docs/api-and-guides

Conversation

@alesanfra

@alesanfra alesanfra commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Description

  • Guides and API. reference.md is split into guides.md (frames by number, approximate frames, threads, hardware decoding, frames on the GPU) and api.md (signatures, arguments, errors, FrameReader, Frame, Batch, constants). The text is moved unchanged; only the links between the pages differ.
  • Redirect. scripts/docs_redirects.py, a MkDocs hook, writes reference/index.html, which sends each old anchor to the page that now holds it (for example #hardware-decoding to guides/, #errors to api/). The README on PyPI for 0.6.0 and earlier links to reference/ five times. mkdocs-redirects would keep the anchor but send every one to a single page, so it is not used.
  • Quick start. Adds frames in any order and frames=[-1], device="auto", reading videos in parallel with threads, and a note that errors are raised by the first next().
  • Development. The Windows setup is now three steps. It says that pacman is MSYS2's package manager and puts uv's tool directory on PATH for meson and ninja, as CI does. It renames MSYS2's link.exe instead of deleting it. The layout table lists build.rs, src/dlpack.rs, and web/.
  • Buffer protocol. A new guide, "Frames without a copy", explains what Frame exposes through the buffer protocol and what that saves: no copy per frame, C-contiguous arrays, batches in one block, and writable memory that the decoder never touches again.
  • The README and AGENTS.md point to the new pages, and tests/test_read.py names guides.md where it cited reference.md.

The change of license moved to its own pull request.

The new quick start examples were run against the test video. mkdocs build --strict passes, and the redirect script was checked for guide anchors, API anchors, and no anchor. The Windows steps have not been run on Windows.

Checklist

  • cargo fmt and cargo clippy --all-targets -- -D warnings pass (no Rust changes)
  • uv run --no-sync pre-commit run -a passes
  • Tests added or updated, and uv run --no-sync pytest passes (docs only)
  • Docs and CHANGELOG.md updated (the changelog is written by release-please)

🤖 Generated with Claude Code

alesanfra and others added 2 commits September 28, 2026 11:25
The reference mixed the API with explanations of when to use each
argument. It is now two pages: guides.md (frames by number, approximate
frames, threads, hardware decoding, frames on the GPU) and api.md
(signatures, arguments, errors, types, constants). A MkDocs hook writes
reference/index.html, which sends each old anchor to the page that now
holds it, so the links in the README of released versions keep working.

The quick start gains random access in any order, device="auto", reading
videos in parallel, and when errors are raised.

The Windows setup in development.md explains that pacman is MSYS2's,
adds uv's tool directory to PATH for meson and ninja, and renames
MSYS2's link.exe instead of deleting it. The layout table lists build.rs,
src/dlpack.rs, and web/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alesanfra alesanfra changed the title docs: split the reference into Guides and API, and fix the Windows setup docs: split the reference into Guides and API; relicense under Apache 2.0 Sep 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alesanfra alesanfra changed the title docs: split the reference into Guides and API; relicense under Apache 2.0 docs: split the reference into Guides and API, and fix the Windows setup Sep 28, 2026
@alesanfra
alesanfra merged commit 47a64d0 into main Sep 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant