Implement Cast Streaming mirroring, DLNA casting, daemon+GUI, and breadd integration
Some checks failed
dev release / build (push) Failing after 12s

Builds out the full v1 scope: a vendored+patched openscreen subset for
low-latency Cast Streaming (Mirroring receiver 0F5096E8) alongside the
existing Cast V2/HLS and new DLNA/AVTransport casting paths, breadcastd's
Idle/Casting state machine with a private IPC socket, the breadcast GTK4
popup as a thin IPC client, and bread.cast.*/bread.command.cast.* breadd
integration (device discovery, start/stop, mirroring lifecycle events).
Also adds bakery/systemd/Forgejo CI packaging.

Validated end-to-end against a real Chromecast/Google TV: negotiated
Cast Streaming session, live pipeline playback, and daemon+GUI click-to-cast/
stop through the actual popup.
This commit is contained in:
Breadway 2026-08-03 09:07:21 +08:00
parent 887c29002f
commit 8c745d18e0
283 changed files with 36788 additions and 0 deletions

37
vendor/rust_cast-0.21.0/PATCHES.md vendored Normal file
View file

@ -0,0 +1,37 @@
# Vendoring notes
This is [rust_cast 0.21.0](https://github.com/azasypkin/rust-cast) (MIT
licensed), vendored via `[patch.crates-io]` in the workspace `Cargo.toml`
purely to add one method upstream doesn't have: a generic point-to-point
send on an arbitrary CASTV2 namespace.
## Why
breadcast's Cast Streaming integration (`breadcast-caststream-sys`, wrapping
a vendored `chromium/openscreen`) needs to exchange OFFER/ANSWER JSON with a
launched receiver app on the `urn:x-cast:com.google.cast.webrtc` namespace --
a point-to-point conversation targeting that app's `transport_id`, the same
target `ConnectionChannel`/`MediaChannel` already use. None of rust_cast's
built-in channels expose that: `ReceiverChannel::broadcast_message()` is the
closest, but it hardcodes destination `"*"`, which is a different
conversation than a namespace-specific exchange with one particular app.
Receiving such messages needs no patch -- `CastDevice::receive()` already
returns them as `ChannelMessage::Raw(CastMessage)` whenever no built-in
channel claims the namespace.
## The patch
`src/lib.rs`: added `CastDevice::send_message<M: Serialize>(&self, namespace,
destination, message)`, built the same way `ReceiverChannel::broadcast_message()`
is internally, but with a caller-supplied `destination` instead of a
hardcoded `"*"`. See the doc comment on that method for the exact rationale
(marked "LOCAL PATCH (breadcast, not upstream)").
## Rolling the pin
To move to a newer rust_cast release: copy the new version from
`~/.cargo/registry/src/*/rust_cast-<version>/`, re-apply the same method
addition (small enough to redo by hand), swap the version in this
directory's own `Cargo.toml`, and update the `path` if the directory name
changes.