Ship Muninn OBS plugin locale bundle

This commit is contained in:
Meta Vens 2026-06-19 22:35:58 +01:00
commit e2461ee4ac
6 changed files with 81 additions and 14 deletions

View file

@ -0,0 +1,12 @@
MimirAudioStem="Mimir Audio Stem"
MimirAudioStem.MapName="Shared memory map"
MimirAudioStem.StemId="Stem id"
MimirProgramTexture="Mimir Program Texture"
MuninnStream="Muninn Stream"
MuninnStream.Stream="Muninn stream"
MuninnStream.Video="Muninn video"
MuninnStream.Audio="Muninn audio"
MuninnStream.VideoBitrateKbps="Video bitrate (kbps)"
MuninnStream.VideoLatencyMs="Video/transport latency (ms)"
MuninnStream.AudioReorderMs="Audio reorder latency (ms)"
MuninnStream.Refresh="Refresh Muninn streams"

View file

@ -3439,7 +3439,7 @@ static bool muninn_refresh_streams(obs_properties_t *props, obs_property_t *, vo
static const char *muninn_get_name(void *)
{
return "Muninn Stream";
return obs_module_text("MuninnStream");
}
static void audio_worker_loop(MuninnSource *ctx)
@ -3615,7 +3615,8 @@ static obs_properties_t *muninn_properties(void *data)
const auto store_path = ctx ? ctx->store_path : std::string(MuninnStorePath);
obs_properties_t *props = obs_properties_create();
obs_property_t *streams = obs_properties_add_list(props, "stream_id", "Muninn stream", OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
obs_property_t *streams =
obs_properties_add_list(props, "stream_id", obs_module_text("MuninnStream.Stream"), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
if (ctx) {
refresh_catalog(ctx);
populate_stream_list_from_options(streams, ctx->catalog_options);
@ -3623,9 +3624,9 @@ static obs_properties_t *muninn_properties(void *data)
populate_stream_list(streams, store_path);
}
obs_property_t *video_sources =
obs_properties_add_list(props, "video_source_id", "Muninn video", OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
obs_properties_add_list(props, "video_source_id", obs_module_text("MuninnStream.Video"), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
obs_property_t *audio_sources =
obs_properties_add_list(props, "audio_source_id", "Muninn audio", OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
obs_properties_add_list(props, "audio_source_id", obs_module_text("MuninnStream.Audio"), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_STRING);
if (ctx) {
populate_source_list(video_sources, catalog_video_sources(ctx));
populate_source_list(audio_sources, catalog_audio_sources(ctx));
@ -3633,10 +3634,28 @@ static obs_properties_t *muninn_properties(void *data)
populate_source_list(video_sources, {{"display:0", "Display 1"}});
populate_source_list(audio_sources, {{"wasapi-loopback:Realtek", "Realtek loopback"}});
}
obs_properties_add_int(props, "rudp_video_bitrate_kbps", "Video bitrate (kbps)", 1000, MuninnMaxRudpVideoBitrateKbps, 500);
obs_properties_add_int(props, "rudp_latency_budget_ms", "Video/transport latency (ms)", 100, MuninnMaxRudpLatencyBudgetMs, 50);
obs_properties_add_int(props, "rudp_audio_reorder_ms", "Audio reorder latency (ms)", 0, MuninnMaxRudpAudioReorderMs, 25);
obs_properties_add_button(props, "refresh_streams", "Refresh Muninn streams", muninn_refresh_streams);
obs_properties_add_int(
props,
"rudp_video_bitrate_kbps",
obs_module_text("MuninnStream.VideoBitrateKbps"),
1000,
MuninnMaxRudpVideoBitrateKbps,
500);
obs_properties_add_int(
props,
"rudp_latency_budget_ms",
obs_module_text("MuninnStream.VideoLatencyMs"),
100,
MuninnMaxRudpLatencyBudgetMs,
50);
obs_properties_add_int(
props,
"rudp_audio_reorder_ms",
obs_module_text("MuninnStream.AudioReorderMs"),
0,
MuninnMaxRudpAudioReorderMs,
25);
obs_properties_add_button(props, "refresh_streams", obs_module_text("MuninnStream.Refresh"), muninn_refresh_streams);
return props;
}

View file

@ -533,7 +533,7 @@ static bool copy_source_to_bridge(MimirProgramTextureSource *ctx)
static const char *mimir_program_texture_get_name(void *)
{
return "Mimir Program Texture";
return obs_module_text("MimirProgramTexture");
}
static void mimir_program_texture_update(void *data, obs_data_t *settings)

View file

@ -146,7 +146,7 @@ static void worker_loop(MimirStemSource *ctx)
static const char *mimir_stem_get_name(void *)
{
return "Mimir Audio Stem";
return obs_module_text("MimirAudioStem");
}
static void mimir_stem_update(void *data, obs_data_t *settings)
@ -189,8 +189,8 @@ static void mimir_stem_defaults(obs_data_t *settings)
static obs_properties_t *mimir_stem_properties(void *)
{
obs_properties_t *props = obs_properties_create();
obs_properties_add_text(props, "map_name", "Shared memory map", OBS_TEXT_DEFAULT);
obs_properties_add_text(props, "stem_id", "Stem id", OBS_TEXT_DEFAULT);
obs_properties_add_text(props, "map_name", obs_module_text("MimirAudioStem.MapName"), OBS_TEXT_DEFAULT);
obs_properties_add_text(props, "stem_id", obs_module_text("MimirAudioStem.StemId"), OBS_TEXT_DEFAULT);
return props;
}

View file

@ -11,9 +11,11 @@ $ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
$pluginDll = Join-Path $repoRoot "native\obs_stem_source\build\$Configuration\mimir_obs_stem_source.dll"
$localeSourceDir = Join-Path $repoRoot "native\obs_stem_source\data\locale"
if (-not [string]::IsNullOrWhiteSpace($ObsRoot)) {
$targetDir = Join-Path $ObsRoot "obs-plugins\64bit"
$targetLocaleDir = Join-Path $ObsRoot "data\obs-plugins\mimir_obs_stem_source\locale"
} else {
if ([string]::IsNullOrWhiteSpace($PluginRoot)) {
if ($env:OBS_PLUGIN_ROOT) {
@ -24,6 +26,7 @@ if (-not [string]::IsNullOrWhiteSpace($ObsRoot)) {
}
$targetDir = Join-Path $PluginRoot "mimir_obs_stem_source\bin\64bit"
$targetLocaleDir = Join-Path $PluginRoot "mimir_obs_stem_source\data\locale"
}
$targetDll = Join-Path $targetDir "mimir_obs_stem_source.dll"
@ -35,6 +38,9 @@ if (-not $SkipBuild) {
if (-not (Test-Path $pluginDll)) {
throw "Built plugin DLL was not found at '$pluginDll'."
}
if (-not (Test-Path $localeSourceDir)) {
throw "Plugin locale directory was not found at '$localeSourceDir'."
}
if (-not (Test-Path $targetDir)) {
if ($WhatIf) {
@ -43,12 +49,23 @@ if (-not (Test-Path $targetDir)) {
New-Item -ItemType Directory -Force $targetDir | Out-Null
}
}
if (-not (Test-Path $targetLocaleDir)) {
if ($WhatIf) {
Write-Host "Would create $targetLocaleDir"
} else {
New-Item -ItemType Directory -Force $targetLocaleDir | Out-Null
}
}
if ($WhatIf) {
Write-Host "Would copy $pluginDll -> $targetDll"
Get-ChildItem -LiteralPath $localeSourceDir -File | ForEach-Object {
Write-Host "Would copy $($_.FullName) -> $(Join-Path $targetLocaleDir $_.Name)"
}
return
}
Copy-Item -LiteralPath $pluginDll -Destination $targetDll -Force
Copy-Item -Path (Join-Path $localeSourceDir "*") -Destination $targetLocaleDir -Force
Write-Host "Installed Mimir OBS plugin: $targetDll"
Write-Host "OBS source types: Mimir Program Texture, Mimir Audio Stem, Muninn Stream"

View file

@ -9,12 +9,31 @@ param(
$ErrorActionPreference = "Stop"
function Stop-Obs {
$processes = Get-Process obs64 -ErrorAction SilentlyContinue
$processes = Get-Process obs64,obs-browser-page,obs-ffmpeg-mux -ErrorAction SilentlyContinue
if (-not $processes) {
return
}
& "$env:SystemRoot\System32\taskkill.exe" /IM obs64.exe /T /F | Write-Host
& "$env:SystemRoot\System32\taskkill.exe" /IM obs64.exe /IM obs-browser-page.exe /IM obs-ffmpeg-mux.exe /T /F | Write-Host
$deadline = (Get-Date).AddSeconds(15)
do {
Start-Sleep -Milliseconds 500
$remaining = Get-Process obs64,obs-browser-page,obs-ffmpeg-mux -ErrorAction SilentlyContinue
if (-not $remaining) {
return
}
} while ((Get-Date) -lt $deadline)
$remaining | ForEach-Object {
try {
Stop-Process -Id $_.Id -Force -ErrorAction Stop
} catch {
Write-Host "Failed to stop lingering $($_.ProcessName) PID $($_.Id): $($_.Exception.Message)"
}
}
Start-Sleep -Seconds 1
}
function Remove-ObsCrashSentinel {