Skip to content

chunk #4: doc refreshes — jvm.md Pairer section + python.md transport rewrite - #43

Merged
aklofas merged 3 commits into
mainfrom
chunk4-doc-refreshes
Jun 15, 2026
Merged

chunk #4: doc refreshes — jvm.md Pairer section + python.md transport rewrite#43
aklofas merged 3 commits into
mainfrom
chunk4-doc-refreshes

Conversation

@aklofas

@aklofas aklofas commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

Final unit of the polish/parity pass — docs-only (two docs/languages/ pages; no code/CI-surface change).

jvm.md — add the pipeline.Pairer section

docs/languages/jvm.md had no usage section for org.tstrans.pipeline.Pairer (only an intro + a stale roadmap mention). Added a ## Pipeline pairing (org.tstrans.pipeline.Pairer) section after the RTSP server section, matching the ## Codec parsing / ## SRT convenience house style: the concept (correlates video + KLV by PTS, wrapping tst_pipeline::ext::pairing::PairingDemuxer), a grounded try-with-resources example adapted from the real PairerTest, the PairerOutput variants + value types, and a gotchas list. Also removed a now-fully-stale roadmap bullet ("data push-family parity follow-ups") — both MountHandle.pushData/pushDataTo and ManagedMuxSender.pushData/pushDataTo shipped in chunk #2 (PR #40), and the Pairer-section clause it also carried is now done.

python.md — macro-stale rewrite

docs/languages/python.md was frozen pre-Phase-5: it claimed "file I/O only / live SRT unavailable", cited "~582 pytest", and carried a v2/v3 roadmap — while the entire live transport surface shipped and was undocumented. Rewritten to a full jvm.md-scale guide:

  • Fixed the intro / Status box / "Where this binding differs" / Roadmap (pytest now ~1149; dropped the v2/v3 framing).
  • Added transport sections: SRT (raw + convenience + managed reconnect), RTP (raw + convenience + RTSP client + RTSP server), UDP/TCP/RIST (builder + sender/receiver), HLS (experimental), and pipeline.Pairer — all with .pyi/PyO3-verified hello-worlds.
  • Accurate caveats: HLS is experimental and excluded from published wheels (import tstrans.hlsImportError from a wheel; only --features hls source builds expose it); RIST is excluded from the Windows wheel.

Two source-grounded catches during the rewrite: applied SOURCE-WINS where rtp.pyi lists cancel_handle() on the RTP MuxSender/DemuxReceiver but the PyO3 source doesn't expose it (documented per source, matching jvm.md); and fixed a genuinely-broken existing example (add_klv(0x102) → the real add_klv(pid, stream_type, *, carries_pts) signature).

Verification

Docs-only diff (exactly jvm.md + python.md) — code rails (clippy/tests/public-api/#[non_exhaustive]/fuzz) are no-ops. Ran: cargo fmt --all --check; the full scripts/check bash-ratchet sweep (incl. doc-abi-and-st1910-currency, publisher-class-mirror, and the forbidden-name scrub guard) — all pass; forbidden-token grep clean; fences balanced; anchor links resolve. Each task went through an independent doc-accuracy review against the PyO3/Java source.

aklofas added 2 commits June 14, 2026 20:23
Adds the missing `## Pipeline pairing (org.tstrans.pipeline.Pairer)`
section to docs/languages/jvm.md, covering concept, Java example
(try-with-resources + instanceof pattern matching), variant/exception
model, and Gotchas block.  Matches the page's house style.

Also removes the now-fulfilled "a documented … Pairer section on this
page" clause from the roadmap follow-ups bullet, and adds a "How to
pair video with KLV metadata" line to the "You will learn" block.
The python.md guide was frozen pre-Phase-5: it claimed "file I/O only /
live SRT unavailable", cited ~582 pytest, and carried a v2/v3 roadmap.
The live transports (srt/rtp/udp/tcp/rist), RTSP client+server, SRT
auto-reconnect, and tstrans.pipeline.Pairer all shipped and were
undocumented.

Add jvm.md-scale sections for SRT (raw + MuxSender/DemuxReceiver +
Managed*), RTP (raw + convenience + RTSP client + RTSP server),
UDP/TCP/RIST, the experimental HLS publisher (flagged not-in-wheels),
and Pipeline pairing. Update the intro framing, Status box (~1149
pytest), "Where this binding differs", and Roadmap. Every signature
verified against the .pyi stubs / PyO3 #[pymethods] (the rtp convenience
shells have no cancel_handle in the Rust source — the .pyi was stale).
Also fix a stale add_klv() call in First send.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Docs-only polish/parity refresh for the language guides, bringing JVM and Python documentation up to date with the shipped transport + pipeline surfaces and adding missing Pairer usage guidance.

Changes:

  • docs/languages/jvm.md: adds a new “Pipeline pairing (org.tstrans.pipeline.Pairer)" section and removes a stale roadmap bullet.
  • docs/languages/python.md: rewrites the page to document the current Python surface (SRT/RTP/RTSP/UDP/TCP/RIST, HLS caveats, Pairer), and fixes/updates examples to match current signatures.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/languages/python.md Major refresh: updated status/intro, added transport sections and tstrans.pipeline.Pairer guide, and corrected examples/caveats.
docs/languages/jvm.md Adds org.tstrans.pipeline.Pairer usage section and removes an outdated roadmap item.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/languages/python.md Outdated

pairer = Pairer(video_pid, klv_pid, cfg)
outputs = pairer.feed(ts_bytes)
outputs += pairer.flush() # drain end-of-stream (no-op in Realtime)
Comment thread docs/languages/jvm.md Outdated

try (Pairer pairer = new Pairer(videoPid, klvPid, cfg)) {
List<PairerOutput> outs = new ArrayList<>(pairer.feed(tsBytes));
outs.addAll(pairer.flush()); // drain end-of-stream (no-op in Realtime)
Comment thread docs/languages/jvm.md Outdated
Comment on lines +1397 to +1398
- **`flush()` is load-bearing only in Buffered mode.** In Realtime mode it is a
no-op. Always call it at end-of-stream when using Buffered mode.
@aklofas
aklofas merged commit 44701b7 into main Jun 15, 2026
19 checks passed
@aklofas
aklofas deleted the chunk4-doc-refreshes branch June 15, 2026 04:42
aklofas added a commit that referenced this pull request Jun 15, 2026
…ltime)

The PairingDemuxer/Pairer flush() rustdoc, the JVM nFlush rustdoc, and the
Pairer.java Javadoc all described flush() as "a no-op in Realtime mode". That
is inaccurate: the core flush() drains unused KLV history and emits trailing
UnpairedKlv in BOTH modes (e.g. metadata that arrived after the last video
access unit) — only the buffered-video drain is Buffered-specific. Proven by
the `flush_realtime_drains_unused_klv_history` test (nearest.rs). Skipping
flush() in Realtime can silently drop tail metadata.

Corrects the four source-comment sites (the user-facing docs/languages/
jvm.md + python.md pages were already fixed in chunk #4 / PR #43). Also
de-qualifies the Swift per-language idiom row that implied flush is
Buffered-only. Docstring-only — no API/behavior change.
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.

2 participants