The sample studio's "Game Capture" is the synthetic test pattern, whose
frame counter is drawn large in its top-left corner, exactly where the
preview puts LIVE and the timer: the screenshots showed half-hidden
glyphs there. The sample source now crops the pattern's top 120 rows
away (it still covers the frame), and the studio screenshots are taken
again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`cargo ndk ... clippy -p voelin-android -p voelin-ui -- -D warnings`
stopped at missing_const_for_thread_local on the window's app state and
the audio input buffer, which are both `const` already: on Android
targets the macro expands so that clippy does not see the initializer.
Allowed locally, with that reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio inside the main window (scenes, sources, preview with LIVE,
timer and viewers, the audio mixer with meters and gains, stream chat,
stream settings with a simulcast layer editor, Share Window/Screen,
Record Clip, Go Live, End Stream), the same studio in its own window,
and a phone layout. Also an engine fix: a camera's new background
effect is applied instead of being kept from the old one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
notify_returns checks that a notification fails cleanly without a
notification service, but where a session bus and a notification daemon
exist it sent a real urgent "Poke: from a test" notification on every
test run. Skip it there, as the portal capture test already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What each part shows, how it opens for a screenshot and what of the
engine it uses; how the window of its own shares the controller; the
studio.ui setting; the sample studio; its limits. docs/studio.md points
there and says that another background effect restarts a source's
input. The headless example also drops XDG_SESSION_TYPE, as the script
now does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A captured RGB DMA-BUF is converted to NV12 and scaled per simulcast
layer on the GPU, into surfaces the VA-API encoders take as they are;
the CPU never reads the frame. Used while every layer's encoder is
VA-API, with the unchanged CPU path otherwise, and switched on the fly.
The portal offers the GPU's tiled layout ahead of LINEAR. Measured with
the test pattern as DMA-BUFs: 1440p60 h264_vaapi at 0.10 cores instead
of 0.34-0.52; a real portal capture through this path is still to run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since the chat keeps a session's stored messages as the truth, the main
window builds lines only for the tab it shows, and the stream chat shared
that tab's lines: when the stream's channel was not the shown tab its
chat stood still, and a line pushed by hand (the sample data's go-live
message) was gone at the next refresh. The studio now has its own lines,
made from the destination tab's messages the way the chat view makes
them, and the chat tells it when that tab gets messages. The sample data
posts its go-live message as a stored message, as the engine's echo
would arrive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a conversion failed, the sink had already counted the frame and
taken its layers' pacing, then declined it: the portal mapped it, the CPU
path counted it a second time and found no layer due. Drop that one
frame instead; the next one takes the CPU path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe how captured DMA-BUFs now reach VA-API encoders (the GPU path in
the pipeline, GpuConverter and GpuFrame, encode_gpu, the portal's tiled
offer and renegotiation, synthetic_dmabuf and `bench --dmabuf`), and
record the release measurements of the whole streamer on both paths with
the test pattern handed over as DMA-BUFs:
- 1440p60 h264_vaapi: 0.10 cores against 0.34-0.52, every frame on the
GPU, 2.0-2.7 ms of the capture thread waiting for it;
- simulcast 1440p30 + 720p30 + 360p15: 0.06 cores against 0.26-0.38;
- 1080p60 av1_vaapi: 0.06 cores against 0.29.
The verification table gains the new tests, and says plainly that the
GPU path has not met a real portal capture yet, nor the tiled offer a
compositor.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A screenshot run hid the main window and waited for the event loop to
end, which it does not while another window is visible: with the studio
detached the run never finished. It now quits the event loop itself.
The stream chat keeps scrolling to its end for a moment after a change:
rows are measured as they come into view, so the end moves while the
first scroll reaches it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The portal asked for LINEAR DMA-BUFs only, because the CPU could not read
anything else. With the frames going to the GPU, a compositor that hands
over its own tiled layout saves itself a de-tiling copy per frame, and
the converter reads tiled memory faster.
FrameSink::dmabuf_modifiers lists the tiled modifiers a sink takes now;
the streamer's sink lists the GPU converter's (the layout the driver
gives its own RGB surfaces, which it imports: 0x200000028a01f04 on the
RX 7900 GRE) while the GPU path runs, and nothing on the CPU path. The
portal offers them ahead of LINEAR, picks the first one the compositor
can produce when it leaves the choice to us (LINEAR otherwise, as
before), and renegotiates whenever the sink's list changes: a switch to
an encoder that needs frames in memory, or a failed GPU conversion,
brings LINEAR buffers back before the CPU has to read one.
The first DMA-BUF of a capture is LINEAR (the converter is made for it),
and the offer is renewed from the second frame. Not tested against a
compositor: that needs a portal capture, which asks the person at the
desktop. The offer and the choice are unit-tested.
Also: exact_size tolerates an alignment of 0 (a stopped layer reports
one), which divided by zero.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The streamer's sink never took DMA-BUFs, so every captured frame was
read by the CPU, converted to I420 on every core and uploaded again for
a VA-API encoder; on a discrete GPU reading the buffer alone cost 19.5
cores at 1440p60 until the portal fell back to shared memory.
Ingest now takes DMA-BUFs whenever every encoder of every layer takes
GPU frames: on the capture thread one GpuConverter call converts the
buffer to NV12 and scales it for each layer that is due, straight into
surfaces of our own, and returns once the GPU is done, so the buffer goes
back to the compositor at once. Each layer's frame travels through a
second handoff to its encoder thread, which waits on both inboxes and
encodes the surface as it is (encode_gpu). The CPU path stays as it was
for everything else, and the capture switches to it by itself:
- an encoder that needs frames in memory (libvpx, x264, or an encoder
made for a viewer of another codec) sets its layer's GPU alignment to
0, so Ingest declines the next DMA-BUF and the portal maps it; until
then such an encoder skips GPU frames and starts with a keyframe;
- a conversion that fails turns the GPU stage off for the capture, with
the reason in StreamerStats::gpu_error.
Each layer's encoders publish the largest alignment they need, so the
GPU makes frames at sizes they encode exactly (AV1 on RDNA3 included).
A still screen's last GPU picture is sent again with a new timestamp
through another reference to its surface (GpuFrame::at).
StreamerStats gains gpu_frames, gpu_convert_time and gpu_error, and
`voelinctl stream bench` prints both paths; its new --dmabuf hands the
test pattern over as DMA-BUFs (StreamerConfig::synthetic_dmabuf), which
drives this path without a portal. Measured there (debug build, 720p30,
h264_vaapi): every frame on the GPU, 0.90 ms per frame on the capture
thread, 0.02 cores for the whole process.
Test: two simulcast layers through h264_vaapi take the GPU path for every
frame at their own sizes; a switch to libvpx takes the CPU path again
and the stream decodes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A session has one stream of ours: a quick share now refuses to start
where the studio is live, as Go Live already refused where a share runs.
Android runs one window, so the studio cannot be detached there (a wide
tablet shows the desktop layout and its detach button). The studio's
window sets the standard widgets' colour scheme from its theme, as the
main window does, and the dialogs keep their fields under their labels.
Headless screenshots also drop XDG_SESSION_TYPE: with it the push-to-talk
hotkey (and screen capture) pick the desktop portal of the user's
Wayland session even on Xvfb, which can ask the real desktop to bind a
shortcut.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The DMA-BUF path of a capture sink could only be driven by the ScreenCast
portal, which needs a person to answer its dialog. SyntheticScreen gains
with_dmabuf: it draws into a DMA-BUF of ordinary memory (a sealed memfd
shared through /dev/udmabuf, LINEAR XR24) and offers it to sinks that
take DMA-BUFs, as the portal does; a sink that declines gets the same
memory as a frame. Without /dev/udmabuf it says why and draws into
memory as before.
The udmabuf code moves from the encoder's test into capture/dmabuf.rs
(Udmabuf), which the test now uses as well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The development head now keeps AMF's runtime from crashing the app while
it probes the encoders; nothing of it overlaps the studio.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seen next to the mockups: the preview's corner badges sat at the left
(a positioned layout takes its parent's width unless told otherwise), the
bottom bar cut "Share Window" short, the mixer and the chat took the
height the preview needed, the destination was one line where the design
shows the channel over the server, and the compact stream settings
spread over their panel. The preview's panel is now as tall as a 16:9
picture across its column, the badges keep to their corners, the chat
shows its newest lines, the destination is channel and server, and a
scene's summary names its main picture first.
The overlay sources start clear of the corners the studio's own badges
cover in the preview: the viewer count at the top right, what is on
above the bottom left. While live, Go Live stays bright instead of
looking unavailable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The streamer's zero-copy path needs the conversion and the encoding on
different threads: the captured buffer has to go back to the compositor
at once, while each layer's encoder runs on its own thread. So split
what encode_dmabuf did in one call:
- GpuConverter (ffmpeg/gpu.rs), on the capture thread: maps an RGB
DMA-BUF onto a VA-API surface and converts it with VA-API video
processing into an NV12 surface per layer that is due, the whole
picture scaled to the layer's size and cropped to its encoder's
alignment. The surfaces come from pools of our own and travel as
GpuFrames, which are recycled once nothing holds them, so nothing is
allocated per frame once the pools are warm. It also reports the tiled
modifier the driver gives its own RGB surfaces, for the portal to offer.
- VideoEncoder::gpu_alignment and encode_gpu: VA-API encoders take a
GpuFrame's surface as it is (the encoder references it until it is
done); every other encoder says it takes none.
encode_dmabuf's RGB path now goes through the same converter instead of
a second copy of the import and conversion in the session.
Checked on the RX 7900 GRE: h264_vaapi encodes surfaces from a pool
other than its own; the scaled 640x352 layer is 48.5 dB against the CPU
pyramid's picture and the full one 40.4 dB (Y identical, chroma within
0.7); each layer's surface decodes through OpenH264; frames come back
once released; the driver's tiled RGB modifier is 0x200000028a01f04.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AMD's AMF runtime is not safe to open on several threads at once; the
probe did exactly that and crashed the app inside avcodec_open2. AMF
opens are serialised, and on Linux AMF is used only on request
(VOELIN_FFMPEG_AMF=1): VA-API drives the same encoder there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The desktop app died at startup under Xvfb with SIGSEGV in libamfrt64,
inside avcodec_open2 while the encoder probe opened h264_amf, hevc_amf
and av1_amf on parallel threads. Reproduced with the probe alone: 10 of
420 runs crashed with four to eight processes probing at once, every one
in AMF's process-wide AMFFactoryHelper (Init, or Terminate dlclose-ing a
library) while AMFContextImpl::InitVulkan created an encoder's device.
Serialising AMF opens within the process removed it: none of 600 runs
crashed, with the processes still probing together. So the race is
between threads of one process, not between processes.
Two changes:
- AMF encoders are opened and closed one at a time in the process. That
fixes the race wherever AMF is used: the probe, simulcast layers
opening together, and Windows, where AMF is the AMD encoder.
- On Linux AMF is not used unless VOELIN_FFMPEG_AMF=1. FfmpegEncoder::new
refuses it with the reason, so neither the probe, nor the factories, nor
a direct caller loads the runtime at all. VA-API drives the same VCN
encoder there, measured as fast with less CPU, and only VA-API takes
DMA-BUFs without a copy; AMF on Linux is AMD's closed runtime on top of
Vulkan, and a library that is never loaded cannot crash the app.
Not done: running the self-tests in a child process. A clean child does
not reproduce the state of the process that opens the encoder afterwards
(here the race only showed under load), so it would pass a backend that
can still crash the app, and every binary's main would have to cooperate.
Tests: the AMF refusal through FfmpegEncoder::new, the probe reporting
the reason without libamfrt mapped into the process, and an ignored
stress test that opens every AMF encoder on parallel threads 40 times
(with VOELIN_FFMPEG_AMF=1 it passes; the probe loop it replaces crashed).
On this machine the automatic H.264 encoder changes from h264_amf to
h264_vaapi.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides added to Nav (the studio's open-studio next to the drawers and
the voice view), to App (the studio's state next to the uploads) and to
the development switches (studio[:...] next to voice, pins, topics,
watch); all of them are kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio screens now run on the engine's studio: scenes and sources
are its scene graph (switch, add, rename, remove, reorder, show, lock,
transform, crop, opacity, background effect), the preview is its preview
tap turned into pictures on a thread of its own (latest wins, so a busy
UI skips frames instead of holding up the composite), and a Streamer
started for it encodes the composite from the start, so Record Clip and
recordings work before going live. Going live starts a TeamSpeak stream
in our voice channel and attaches that streamer to it, then tells the
studio; viewers, requests and the connection quality (the viewers'
bandwidth estimates and the composed frame rate) show in the header.
The audio mixer is stream.audio_sources with the mixer's meters, read
lock-free about 15 times a second; a gain drag goes to the mixer at once
and is stored at the end. The stream settings are a new studio.ui key;
title, game and go-live message, and three switches that keep overlay
text sources (viewer count, chat, now playing) in the live scene. The
game goes into the stream's name, which is all a TeamSpeak stream has
and what the gateway's directory shows. Layers, bitrate and output size
are the stream.* and studio.* keys, followed while streaming.
The detached window has its own globals; the same models are set on
both and both are wired to this controller. With VOELIN_DEMO_UI the
studio runs from synthetic sources and tones on settings in memory, and
VOELIN_OPEN=studio[:window|live|record|<dialog>] opens each state for
screenshots, which now also capture the studio's window.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Chat with author grouping, reactions, file cards and the composer;
a resizable members panel grouped by server group with badges and a
member card; pinned-message and topic drawers; the voice-channel grid
with stream cards; the watch-stream screen with viewers, volume, chat
and a full-window pop-out. Screenshots run headless on Xvfb with
WAYLAND_DISPLAY removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/ui.md gains a section on the server page: each part (chat, members
panel, member card, pins, topics, voice channel, watching a stream), the
`VOELIN_OPEN` switch that shows it, and the engine events and requests
it uses. The settings table lists `ui.members_width`, the switches and
the screenshot script are described as they now work, and the limits say
what the design shows that we leave out (offline members, a quality
picker without layer information, a second window for the pop-out).
The screenshots are taken again so they all show the chat at its newest
message. The user card's avatar has the green ring while our voice goes
out, the speaking indicator of the compact voice controls.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tests share a tracing setup in a Lazy that called init(). When the
quickcheck test ran first, its logging (use_logging) had already
installed a log logger, init() panicked with SetLoggerError, the Lazy
was poisoned and every later test of the binary failed. Use try_init().
Recorded as local patch 10 in UPSTREAM.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on a real RX 7900 GRE with FFmpeg 9: VA-API and AMF encode
1080p60 and 1440p60 at a quarter to half a core, simulcast included;
RGB DMA-BUFs are converted to NV12 on the GPU; Wayland screen capture
delivers frames again (it delivered none) and switches to shared memory
where reading GPU memory is slow; the H.264 level of the SPS matches
the offer; AV1 is cropped to what this GPU really encodes; FFmpeg 9's
structure offsets are checked against its headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing set the position of the message list, so a chat opened at the
oldest loaded message and new ones arrived out of sight below. The list
now starts at its end and follows new messages while it is there;
scrolling up stops that until the end is reached again, and another tab
starts at its end.
Jumping to a pinned message highlighted it but did not scroll: it now
scrolls to the message (to where an average row would be, as the
standard list estimates it, since rows differ in height) and leaves an
open topic for the chat.
The members panel could be dragged no wider than 420 px; it can now
take what the window allows while the chat keeps 400 px.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A source's input was kept when its background changed as long as both
the old and the new effect needed a mask, but the background filter is
set up with its effect when the input starts. So switching a camera from
blur to a colour or an image, or changing the blur strength, changed the
scene and nothing on screen. The input now restarts whenever the effect
differs, as it already did when the effect went on or off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The summary under the tables still gave 0.20-0.42 cores, the range before
the av1_vaapi re-run added 0.38-0.52.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add the re-measured av1_vaapi rows next to the first ones (5982 kbit/s
for 6000 asked at 1080p60, 9920 for 10000 at 1440p60, against 6211 and
10794 before), with what the encoder-only measurements showed: only the
rate-control buffer moved Mesa's AV1 rate control, and with two seconds
the stream is no burstier than the other hardware encoders'. The CPU
figures of these later runs are given as ranges with a control run,
because the machine was in use and they varied between runs while the
bitrates repeated exactly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer count in the player and on the stream cards was never filled
in a real session: the engine subscribes to the gateway's stream
directory, whose entries carry the number of viewers, but the UI dropped
those updates. Keep the counts per session by stream id from
`GatewayUpdate::Streams`, `StreamStarted`, `StreamUpdated`,
`StreamRegistered` and `StreamEnded`, and show them in the player ("12
watching") and on the voice channel's stream cards. The sample data
answers with a directory, like a gateway, instead of setting the count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio gets its screens before its controller: scenes, sources, the
preview with LIVE, timer and viewers, the audio mixer, the stream chat,
the stream settings with the simulcast layers, the bottom bar and the
dialogs, arranged three ways (a page of the main window, a window of its
own, the phone layout). They read only the StudioBridge and StudioNav
globals, so the second window, which has globals of its own, shows the
same pieces once Rust fills both. A button in each top bar opens it.
Work in progress: nothing in Rust drives these globals yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a machine with hardware encoders, voelinctl's streamer chose H.264
(the first hardware codec) and, sending through a FrameSource, offered
it alone. A viewer that cannot decode H.264 (no OpenH264 library)
answered with a video section that listed no payload type at all; the
streamer could not parse that answer and dropped the viewer, which only
saw "removed by the streamer (Failed)".
A viewer now refuses such an offer with the codecs on both sides, and
voelinctl's single-codec offer defaults to VP8, which every client
decodes; --codec or a named --encoder still pick another. The engine's
own streams are unaffected: they offer several codecs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The measurements on the RX 7900 GRE had av1_vaapi as the one backend that
did not hold its bitrate: 3.5 % over at 1080p60 / 6 Mbit/s and 7.9 % over
at 1440p60 / 10 Mbit/s, on the desktop pattern, every frame encoded. A
stream that keeps sending more than the estimate allows is answered by
the congestion control with loss and a lower target.
Measured directly on the encoder, 600 frames after 120 of warm-up:
`maxrate`, `rc_mode`, `blbrc` and the QP bounds change nothing; only the
buffer does. With twice the bitrate as `bufsize` it lands at -0.8 %
(1440p60), -0.2 % (1080p60) and -1.2 % (720p30 / 2 Mbit/s), no frame
skipped, the largest frame 68 KB against 64 KB before (h264_vaapi's
largest at the same settings is 86 KB). Every other backend keeps the
one-second buffer it was within 2 % with.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pictures in docs/screenshots/ showed the server page before the
design's layout. They are taken again with scripts/shots.sh, and the new
screens get their own: the voice channel, the pins, the topics, an open
topic, the member card and the stream popped out.
`VOELIN_OPEN=topic:<id>` now fills the sample topic as the gateway would
when it is opened (it was answered once at start and then cleared), and
the top bar's members button also closes an open drawer, like the chat
header's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the encoder's half of zero-copy as it now is: RGB DMA-BUFs
converted to NV12 by VA-API video processing on FFmpeg's display, why
libva is driven directly instead of libavfilter, and the colour
description that keeps Mesa from converting the transfer function.
Record the measurement (0.08-0.09 ms of CPU per 2560x1440 frame against
4.3-5.2 ms through shared memory), the checks against the CPU conversion,
the flush crash a failed import exposed, and libva among the licenses.
Say plainly what is still not reached: the streamer's sink does not take
DMA-BUFs, so no captured frame has used this path, and a real capture
through it needs that sink and another portal run. Also correct the
portal threshold, which e5789e4 moved from 6 to 1 ns per pixel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The voice channel's buttons now sit beside its title, so the topic and
the count below use the whole width, as in the mockup. The stream card's
gradient has two stops: the software renderer drew a dotted seam at the
middle one. The resize handle is a grip of three dots.
Screenshots run with FFmpeg off (probing a hardware encoder crashed the
app now and then in this machine's AMF driver, which no picture needs),
on a screen twice the window's size so the pointer is not over the
window (it made a message show its hover actions), and take extra
arguments such as `--set ui.theme=light`. The development switches list
the new screens.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rustix is a Linux-only dependency, but the code that redirects standard
error during the probe was compiled for every unix, so the default
`ffmpeg` feature did not build for Android (checked:
`cargo check --target aarch64-linux-android --no-default-features
--features ffmpeg`) and would not for macOS. On Windows the type had no
Drop impl, which `clippy --target x86_64-pc-windows-gnu`, the documented
check of the Windows code, refused (drop_non_drop).
Gate the redirection on Linux and keep a Drop impl everywhere. The new
LINEAR DMA-BUF test buffer (/dev/udmabuf) is Linux-only as well, so the
Windows check with --all-targets passes again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The application-capture test runs a private PipeWire and WirePlumber,
but WirePlumber's default profile still monitors the sound cards,
Bluetooth and cameras. On a desktop with a sound card its 0.3-amplitude
test tones could therefore be routed to the real speakers or
headphones. Disable the hardware monitors (the 0.5 profile and the 0.4
Lua fragments) and give the null sink the highest priority, so the
private graph holds nothing but the test sink.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The portal offers a sink that accepts DMA-BUFs the buffer as it is, with
its size taken from `mapoffset + maxsize`: the same fields e5789e4 found
0 for every DMA-BUF this compositor sends, which left the mapping empty.
On the sink path the size goes into the DRM PRIME descriptor of the
import. Mesa happens to ignore it (an import with size 0 encoded the same
picture here), but the size is part of the descriptor and other drivers
use it, so ask the buffer object (lseek to the end, which a DMA-BUF
answers with its size) and fall back to the rows the format describes.
The module documentation now says what a DMA-BUF-taking sink gets, and
why tiled buffers are still not offered: the modifiers the encoder's
driver imports are not known on this side.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer put a title bar above the picture and the chat in a column
beside it. The design keeps the channel's header and puts the chat under
the player, so the members panel stays beside it with the people in the
channel first.
The player is a card with the streamer, the title and the number of
viewers over its top, LIVE and the picture's height (or the simulcast
picker when the streamer offers layers) at the right, and the controls
over its bottom: volume, the elapsed time, back to the chat while
watching on, pop out and full screen. Under it a note says the stream
belongs to the voice channel, then the chat and a Stream Info tab. In
full screen and on a phone the player is alone and carries Leave.
With sample data, `VOELIN_OPEN=watch` plays the local test pattern in
the sample stream's place, so the screenshot shows a picture.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Screen capture hands over RGB, and encode_dmabuf took only NV12, so the
zero-copy import never carried a captured frame. VA-API encoders now take
XR24, AR24, XB24 and AB24 buffers too: the buffer is mapped onto a VA-API
surface of its own size and converted into the session's NV12 surface by
VA-API video processing, cropped to the coded size on the way, and the
call returns once the GPU has read it, so the buffer can go back to the
compositor.
The conversion goes straight to libva (vaCreateConfig with
VAEntrypointVideoProc, one VAProcPipelineParameterBuffer per frame) on
FFmpeg's own VADisplay, found through AVHWDeviceContext.hwctx, located
and checked like the other fields. FFmpeg has the same conversion only in
libavfilter, which would be another library to find and a filter graph
to drive for one call. libva is the library FFmpeg's VA-API support
already loaded, and its ABI has not changed since libva 2.
Measured against the CPU's conversion of the same picture: Mesa converts
the transfer function as well unless told otherwise, and a dark pixel
came out 5 levels too bright (grey 30 as Y 47 instead of 42). Describing
the input with BT.601 primaries and transfer, as the output, leaves just
the matrix: Y now matches exactly, U and V within 0.7 on average.
Through h264_vaapi and av1_vaapi to our decoders the GPU path is within
0.3 dB of the CPU path, from the driver's own tiled buffer and from a
LINEAR one with a padded pitch (/dev/udmabuf), which is what the portal
negotiates.
CPU per 2560x1440 frame on the way into h264_vaapi (release): 4.3-5.2 ms
when the CPU converts and uploads, 0.08-0.09 ms from an RGB DMA-BUF;
0.26-0.31 cores at 60 fps against 0.005.
Also: dropping a VA-API encoder whose first frame failed (an import that
failed, here) drained a session that had never received a frame, and
FFmpeg 9's h264_vaapi crashes doing that (SIGSEGV in avcodec_send_frame,
reproduced with an empty session alone). Sessions remember whether a
frame went in and are only flushed then.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scenes of any number of sources (screen, window, camera, image, text,
colour) composited into pooled frames with no allocation per frame and
streamed through the existing encoders and simulcast; recording to
WebM/Matroska, a replay buffer that spills to disk, WHIP output, a
controller API with a preview tap for the Studio UI, studio.* settings,
and voelinctl studio run/bench/cameras. Background blur runs behind a
segmentation trait; no person-segmentation model is bundled yet.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The segment docs promised a bilinear, feathered mask; the frame path
samples the nearest mask pixel and relies on the mask's own soft edge.
Say so, here and in docs/studio.md, rather than promise a smoothing that
is not there: a model's sharper mask will want it, and that is the place
to add it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replacing a camera's background with an image cloned the whole scaled
image (3.7 MB at 720p) for every frame, on the camera's thread, only to
mix it and drop it: the mix only needs to read it. The image path had no
test; one now checks the image shows behind the subject and the subject
stays as it was.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio branch declared a `v4l` feature that nothing reads: cameras
are listed through V4L2 with the PipeWire feature and captured through
PipeWire. An empty feature only suggests a choice that does not exist.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The camera list read V4L2 on any Linux build, but the ioctls go through
rustix, which only the capture features bring in: voelin-media without
default features (a core built with `media` alone) did not compile.
Devices are now listed where they can be captured, through PipeWire;
everywhere else the list is the test pattern. Checked with and without
default features, and for x86_64-pc-windows-gnu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The screens were built before the mockups were at hand and guessed at
their layout: a strip of voice controls over the chat, pins and topics
floating over the messages, the voice channel as a grid of tiles and a
members panel of our channel only. The mockups put them elsewhere.
- The members panel lists everyone on the server, "Members — N" with a
search: those streaming (or, in the voice channel and while watching,
the people in our channel) first, then each server group in the
server's order, people elsewhere with the channel they are in, and
moderator groups as a role next to the name.
- Pinned messages and topics take the members panel's place, as cards;
topics can be searched and show when they were last active, and the
chat header opens them with labelled buttons.
- The voice channel view is a header with Voice Settings and Leave, the
people as large avatars with talking and muted marks, the streams as
large cards (with the picture while we watch) and the channel's chat.
- The chat drops the extra voice strip (the sidebar has the controls);
messages are larger, times read "Today at 10:14", reactions end with
an add button, and the composer has a round attach button.
- Hold-to-talk shows only with push-to-talk.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The studio had module docs but no page saying how its parts fit, what
the UI drives it with, which settings it keeps, and what is tested for
real against what only compiles. docs/studio.md covers the scene format
(with an example), the compositor and its numbers, cameras, background
replacement and the fact that no person segmentation model is in the
build yet, the outputs, the controller's commands and events and the
preview tap, the engine's hooks and settings keys, the voelinctl
commands, and the verification status. docs/media.md points to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GoLive said it started the outputs that push and EndStream that it
stopped them, but both only changed the state: a WHIP output kept
pushing to the service after End Stream. WHIP outputs start when they are
added (that is when the service is asked), so GoLive now says just that,
and EndStream closes every output that pushes, reporting each removal;
recording and the replay buffer keep running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two rules said when a source's input restarts: the controller's own,
and SourceKind::same_input, which nothing called and which would have
kept a text source's old picture after its text changed. Now there is
one, same_input, and it also keeps a camera running when only its
mirroring changes: that is drawn by the compositor, and restarting the
camera for it meant a second of black while PipeWire renegotiated.
A WHIP output that drops a packet because its upload stalled now asks
for a keyframe, so the service's decoder recovers when the upload does
instead of showing a broken picture until somebody else asks.
The segmenter's input_size was never called (the frame path sizes the
segmenter's copy itself) and divided the height by the clamped width;
the trait now says what the segmenter is given.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>