Stage the plugin into the directory layout OBS actually searches
The staged package put the module in build/package/bin. OBS does not look
there. From AddExtraModulePaths() in obs-studio's UI/window-basic-main.cpp,
the per-user plugin layout on Linux and Windows is:
<config>/obs-studio/plugins/<name>/bin/64bit/<name>.{so,dll}
<config>/obs-studio/plugins/<name>/data/
so build/package/ now uses bin/64bit and is a straight drop-in. Re-verified in
the headless libobs harness from the new path: the module loads, both sources
connect, frames arrive, the camera switch round-trips, and `ldd` on the staged
copy resolves liblivekit and liblivekit_ffi from bin/64bit via $ORIGIN.
macOS deliberately keeps the flat bin/ -- there OBS looks for a
<name>.plugin/Contents/MacOS bundle, which this build does not produce. That
gap is documented in README.md rather than papered over with a directory name
that would only look right.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
@@ -109,15 +109,20 @@ and `-DSTPLUGIN_LIVEKIT_SDK_TRIPLE` override the pin and the release triple.
|
||||
The build stages a runnable layout into `build/package/`:
|
||||
|
||||
```
|
||||
build/package/bin/streamer-tools-camera.so (RPATH=$ORIGIN)
|
||||
build/package/bin/liblivekit.so
|
||||
build/package/bin/liblivekit_ffi.so
|
||||
build/package/bin/64bit/streamer-tools-camera.so (RPATH=$ORIGIN)
|
||||
build/package/bin/64bit/liblivekit.so
|
||||
build/package/bin/64bit/liblivekit_ffi.so
|
||||
build/package/data/locale/en-US.ini
|
||||
build/package/licenses/...
|
||||
```
|
||||
|
||||
`build/package/bin` is what gets installed — the module resolves the LiveKit
|
||||
libraries from `$ORIGIN` / `@loader_path`, not from the build tree.
|
||||
That is exactly the layout OBS searches on Linux and Windows —
|
||||
`<config>/obs-studio/plugins/<name>/bin/64bit` plus a sibling `data/`, per
|
||||
`AddExtraModulePaths()` in obs-studio's `UI/window-basic-main.cpp` — so
|
||||
`build/package/` is a straight drop-in. The module resolves the LiveKit
|
||||
libraries from `$ORIGIN` (verified: `ldd` on the staged copy resolves both
|
||||
to `bin/64bit/`), not from the build tree. macOS is not this shape; see the
|
||||
macOS packaging gap under CI.
|
||||
|
||||
## Testing this by hand
|
||||
|
||||
@@ -131,6 +136,10 @@ cp -r build/package/bin build/package/data \
|
||||
obs
|
||||
```
|
||||
|
||||
(That yields `.../streamer-tools-camera/bin/64bit/streamer-tools-camera.so`
|
||||
and `.../streamer-tools-camera/data/locale/en-US.ini`, which is what OBS
|
||||
looks for.)
|
||||
|
||||
Then: Sources → `+` → "streamer-tools Camera" → fill in the server URL, room
|
||||
slug and read key from the room's settings page → "Refresh camera list" → pick
|
||||
a camera. Check `~/.config/obs-studio/logs/` for
|
||||
|
||||
Reference in New Issue
Block a user