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.
35 lines
1.2 KiB
C++
35 lines
1.2 KiB
C++
#include "message_port_bridge.h"
|
|
|
|
namespace breadcast_caststream {
|
|
|
|
MessagePortBridge::MessagePortBridge(void* user_data,
|
|
PostMessageCallback post_message)
|
|
: user_data_(user_data), post_message_(post_message) {}
|
|
|
|
MessagePortBridge::~MessagePortBridge() = default;
|
|
|
|
void MessagePortBridge::DeliverMessage(const std::string& source_id,
|
|
const std::string& message_namespace,
|
|
const std::string& message) {
|
|
if (client_) {
|
|
client_->OnMessage(source_id, message_namespace, message);
|
|
}
|
|
}
|
|
|
|
void MessagePortBridge::SetClient(Client& client) {
|
|
client_ = &client;
|
|
}
|
|
|
|
void MessagePortBridge::ResetClient() {
|
|
client_ = nullptr;
|
|
}
|
|
|
|
void MessagePortBridge::PostMessage(const std::string& destination_id,
|
|
const std::string& message_namespace,
|
|
const std::string& message) {
|
|
post_message_(user_data_, destination_id.data(), destination_id.size(),
|
|
message_namespace.data(), message_namespace.size(),
|
|
message.data(), message.size());
|
|
}
|
|
|
|
} // namespace breadcast_caststream
|