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

View file

@ -0,0 +1,81 @@
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CAST_STREAMING_CAPTURE_CONFIGS_H_
#define CAST_STREAMING_CAPTURE_CONFIGS_H_
#include <string>
#include <vector>
#include "cast/streaming/public/constants.h"
#include "cast/streaming/resolution.h"
#include "util/simple_fraction.h"
namespace openscreen::cast {
// A configuration set that can be used by the sender to capture audio, and the
// receiver to playback audio. Used by Cast Streaming to provide an offer to the
// receiver.
struct AudioCaptureConfig {
// Audio codec represented by this configuration.
AudioCodec codec = AudioCodec::kOpus;
// Number of channels used by this configuration.
int channels = kDefaultAudioChannels;
// Average bit rate in bits per second used by this configuration. A value
// of "zero" suggests that the bitrate should be automatically selected by
// the sender.
int bit_rate = 0;
// Sample rate for audio RTP timebase.
int sample_rate = kDefaultAudioSampleRate;
// Target playout delay in milliseconds.
std::chrono::milliseconds target_playout_delay = kDefaultTargetPlayoutDelay;
// The codec parameter for this configuration. Honors the format laid out
// in RFC 6381: https://datatracker.ietf.org/doc/html/rfc6381
// NOTE: the "profiles" parameter is not supported in our implementation.
std::string codec_parameter;
};
// A configuration set that can be used by the sender to capture video, as
// well as the receiver to playback video. Used by Cast Streaming to provide an
// offer to the receiver.
struct VideoCaptureConfig {
// Video codec represented by this configuration.
VideoCodec codec = VideoCodec::kVp8;
// Maximum frame rate in frames per second.
// For simple cases, the frame rate may be provided by simply setting the
// number to the desired value, e.g. 30 or 60FPS. Some common frame rates like
// 23.98 FPS (for NTSC compatibility) are represented as fractions, in this
// case 24000/1001.
SimpleFraction max_frame_rate{kDefaultFrameRate, 1};
// Number specifying the maximum bit rate for this stream. A value of
// zero means that the maximum bit rate should be automatically selected by
// the sender.
int max_bit_rate = 0;
// Resolutions to be offered to the receiver. At least one resolution
// must be provided.
std::vector<Resolution> resolutions;
// Target playout delay in milliseconds.
std::chrono::milliseconds target_playout_delay = kDefaultTargetPlayoutDelay;
// The codec parameter for this configuration. Honors the format laid out
// in RFC 6381: https://datatracker.ietf.org/doc/html/rfc6381.
// VP8 and VP9 codec parameter versions are defined here:
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#webm
// https://www.webmproject.org/vp9/mp4/#codecs-parameter-string
// NOTE: the "profiles" parameter is not supported in our implementation.
std::string codec_parameter;
};
} // namespace openscreen::cast
#endif // CAST_STREAMING_CAPTURE_CONFIGS_H_