examples: ariadne_stream — the Phase-3 streaming holy-grail demo (stream as scene quad + stream_view window) - #540
Merged
Merged
Conversation
One live video stream shown TWO ways from a single .ari document: as the MAIN SCENE (a `type: stream` node — a quad textured with the live frames, filling the viewport) AND in a draggable/resizable ImGui window (a `type: stream_view` widget the SAME stream is routed to; it also shows a static image when no stream is live). The source is hardware-free by default (synthetic moving test pattern), so the demo runs and verifies headless; --camera feeds it from a real SDL3 camera (cvc::gl::capture) when present. The host (ariadne_stream.cpp) opens one stream at the app root, registers the two sinks (register_stream_node_type + register_stream_view_widget), loads stream.ari, realizes the scene, and renders — a navigable window or a one-frame offscreen PNG. Everything else is the stock cvcGL Ariadne runner (cf. ariadne_hello). The stream pool is sized for BOTH sinks (expected_subscribers=3): the pool is fixed-size and refuses rather than under-provisions, so a second sink on the same token gets no frames unless budgeted. Verified: `ariadne_stream stream.ari --offscreen --png` renders the live synthetic stream textured onto the scene quad (headless EGL). The stream_view window renders in an INTERACTIVE session; cvcGL's offscreen path does not composite the ImGui overlay (ariadne_hello hides it in captures for the same reason), and the widget's pull logic is covered hardware-free by cvcgl_stream_view with its draw reusing the Kind::Image path.
transfix
enabled auto-merge
October 2, 2026 14:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Holy-grail step (d): one live video stream shown two ways from a single
.ari— as the main scene (atype: streamnode, a quad textured with the live frames) AND in a draggable/resizable ImGui window (atype: stream_viewwidget the same stream is routed to). The capstone of the Phase-3 streaming arc (#516–536).Independent of unmerged work — everything it uses is on master (#532 camera, #536 stream_view, #533/#535 audio family + output, the substrate). The audio half (mic on/off/record/playback via the device source + audio_output) is a planned follow-up.
What it does
ariadne_stream.cpp(host): opens one stream at the app root, registers the two sinks (register_stream_node_type+register_stream_view_widget), loadsstream.ari, realizes the scene, renders — a navigable window or a one-frame offscreen PNG. Source is a hardware-free synthetic test pattern by default;--camerafeeds a real SDL3 camera when present.stream.ari: declares the scene quad + a "Camera" window holding thestream_viewwidget, both bound to tokenstreams.cam0.expected_subscribers=3) — the pool is fixed-size and refuses rather than under-provisions, so a second sink on one token gets no frames unless budgeted. (Found this while verifying.)Verification (headless EGL):
ariadne_stream stream.ari --offscreen --pngrenders the live synthetic stream textured onto the scene quad — see the attached capture; the colorful gradient is the moving test pattern mapped through substrate →type: streamnode → GPU texture. Thestream_viewwindow renders in an interactive session: cvcGL's offscreen path does not composite the ImGui overlay (ariadne_hellohides it in captures for the same reason), so the headless still shows the scene quad only. The widget's pull logic is covered hardware-free bycvcgl_stream_view, and its draw reuses the provenKind::Imagepath.Note: a backend-registered custom widget (
stream_view) draws a cosmetic load-time "no registered handler" warning (the loader is backend-neutral); the widget works.