Repository navigation
ariadne: conference host (§8) + live camera self-view - #699
Merged
Merged
Conversation
The conference host wiring (§8): ariadne_conference is the stock cvcGL Ariadne runner plus the five stream/media registrations a conference .ari needs -- register_stream_intrinsics (stream-open/info/close), register_gl_stream_intrinsics (gl-bind-stream), register_media_intrinsics (capture-camera/-audio, play-audio), register_stream_node_type (type: stream) and register_stream_view_widget (type: stream_view). It opens NO stream in C++. conference_media.ari drives the whole capture -> stream -> render/play pipeline from the DSL program lane: on_tick opens a 640x480 camera + a 48kHz mic, attaches a synthetic video producer + a 440 Hz tone, binds the camera into a reactive stream_view widget, and plays the mic. Hardware-free by default, so it runs and verifies HEADLESS (software GL): 2/2 streams open, the synthetic video renders in the widget, the audio player drains. A CVC_ENABLE_SDL build drives real devices. This closes gap 2 of the conference roadmap (the host wired none of it); the §4b room verbs build on exactly these tokens.
…t to MJPG) SDL opens a camera in the device's default format, which for most webcams is MJPG (compressed). SDL hands fill() the raw JPEG bytes in an SDL_PIXELFORMAT_MJPG surface, and SDL_ConvertSurface does not decode JPEG — it reinterprets the compressed bytes as pixels, so the stream carried garbage (a green/striped pattern) instead of video. Enumerate the device's supported formats and open with the best uncompressed one (skip MJPG/unknown), scoring by smoothness×resolution with fps capped at 30; the delivered YUY2/RGB frames then convert cleanly to rgba8. Falls back to the device default only when a camera is compressed-only (rare). Fixes the live feed for both ariadne_stream --camera and ariadne_conference --camera.
A camera dictates its own resolution, so the DSL cannot pre-size a stream to it. With --camera, the host opens the self-view camera in C++, sizes the video stream to the device, and sets cam_live=1 + cam_token in state; conference_media.ari then skips its synthetic open and binds the stream_view widget to that token. Audio stays DSL-driven (the 440 Hz tone). Hardware-free without --camera, exactly as before.
transfix
added a commit
that referenced
this pull request
Oct 19, 2026
Resolve conflicts: the conference files (ariadne_conference.cpp, conference_live.ari,
room_intrinsics.cpp, room_media_intrinsics.{h,cpp}, room_media_test.cpp) take THIS
branch's versions — master only had the squashed #699/#705 baseline of them, and this
branch is the continuation (N-party, SFU relay + ready-gate, MJPG, --name/--mic,
snapshot bootstrap, UX toggles), verified as a strict superset with no master-unique
change (register_room_media_intrinsics has exactly one caller, ariadne_conference.cpp).
src/cvc/CMakeLists.txt keeps master's addition of ariadne/tvision_backend.cpp.
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.
Ariadne conference host (§8) + live camera
The conference-app host bundle (roadmap §8): the only C++ a conference
.arineeds. It extends the stock cvcGL Ariadne runner with the five stream/media registrations, then runs a document that drives the entire media pipeline from the DSL program lane — no C++ opens a stream.What's here
ariadne_conference— the host. Registersregister_stream_intrinsics(core),register_gl_stream_intrinsics,register_media_intrinsics,register_stream_node_type(type: stream), andregister_stream_view_widget(type: stream_view), loads a.ari, runs the frame loop, and verifies the streams the document opened.conference_media.ari— a pure-DSL demo: fromon_tick, it(stream-open)s a camera and a mic, attaches producers with(stream-capture-camera)/(-audio), renders the video in a reactivestream_viewwidget, and(stream-play-audio)s the mic. Hardware-free by default (synthetic test pattern + 440 Hz tone), so it runs and verifies headless.--camera— opens a real webcam for the self-view. A camera dictates its own resolution, so the DSL can't pre-size a stream to it; the host opens the device in C++, sizes the stream to it, setscam_live/cam_token, and the.aribinds the widget to that token (skipping its synthetic open). Audio stays the DSL tone.Camera capture fix (affects
ariadne_stream --cameratoo)Webcams default to MJPG (compressed). SDL handed
fill()the raw JPEG bytes in anSDL_PIXELFORMAT_MJPGsurface, andSDL_ConvertSurfacedoes not decode JPEG — it reinterpreted the compressed bytes as pixels, so the stream carried garbage (a green/striped pattern). The capture seam now enumerates the device's formats and opens with the best uncompressed one (YUY2/RGB), scored by smoothness×resolution. Frames then convert cleanly to rgba8.Verification
--offscreen→2/2 streams opened from the .ari program lane(video in thestream_viewwidget + audio tone played); PNG confirms the animating test pattern.--cameraon a UVC webcam → selectsYUY2 800x600 @ 20fps, opensconference.streams.selfcam, and thestream_viewwidget shows the real feed with correct colors (verified visually).Both the
schema: /windows/0/children/3/sizeandstream_view ... no registered handlerwarnings are cosmetic (the backend'sregister_widgetrenders the widget regardless).Run it
Next
§4b room verbs (join/publish/subscribe/roster) + §5 control plane, toward a two-instance native conference over the merged cross-node gRPC
StreamTransport.