The public client repository must not carry third_party/schema-api:
TeamSpeak's non-public myTeamSpeak API protocol definitions, which came
without a licence. The account sign-in built on them (crates/voelin-myts)
goes with it, since nothing else in the client used that snapshot.
Removed: third_party/schema-api, crates/voelin-myts, the account module of
voelin-ui (sign-in, saved session, profile, avatar, badges, User Tag), the
login page at start and the live account test of voelin-core. The workspace
members, default-members and exclude lists, both manifests and Cargo.lock
no longer name them (tonic, prost-build and their dependencies drop out of
the lock file and THIRD_PARTY_NOTICES.md; about.hbs has no schema-api
section).
Settings -> My Account keeps the identity in use and shows a note that
account sign-in is not available in this build. The Slint account screens
stay, fed neutral values (Bridge.myts keeps its default: signed out, not
available, no prompt), so the account can return without redoing them. The
TeamSpeak protocol parts in tsproto/tsclientlib (myTS ID, other users'
badges and avatars) are untouched.
The account returns later through the gateway library (VoelinGateWay); the
research notes in docs/research/myteamspeak.md stay and say so. CHANGELOG,
docs/ui.md, docs/identity.md and SECURITY.md no longer describe the account
as present. A session an earlier build saved stays in the system keyring
(item myts/session) until the user deletes it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Conflicts and how they were resolved:
- CHANGELOG.md: both sides' lines kept under [Unreleased], each in its
section; the badges line says TeamSpeak 6's verified badges come first.
- crates/proto/UPSTREAM.md: #11's myTeamSpeak presentation stays patch 15;
this branch's privilege key (default_token) patch becomes 16.
- voelin-core web.rs: #11's downloader (retry hints, revalidation, proxies,
per-host limits) as it is. The chat pictures' size limit sits on top as
web::fetch_chat_picture, which narrows #11's Limits; fetch_within takes
them by value. The badge pictures go through #11's fetch like banners.
- voelin-core session.rs: both sides' fields kept (chat_pictures and
unfetchable). Chat pictures ([img]) are an ImageRequest of their own
(ChatPicture) instead of sharing Picture with banners, so #11's banner
policy (retried every 15 minutes while shown, logged by address) does
not apply to them: they keep the 1, 4, 16 s retries and are checked
against the size they were asked for; their failures are logged by host
at debug level. Badge pictures stay Pictures next to #11's banner loop
(with its unfetchable-scheme log).
- voelin-ui servers.rs: #11's imports (Instant, debug) with this branch's
(no SharedString).
Where the two badge features meet: the presence's badges are now
voelin_model::shown_badges, TeamSpeak 6's client_signed_badges (what #11
sends for our account, and other TS6 users' verified badges) first, then
client_badges, each once; so the badges chosen in Settings → My Account
show in the tree and on the member card like other people's.
Also: docs/ui.md describes My Account's badge choice and User Tag, the
new ui.image_cache_mb default (256), and the picture downloads as #11 left
them (16 at once, 6 per host, 128 MiB, the new timeouts, banner and badge
retries, proxies, BMP and ICO, scaling down past 4096 pixels) with the
chat pictures' own retries; the demo's login:account switch fills in a
badge choice and a User Tag for screenshots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
Messages count as read only while their chat is on screen (Nav.chat-shown)
in the focused window: winit's focus events, through slint's
unstable-winit-030 on the desktop; Android counts a chat on screen as
read. A tab keeps the newest message read and counts what came after it,
not our own. Entering a tab with new messages puts a red New line above
the first one until the tab is left (so does a stored or gateway page
that brings them while the tab is on screen), and while that line is
above the view a bar over the list counts them, with Jump and Mark as
read.
voelin-store migration 5 adds chat_reads (Store::chat_read, set_chat_read,
chat_reads). Markers are loaded once a session's server is known and
written when a tab is left, marked read, its session ends and on exit,
never per message; a restart counts what came while away again, gateway
pages included. Dev switch VOELIN_OPEN=unread[:end].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
Own account on TeamSpeak 6 servers:
- With only a saved session, the account's avatar and its certificate come
from myTeamSpeak's avatar service (requestContactsAvatar for the own myTS
ID), the signed badges from getSignedBadges and the User Tag's token from
/tschat requestSignedAllowedIdentifierList; no password sign-in needed.
- tsproto::myts::Certificate checks a certificate chain as the server does
(block types 4-7, leaf type 6, validity, key from the root, cofactorless
Ed25519); each part is sent with a certificate that verifies it, in
separate updatemytsdata commands when they differ, and cleared on sign-out.
- client_user_tag is set as the official client sets it
({"myts_token","tag","updated"}) on TeamSpeak 6 servers, after a
self-check of the token; cleared on sign-out or an account change.
- Settings -> My Account shows the User Tag and lets the user choose up to
three badges to show. The log says what the server published.
Banners:
- The URL (without query) is logged on the first failure; stalls, connect
failures and missing answers are named; 400/404/410 are retried after
15 minutes, then hourly; 429/503 honour Retry-After.
- Cached pictures are revalidated (ETag, Last-Modified); at most 6
downloads per host; a User-Agent with the app version.
- The desktop portal's proxy (Linux) and the system proxy (Windows, macOS)
are used, SOCKS included; redirects are followed hop by hop.
Gateway, client side:
- Only a refused login stops observing; retries after 1, 2, 5, 10, 20, then
30 s with jitter, at once when voice connects; a 30 s keepalive.
- Discovery asks DNS and the well-known endpoints at once; observing is not
restarted when the found list still holds the gateway in use.
- Info logs for discovery, attempts (with the stage that hung), connections,
losses and the first presence.
tsgw:
- Logging setup (log.level, log.file with size rotation, colour only on a
terminal) and lifecycle logs: startup summary, the address the server
sees for queries, WebSocket connections, logins, refusals, slow requests,
ServerQuery failures, relays and the observer.
- The lookup query connection reconnects after a TeamSpeak restart; query
connects time out after 10 s; a silent server cannot wedge a connection;
SIGTERM, startup while TeamSpeak is down and /health are handled.
- TCP_QUICKACK and one write per line: ~45 ms -> <2 ms per SSH command.
- One flood guard shared by all query connections (9 per 3 s, SSH auth
counted, every connection holds on a 524).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
The apps (voelin-ui, voelin-android) are 0.0.1-alpha; the gateway keeps
its own version. A pre-release version broke three package builds, now
handled:
- Android: versionCode took "1-alpha" as a number (Gradle failed); it
counts the version without the pre-release (0.0.1-alpha: 1).
- Windows installer: VIProductVersion must be numeric; makensis refused
"0.0.1-alpha.0". package.sh passes VERSION_NUMERIC (0.0.1).
- Debian: "0.0.1-alpha" reads as revision "alpha" and sorts after 0.0.1;
the package version is 0.0.1~alpha.
Draft releases of such tags are marked as pre-releases (GitHub, Gitea).
Changelog: the Unreleased section is 0.0.1-alpha, with myTeamSpeak sign-in,
banners and a known issue. AppStream: the never-released 0.1.0 entry is the
0.0.1-alpha development release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
schema-api enabled tonic's tls-ring, which turns on rustls' ring next to the
aws-lc-rs that reqwest and str0m use. With two providers rustls cannot pick
a process-wide one, and every TLS client built without an explicit provider
panics: tokio-tungstenite's for wss:// gateways ("Could not automatically
determine the process-level CryptoProvider"), leaving observation stuck at
Connecting. tonic uses tls-aws-lc now (second local patch, VOELIN-PATCH.md);
ring is gone from rustls in Cargo.lock.
voelin-core's one_rustls_crypto_provider test builds a rustls client config
with the app's TLS dependencies (voelin-myts is a dev-dependency there); it
panics as above with tls-ring and passes with tls-aws-lc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
Conflicts with the channel banners on main, both kept:
- crates/proto/UPSTREAM.md: myTeamSpeak's local patch is number 14, after
the channel banners' 13.
- voelin-core/src/voice.rs: both test modules.
- ui/app.slint: the mobile shell hides behind the account prompt and keeps
the channel chat's banner.
- ui/shells/common.slint: the user card counts a signed-in account as named
and shows our avatar, the person icon only without one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q
Finish banner rendering, image cache invalidation, avatar/icon wiring and image-format support. Bound raster decoding, retain readable text contrast, and recover failed downloads while stopping obsolete reload timers.
Validated with 168 library tests, a private TS6 banner lifecycle test including the real 60-second reload, desktop builds, strict scoped Clippy, formatting, license notices, independent source review and six headless desktop/mobile renders.
The host banner (virtualserver_hostbanner_gfx_url) and TeamSpeak 6
channel banners are http(s) addresses on any host, not files on the
server, so the voice file transfer that fetches avatars and icons cannot
get them. A new engine path (web.rs) downloads them with the workspace's
reqwest client (rustls, system proxies and certificate store) into the
same cache, keyed by the MD5 of the address (pictures/<md5>), only for
http and https, at most 4 MiB, with a 10 s connect and 30 s overall
timeout, and keeps a download only if its content is a picture the UI
decodes (PNG, JPEG, GIF, WebP, SVG), whatever the address or the server
say; an error page is not cached as a banner.
The session fetches the banners of the presence it shows, from any
source, when cache.fetch_images allows (it contacts hosts the server
chose, as the official client does), and reports each as PictureReady.
When the server sets virtualserver_hostbanner_gfx_interval, a timer asks
the session to fetch the host banner again (never more often than once a
minute, as TeamSpeak 3 and 6 servers enforce) and the new file replaces
the old one; Cache::fetch takes `fresh` for that.
Tests: a local HTTP server on 127.0.0.1 for the download, the size cap
(announced and unannounced), refused pages and the cache; the cache keys;
a live test that sets both banners on the TeamSpeak 6 dev server through
ServerQuery, sees them arrive and puts the server back. voelinctl engine
prints the pictures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No conflicts. From the development branch: stream connections step down
when they connect but carry no media or never decode (another codec,
H.264 profiles, SRTP fallback), mDNS host candidates, larger stream
sockets, and the smoke test waiting for clients instead of pausing.
Nothing in the UI crate changed; this wave's screens are as they were.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user's rule for every negotiation: try the best option first and step
down for compatibility when it is not accepted.
- H.264 is offered in Constrained High, then Constrained Baseline; the
streamer encodes each viewer in the profile its answer took (headless
Chromium, which answers Baseline only, now decodes our H.264 streams).
- A connection that connects but carries nothing steps down at runtime:
the viewer reconnects without the failing SRTP profile, or without the
codec when audio came; the streamer offers a new connection when its
viewer reports nothing; video of one codec that never decodes makes the
viewer ask for another codec. Proven with a UDP relay that breaks SRTP
and against Chromium.
- mDNS host candidates (`<uuid>.local`) are resolved, so peers that hide
their addresses still connect on a LAN.
- Peer sockets get 4 MB send and receive buffers: bursts at 9 Mbit/s no
longer drop datagrams in the kernel; NACK and retransmission repair
losses before frames reach the pipeline.
- docs/architecture.md, "Negotiation: best first, then fall back": every
negotiation point, its ladder, what counts as refused, and why AES_CM
stays first for SRTP and DTLS stays at 1.2 until the official client is
shown to take the alternatives.
Checked on the merged tree (with the decoders and servers work): fmt,
clippy, the tests of stream, media, core, ui, voelinctl, gateway and
tsclientlib, the browser interop tests (7 and 3) and scripts/it-smoke.sh.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides kept. From the development branch: the add-server dialog
asks for the address and an optional password (the rest under Advanced
when editing), servers are found through TSDNS and their gateways in
DNS, wss:// gateways, the official client's identities imported on
every start, and a bookmark built from the form over the old one.
The dialog keeps this wave's join mode for Home's "Join a Server": its
title says so, the button reads Join and connects once saved; adding
and editing read as on the development branch. Saving takes the
development branch's bookmark_from_form, which keeps the bookmark's
identity as this wave's code did.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The gateway client was built without TLS, so every wss:// gateway, the
setup docs/gateway-admin.md recommends and what a _tsgws._tcp record
names, failed with "TLS support not compiled in". tokio-tungstenite now
uses rustls with the system's certificates; rustls and its crates were
in the tree already (reqwest), so nothing new is downloaded.
Checked end to end against the TeamSpeak 6 dev server: tsgw behind a
TLS terminator with a certificate from a throwaway CA, the login over
wss:// works when the CA is trusted (SSL_CERT_FILE) and is refused with
UnknownIssuer when it is not. Android has no system store to read, so
wss:// stays out of reach there; the docs say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides kept. From the development branch: the phone's voice channel
screen, the pages over it (pins, topics, members), the voice button in
the phone's top bar, the quick share's mixer and picker, invite links,
viewer counts, the studio's cameras and RTMP output, and the Android
pieces.
The phone's top bar keeps this wave's search button next to the voice
button and the bell (the bell opens the notifications panel); its tabs
mark Home also on the friends, messages and Library pages and Servers on
a server's events page. The phone shell shows both sides' pages: this
wave's friends, messages, events and Library pages with their back
button, and the development branch's voice channel screen, which hides
the bottom navigation as before.
Home keeps this wave's page, which maps the design onto TeamSpeak as
decided for it (friends' presence across servers, the latest chats of
every server, live streams of all servers); the development branch's
interim home (people on the current server, its chats, its streams)
gives way to it. Its server cards still switch the phone to the Servers
tab through Nav.show. A server item keeps this wave's detail and flavor
with the development branch's wording of `live` (streams on the server).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base moved on (the phone and Android wave, the quick share's sound,
voelinctl subscribing to every channel); it merges without conflicts
and the negotiation changes build and pass on top of it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Users should not have to type a gateway URL: a server added by its address
should bring its tsgw along, the way TeamSpeak finds the voice server with
SRV _ts3._udp and TSDNS. voelin_core::discover::gateway looks at the
address's host and then each parent domain down to the registered domain,
the most specific first, for SRV _tsgws._tcp (wss) and _tsgw._tcp (ws)
records, TLS first at the same name, with the path from an optional TXT
record ("path=/v1" by default).
Without records, as TSDNS has its port 41144, the gateway itself is asked
on tsgw's default port: tsgw now answers GET /.well-known/tsgw with the URL
apps should use (listen.public_url, else the address the request came in
on), so a tsgw next to the server is found with no setup at all.
docs/gateway-admin.md says which records to publish, with examples. The
DNS lookups are injectable in the module: tests with fake SRV/TXT answers
and a local responder; the gateway's own test fetches the well-known URL
from the real router and logs in there. hickory-resolver is the version
the voice resolver already uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone's voice channel screen (mockup 02), Home and bottom navigation;
Android cameras through Camera2, the screen shared into MediaCodec's input
surface without a copy, notifications with working actions, "Share to
Voelin"; the multi-select audio picker with app icons; and, asked by the
user, the quick share's sound: the share dialog shows the studio's mixer
rows (meter, gain, mute) for `stream.audio_sources` and its picker, and a
running share follows changes live. docs/android.md rewritten.
Conflicts: both waves gave studio cameras a new backend (Windows Media
Foundation from Wave 6A, Android Camera2 here); both are kept, in the
docs and code. The Windows build caught what the merge could not: each
side's `Capture` initializers lacked the other's field, and Media
Foundation cameras lacked `Camera::mirrored` (webcams face the user, so
true). Checked: fmt, clippy (host, x86_64-pc-windows-gnu for voelin-media,
both Android runs), and the tests of stream, media, core, ui, android and
voelinctl.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Watching an official client's 1440p60 H.264 stream (6-9 Mbit/s) showed a
very bad frame rate. The peer sockets used the system's default buffers
(208 KB on Linux, about 90 full-size packets once the kernel's per-packet
overhead is counted), so a keyframe of hundreds of packets that arrives
while the peer task is busy overflows them, and every packet the kernel
drops costs the viewer a retransmission or a keyframe.
Each peer socket now asks for 4 MB of receive and send buffer
(PeerConfig::udp_buffer; the kernel caps it at rmem_max/wmem_max). What
the system granted is logged, and once per process with a sysctl hint
when it is less than asked.
Measured on loopback, 9 Mbit/s of noise at 60 fps with a 400 KB keyframe
every second, unpaced (high_bitrate_bursts, --ignored): with the default
buffers the kernel dropped 118-209 datagrams per 5 s and 3 of 300 frames
arrived after a gap; asking for 212992 bytes (what a default rmem_max
allows, doubled by Linux) or for 4 MB, nothing was dropped and every
frame arrived whole.
Also checked: our answer to a real libwebrtc offer (headless Chromium
152, H.264 first, stored as a fixture) keeps nack, nack pli,
transport-cc and an RTX payload type for every H.264 variant, and a relay
that loses one media packet in 25 shows str0m's NACK and retransmissions
repairing every loss before its depacketizer gives up (30 frames). The
relay (tests/relay) also serves the fallback tests that follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both sides kept. From the development branch: the share dialog's portal
rows ("Same as last time" restores the portal's last choice), the Share
button's menu with the Stream Studio in it instead of a button of its
own in the desktop top bar and the phone header, the codec order,
person segmentation for the studio, and streams of every channel.
The phone header keeps this wave's search button next to the bell; the
studio button goes as on the development branch. video.rs keeps the
development branch's imports without EncoderReport, which the
Integrations page now asks the codecs for itself. The Devices page
lists the capture sources without the restore row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the Share button's menu (Share screen / Stream Studio) and the
removal of the separate Stream Studio button from the headers, the
codecs every TeamSpeak client decodes ahead of H.264, the portal fix
and person segmentation.
The phone header keeps this branch's voice-channel button and hides the
bell on the voice screen, and loses the Stream Studio button as the
development branch wants. The studio's test table takes the
segmentation rows and the Android camera row. MediaCodec follows the new
codec order with no code change (Codecs orders every hardware factory's
codecs); its description and docs/media.md now say so, including what
that means on a phone without a hardware VP8, VP9 or AV1 encoder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in the portal dialog entry, the studio's person segmentation
(tract-onnx) and the Share button's menu. In docs/studio.md's status
table the segmentation rows join this branch's camera and RTMP rows
(RTMP is no longer a seam). docs/ui.md no longer says the engine cannot
tell a viewer the layers (a Voelin streamer lists them) nor that the
background effect has no segmentation model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blur, image and colour backgrounds were cut around a centred oval: no
segmentation model was in the build. `segment::HumanSeg` (feature
`segment`, on by default) now runs PP-HumanSeg, PaddleSeg's portrait
segmentation model as OpenCV Zoo ships it (Apache-2.0, 6 MB, bundled in
crates/voelin-media/models with its licence and SHA-256), on the CPU with
tract-onnx: the frame squeezed to 192x192 RGB, the probability of a person
per pixel out as the mask. It is the default segmenter; the model is
parsed and optimised once per process on the segmentation thread, and if
it does not load the oval stands in. Builds without the feature keep the
oval.
One mask takes about 50 ms on one core (tract is optimised in dev builds
too, as voelin-media already is; unoptimised it took 430 ms), so the 10
masks a second cost about half a core. A new test checks the model loads,
the mask size, that an empty evenly lit room has next to nobody in it, and
the time per mask; the frame-path tests now use the oval explicitly, since
they need a mask known in advance. On a photo of a person the mask
follows the silhouette, arms and legs included (checked by eye; the photo
is not committed). Not yet tried with a camera.
The notices list the model and its licence; THIRD_PARTY_NOTICES.md is
regenerated for tract and its dependencies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The voice service's notification said "In voice on <server>" with Mute
and Disconnect, and the screen-sharing one only "Sharing your screen".
The voice notification now shows what the app's voice card shows: the
channel as its title, the server and how many are there ("Home · 3 in
voice", "just you"), the time in voice as a chronometer, and Mute,
Deafen and Leave, which act on every voice session as the old Mute did.
Several servers at once read "In voice on 2 servers" with their names.
Tapping it opens the voice channel screen (the activity forwards the
action to Rust, which queues it until the window runs). While our
stream is live the screen-sharing notification says where it goes and
how many watch ("Live in Chill Zone", "Home · 2 watching"). Both use
the app's accent colour.
The window takes such platform requests through a small inbox in
voelin-ui (`voelin_ui::request`), handled on the window's thread and
outside the app's borrow, since navigating calls back into Rust.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Many USB cameras offer their large sizes only as MJPEG (the Fifine K420:
2560x1440 and 1920x1080 compressed, raw only up to 1280x720), and the
studio camera offered PipeWire raw formats only, so it was stuck at 720p.
MJPEG is now offered and decoded with zune-jpeg (already in the tree
through `image`) straight into pooled RGBA frames, on a thread of its own:
the camera thread copies each picture into a recycled buffer and hands it
over latest-wins, so a slow decode drops pictures instead of holding up
the camera, and nothing is allocated per picture once running. The offers
come from what V4L2 lists for the camera: the wanted size at the wanted
rate in a raw format first (no decoding), then the wanted size with MJPEG
first, then every format at the sizes it lists; PipeWire's V4L2 source
otherwise took a size on trust and failed to set NV12 at 1440p.
zune-jpeg is built optimised in dev builds like the other per-pixel code:
unoptimised, a 1440p picture took most of a second.
Tested on the Fifine K420: 2560x1440, 1920x1080 and 1280x720 arrive at
the right size at 10 fps, which is what the camera sends in this light
(v4l2-ctl measures the same); a camera-like 1440p picture decodes in about
30 ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The RTMP output was a seam that refused every rtmp:// URL. Broadcast
services (Twitch, YouTube, nginx-rtmp) take RTMP, so the studio could only
reach the few that speak WHIP.
The connection is libavformat's own rtmp:// and rtmps:// protocols,
loaded at runtime with the rest of FFmpeg and never linked. Its RTMP
writer takes an FLV byte stream and sends each tag as a message, so the
FLV is ours (onMetaData, AVC and AAC sequence headers, a tag per frame)
and no muxer struct (AVFormatContext, AVStream, codec parameters, which
all moved between releases) is used: five avio functions and
AVIOInterruptCB. Write errors only land in AVIOContext.error, which moved
too (120 bytes in libavformat 58, 84 in 63); it is found at load by
flushing a context whose write callback fails with a sentinel.
Video is the studio's H.264 of one layer as encoded; other codecs are
refused with the reason. Audio is the studio's Opus decoded and encoded
as AAC-LC by FFmpeg's own codecs on the output's thread. The encoder's
sample format has no AVOption, so AVCodecContext.sample_fmt is located
from its neighbours' option offsets like hw_frames_ctx; its 1024-sample
frames are a reference to the first decoded frame (FFmpeg filled in the
channel layout, whose field moved) with only the leading fields pointed
at our planes.
The stream key comes from the URL or the token (sent as the play path)
and never shows in the output's name. The first connection is made when
the output is added, so a wrong address fails there; later failures are
reconnected with backoff (1 s doubling to 30 s), each new connection
starting at a keyframe it asks for, and the stats show why it is down.
EndStream unpublishes; a dead network is cut off after three seconds.
Tested against FFmpeg's own RTMP server (ffmpeg -listen 1): a studio
stream through the hardware H.264 encoder and a 440 Hz tone arrives as
h264 320x180 and aac 48 kHz stereo per ffprobe, starts at a keyframe,
decodes, and comes back after the server is replaced; the unit tests
also pass against FFmpeg 4.4.8. voelinctl studio run gets --rtmp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The home page lists the latest chats across servers and the profiles
page raises an identity's security level, so the engine gains:
- Store::recent_chats / History::recent_chats: the newest message of
every chat, the most recently active first (one pass over the time
index).
- identity::improve_level: the hash cash search on every core, in
chunks of counters, cancellable, reporting each better level reached;
the key and so the unique id stay the same.
- privacy.private_messages and privacy.pokes (everyone, friends,
nobody): private messages and pokes of everyone else are dropped,
next to what privacy.block_mode does for blocked contacts.
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>
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>
A scene needs something behind each of its sources. Colour, text and image
are drawn once and put in the feed; screens, windows and the portal run the
existing capture backends through a sink that copies into pooled frames;
cameras get their own module. One broken source only sets its feed's error,
so it never stops the studio.
Text is rasterised with ab_glyph and the same Inter the UI bundles (reached
across crates rather than copied, and tools without the UI crate need it
too); images come from the `image` crate, which the tree already had.
Cameras are listed straight from V4L2 -- the card name and every pixel
format and resolution the driver reports, no hard-coded list -- but captured
through PipeWire, which already owns the devices; the connection comes from
the user's daemon or, in a sandbox, from the XDG Camera portal, and both
reuse the screen capture's PipeWire thread. Only the three read-only
enumeration ioctls are hand-written, so no bindgen build dependency joins
the tree. The test pattern is always listed as a camera, which is what the
tests use.
convert gained a borrowed-frame entry point so a capture buffer becomes RGBA
without an owned frame in between.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Import and export have to be reachable before the Profiles screen exists, and
a headless command is also how the round trip gets tested against a real
client installation without any of its data entering the repository.
The listing prints nothing but the nickname, the unique id and the security
level: all three are public — servers see them — while everything else in an
identity is the private key. `--dry-run` reads and stores nothing. `list`
comes along because `export <id>` is unusable without a way to learn the id.
Prove the imported key pair is whole rather than merely parseable: the
clients' format carries the public point next to the private scalar and
`Identity` keeps only the scalar, so signing a nonce and verifying it with the
key derived from that scalar shows the two halves belong together. The same
check runs over a real database when `VOELIN_IDENTITY_IMPORT_CHECK` points at
one, which keeps that verification repeatable without committing a fixture
that could only come from someone's own identities.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Switching to Voelin should not mean starting over on every server: the unique
id is the key pair, and a user who cannot bring it along loses every server
group they have. So read the forms the official clients keep it in — the
TeamSpeak 3 `.ini` export, the `ProtobufItems` items both clients write, and
the older `Identities/<n>/…` rows — and store them through voelin-store,
skipping unique ids the store already has instead of adding a second copy.
Export back to the `.ini` form in the same module: an importer without an
exporter traps people here, which is the thing being fixed.
The clients' databases hold private keys and may be open in a running client,
so they are opened read-only and `immutable`: no lock, no shared-memory file,
no write-ahead log replay, nothing of the user's changed to read it. The cost
is that an identity written but not yet checkpointed is not seen, which is the
right way round.
Three field numbers do not earn a protobuf dependency; the wire reader is
twenty lines and skips what it does not understand. An item is taken as an
identity only when its declared type says so, never because a field number
happens to match.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The chat view showed what `Event::Chat` reported: no ids, so nothing
could be pinned, reacted to or grouped into topics, and avatars were
always initials. Drive it from `Event::ChatHistory` instead, which
upserts messages by their local id, and keep the old path only for
sessions the engine stores no history for (it does not know the server
yet). Each tab now holds its messages and rebuilds its lines with
`vm::list::sync`, so a reaction changes one row.
Around that: the image cache decodes avatars and icons from the engine's
cache (`AvatarReady`, `IconReady`), members are grouped by server group
with badges and talk power, the member card carries contacts and
per-client volume, and file links in a message become cards that can be
downloaded. The composer's attach uses xdg-desktop-portal's file
chooser, which `voelin-platform` already had ashpd for.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The studio needs a description of what it composites that survives a
restart, so the UI's scenes and sources are one serde value (the
`studio.scenes` setting) with a default for every field: adding a field
later keeps older settings files loading.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
H.264, HEVC, AV1, VP9 and VP8 on VA-API, NVENC, Quick Sync, AMF, Media
Foundation, VideoToolbox and the software encoders the system FFmpeg
has, found at runtime without a version allow-list and self-tested per
backend. Viewers get the codec they answered, with one encoder per codec
only while someone needs it, and H.264's level follows the stream.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Manual and smoke testing of the engine's voice features needs a driver:
`voelinctl engine <address> <action>` runs one engine voice session and
does files (ls, upload with an optional chat link, download, rm, mkdir,
mv), avatar (set, clear, wait for someone's and check its MD5), poke,
dm, offline (send, read with --expect and --delete), contacts (set, rm,
ls in --db) or listen (pokes, chat, file links, which it can download).
It prints one line per event and fails on errors or when time is up.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Offers list the stream codec first, then the codecs of hardware encoders,
VP8 through libvpx and HEVC last; software encoders other than VP8 are
only ever the stream codec, so no answer starts an expensive one. The
streamer's peer reports the codec each answer chose, the session sends
video only to viewers of its codec and tells the encoders through
LayerFeedback which codecs are needed. Each layer's encoder thread keeps
one encoder per such codec, made when a viewer needs it and dropped when
none does; the stream codec is skipped while nobody takes it.
The H.264 profile-level-id is computed from macroblocks per second, frame
size and bitrate (Table A-1), at least 3.1 as before. Streamer takes an
encoder preference (hardware on/off, auto / software / a named backend)
that reconfigure can change live. HEVC is negotiable (str0m packetizes
it) and only offered when a hardware encoder has it.
Work in progress: committed early so it cannot be lost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The new UI needs a channel file browser, avatars and icons, pokes,
direct messages to anyone, the offline message inbox and a friends list.
The voice connection can do all of it; the engine did not offer it.
Files (module files): ListFiles, DownloadFile (to disk as <path>.part,
renamed when complete, resumable, or into memory), DownloadChatFile for
a FileRef from a chat message, UploadFile, CancelTransfer, DeleteFiles,
RenameFile, CreateDirectory. Transfers stream in 64 KiB pieces and
report Requested/Started/Progress (files.progress_interval_ms)/Done/
Failed/Cancelled; requests and transfers carry an id the caller picks.
Avatars and icons are fetched by themselves (cache.fetch_images) into a
content-addressed disk cache (module cache: avatars by MD5, icons by id,
LRU bounded by cache.max_mb, 0 = no limit, use times kept as file times,
concurrent downloads of one file deduplicated across sessions) and
reported as AvatarReady / IconReady. SetAvatar uploads ours and
announces its hash, or removes it.
Pokes are a command and a distinct event (they were stored as private
messages before). A failing voice command (e.g. a private message to a
client who left) is now an error event instead of ending the connection.
Offline messages (module offline) list, read, send, delete and mark.
Contacts (module contacts) are engine-wide and stored in the client
database: SetContact / RemoveContact, ContactsChanged, FriendPresence
across all sessions, last seen time and server, per-person volume and
mute applied in every session, blocked authors flagged in chat and
their pokes and private messages hidden or flagged (privacy.block_mode),
and stream.permissions = friends lets friends watch without asking.
ServerDetails and Groups events report the server's details and groups
when they change. The book mapping moved to its own module.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Stream audio is mixed from any number of sources (desktop, chosen apps,
the shared window's app, the processed microphone), each with gain,
mute and meters, changeable while live. Desktop audio now leaves out
Voelin's own playback on Linux, Windows and Android.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Screen-share audio took the default sink's monitor on Linux, so viewers
heard the TeamSpeak voices we play, and there was no way to share one
application's sound only.
capture::playback::start_playback(filter, source) now captures what
applications play into a mixer source, with PlaybackFilter::AllButSelf
(everything except our process and its descendants) or App(Pid | Name),
and audio_apps() lists the applications that play, updated live:
- Linux: a LinkManager (capture/pipewire_links.rs) watches the PipeWire
registry for Stream/Output/Audio nodes and their clients, and links the
output ports of every selected stream through the link-factory into a
capture stream of ours that the session manager leaves unlinked
(node.autoconnect = false). PipeWire sums the links, so one capture
stream carries any number of applications; links follow streams as
they come and go, and a restarted application is matched by name
again. Our own streams are recognised by process id (node, client, or
socket credentials; /proc parent chain); loopback and filter outputs
(node.link-group) are skipped because their sources are captured
directly. This depends on no session-manager policy, adds no sink,
and leaves the user's routing and volumes alone.
- Windows: WASAPI process loopback per capture, exclude mode on our
process tree for everything, include mode on the chosen process tree
(for a name, one capture per matching audio session's process,
matched again every two seconds); sessions of all playback devices
for the list; the owner of an HWND for window audio. Only
type-checked (x86_64-pc-windows-gnu).
- Platform providers (Android) get start_input / stop_input / apps.
- X11: window_pid() reads _NET_WM_PID, so a shared window's audio can be
selected automatically.
tests/pipewire_apps.rs runs a private PipeWire, WirePlumber and D-Bus
(skipped without them) with two tone players in other processes and one
in ours, and checks by frequency that desktop audio has both players and
not us, that name and pid captures have only their application, that a
new player is linked live, a quit one dropped, and a restarted one
matched again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Theme tokens from the mockups, Inter, Lucide icons and Twemoji (with
their notices and About credits), a component library, desktop and
phone shells, today's screens re-skinned, view models and bindings
split out of app.rs, an image cache and live ui.* settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
The single 1700-line app.slint becomes a design system and screens that
later waves can compose:
- theme.slint: colour, radius, spacing and type tokens (dark and light,
a runtime font scale); icons.slint: Lucide icons as tintable images.
- components/: Button, IconButton, TextField, SearchBox, Select, Toggle,
Slider, SegmentedTabs, Avatar, badges, Card, Meter, NavItem, ListItem,
PopupMenu, Tooltip, Modal, Toast, ResizeHandle, Spinner, RichText and
the EmojiPicker.
- shells/: the desktop frame (server rail, top bar, sidebar with the user
card) and the phone frame with a bottom navigation, switched at a
breakpoint from the settings.
- screens/: today's screens re-skinned (channels, chat, streams panel and
viewer, settings page, home, dialogs, phone pages); all callbacks and
properties keep their behaviour. Navigation state is the Nav global.
On the Rust side app.rs keeps setup and event glue; servers.rs, chat.rs,
settings_page.rs and appearance.rs hold the logic, vm/ the pure view
models, bind/ the callbacks, dev.rs the development switches. Models are
created once and updated row by row (vm::list::sync); each chat tab owns
its lines model, so a message appends one row. Emoji come from the
bundled Twemoji archive through a size-bounded image cache, split into
runs that wrap with the text. New settings ui.theme, ui.font_scale,
ui.narrow_breakpoint and ui.image_cache_mb apply live.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
Capture, conversion and encoding on their own threads with latest-wins
handoffs and frame pools, one encoder per simulcast layer, portal
DMA-BUF, a wlroots capture backend, tuned libvpx, per-stage statistics,
Streamer::reconfigure and voelinctl stream bench. Conflicts: the root
manifest (dimpl patch next to the release profile) and voelinctl's
command list (probe-stream next to the stream tools).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G