A new source type, "CultMesh Media Stream". Its properties pull every gamecult.media_stream_advertisement Odin holds and offer each stream's video sources, audio sources and codecs from the advertisement, with bitrate and latency budget; activating publishes a gamecult.media_stream_request naming this receiver's endpoint. Nothing in the picker comes from configuration or from Muninn. The core grows the mesh half (catalog.rs): pull the advertisements, publish a request, read the producer's answer, all over cultmesh-rs and tested against an Odin-shaped RUDP catalog server on loopback. The C ABI gains the catalog and request calls, a video relay that copies each whole access unit to a loopback UDP port as a raw byte stream, and the producer's presentation time on every payload. The plugin itself owns only the OBS lifecycle. Video is drawn from a private ffmpeg_source child reading the relay — the arrangement the previous plugin proved in the field, minus the 2,500 lines of transport it hand-rolled underneath. Audio is PCM straight to obs_source_output_audio. Built against a libobs-only build of obs-studio 32.2.2 with obs-deps 2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to the per-user OBS plugins directory. Not yet exercised with a live stream. cargo test -p ratatoskr-core -> 31 passed abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
37 lines
1.6 KiB
CMake
37 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 3.22)
|
|
|
|
# The OBS plugin: an obs_source that owns no transport. Everything below the
|
|
# source callbacks is ratatoskr-core, linked as a static library through the
|
|
# hand-written header in include/. Point CMAKE_PREFIX_PATH at a libobs build
|
|
# tree or SDK prefix that exports libobsConfig.cmake.
|
|
|
|
project(ratatoskr LANGUAGES C)
|
|
|
|
find_package(libobs REQUIRED CONFIG)
|
|
|
|
set(RATATOSKR_CORE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../target/release" CACHE PATH
|
|
"Directory holding ratatoskr_core.lib built with `cargo build --release -p ratatoskr-core`")
|
|
|
|
add_library(ratatoskr MODULE
|
|
src/ratatoskr_source.c)
|
|
|
|
target_include_directories(ratatoskr PRIVATE include)
|
|
target_compile_definitions(ratatoskr PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
|
|
target_link_libraries(ratatoskr PRIVATE
|
|
OBS::libobs
|
|
"${RATATOSKR_CORE_DIR}/ratatoskr_core.lib"
|
|
# what the Rust standard library and cultnet-rs pull in on Windows
|
|
ws2_32 userenv bcrypt ntdll advapi32)
|
|
|
|
set_target_properties(ratatoskr PROPERTIES PREFIX "" OUTPUT_NAME "ratatoskr")
|
|
|
|
# Lay out a plugin directory OBS loads from %APPDATA%/obs-studio/plugins/ratatoskr.
|
|
install(TARGETS ratatoskr RUNTIME DESTINATION bin/64bit LIBRARY DESTINATION bin/64bit)
|
|
install(DIRECTORY data/ DESTINATION data)
|
|
|
|
# Proves the C ABI is callable as the header claims, by loading the cdylib the
|
|
# way a host would. Built here so it uses the same compiler as the plugin.
|
|
add_executable(abi_smoke tests/abi_smoke.c)
|
|
target_include_directories(abi_smoke PRIVATE include)
|
|
include(CTest)
|
|
add_test(NAME abi_smoke COMMAND abi_smoke "${RATATOSKR_CORE_DIR}/ratatoskr_core.dll")
|