Skip to content

Commit 72a327a

Browse files
committed
Merge remote-tracking branch 'origin/staging' into fix/scene-audio-null-canvas-test
2 parents e286c73 + 9e85fcc commit 72a327a

60 files changed

Lines changed: 1857 additions & 167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/clang-format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
clang-format-check:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4
@@ -19,7 +19,8 @@ jobs:
1919

2020
- name: Install clang format
2121
run: |
22-
sudo apt-get install -y clang-format-13
22+
sudo apt-get update
23+
sudo apt-get install -y clang-format-18
2324
2425
- name: 'Run clang-format'
2526
run: |

.github/workflows/main.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
SLGenerator: Visual Studio 17 2022
2626
SLDistributeDirectory: distribute
2727
SLFullDistributePath: "streamlabs-build.app/distribute" # The .app extension is required to run macOS tests correctly.
28-
LibOBSVersion: 31.1.2sl20
28+
LibOBSVersion: 32.1.1sl2
2929
PACKAGE_NAME: osn
3030

3131
jobs:
@@ -303,11 +303,6 @@ jobs:
303303
run: node ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}"
304304
env:
305305
PACKAGE_PATH: "${{env.SLFullDistributePath}}/${{env.InstallPath}}"
306-
- name: 'Copy necessary dll files'
307-
run: ./ci/copy-files.cmd
308-
- name: 'Prepare tag artifact'
309-
if: startsWith(github.ref, 'refs/tags/')
310-
run: ./ci/prepare-artifact.cmd
311306
- name: Upload compiled artifacts
312307
uses: actions/upload-artifact@v4
313308
with:
@@ -426,6 +421,8 @@ jobs:
426421
with:
427422
fetch-depth: 2
428423
repository: stream-labs/symsrv-scripts
424+
# Pinned so a push to symsrv-scripts cannot change this build without a PR here
425+
ref: v1.1.1
429426
path: symsrv-scripts
430427
- name: Download build artifacts
431428
uses: actions/download-artifact@v4

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ docs/
2727
streamlabs-build.app
2828

2929
tests/osn-tests/*-cache-local.zip
30+
31+
profile-long-calls/dist/
32+
!profile-long-calls/.vscode
33+
profile-long-calls/long_calls.db*

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ cmake --build . --target install --config RelWithDebInfo
3333

3434
This will will download any required dependencies, build the module, and then place it in an archive compatible with npm or yarn that you may specify in a given package.json.
3535

36+
If you are testing a local libobs development package that was built before it bundled its public development dependencies, pass those dependency package prefixes with `OSN_LIBOBS_DEPENDENCY_PREFIX_PATH`. For example:
37+
38+
```
39+
cmake .. -G"Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH=%CD%/libobs-src/cmake/ -DOSN_LIBOBS_DEPENDENCY_PREFIX_PATH=D:/path/to/obs/.deps/obs-deps-2025-08-23sl2-x64
40+
```
41+
3642
### Mac
3743
Building on Mac requires Xcode.
3844

@@ -172,4 +178,4 @@ If you wish to debug a specific test change the wildcard character to the name o
172178
}
173179
]
174180
}
175-
```
181+
```

ci/check-format.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ elif [[ ${OS} = "Darwin" ]] ; then
2626
fi
2727

2828
# Discover clang-format
29-
if type clang-format-13 2> /dev/null ; then
30-
CLANG_FORMAT=clang-format-13
31-
elif type clang-format 2> /dev/null ; then
29+
if command -v clang-format-18 > /dev/null 2>&1 ; then
30+
CLANG_FORMAT=clang-format-18
31+
elif command -v clang-format > /dev/null 2>&1 ; then
3232
# Clang format found, but need to check version
3333
CLANG_FORMAT=clang-format
3434
V=$(clang-format --version)
35-
if [[ $V != *"version 13.0"* ]]; then
36-
echo "clang-format is not 13.0 (returned ${V})"
35+
if [[ $V != *"version 18"* ]]; then
36+
echo "clang-format is not 18 (returned ${V})"
3737
exit 1
3838
fi
3939
else
40-
echo "No appropriate clang-format found (expected clang-format-13.0.0, or clang-format)"
40+
echo "No appropriate clang-format found (expected clang-format-18, or clang-format)"
4141
exit 1
4242
fi
4343

ci/copy-files.cmd

Lines changed: 0 additions & 3 deletions
This file was deleted.

ci/prepare-artifact.cmd

Lines changed: 0 additions & 4 deletions
This file was deleted.

ci/run-unit-tests.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ const buildDirectory =
1010
process.env.BUILD_DIRECTORY ||
1111
"build";
1212
const buildConfig = process.env.BUILD_CONFIG || process.env.BuildConfig || "RelWithDebInfo";
13-
const target = "obs_studio_client_unit_tests";
14-
// Match the TEST_PREFIX passed to catch_discover_tests so ctest only runs this unit-test suite.
15-
const testPattern = `^${target}::`;
1613

17-
function hasDiscoveredTests() {
18-
const testsDirectory = path.join(buildDirectory, "obs-studio-client");
14+
const testSuites = [
15+
{ target: "obs_studio_client_unit_tests", sourceDir: "obs-studio-client" },
16+
{ target: "obs_studio_server_unit_tests", sourceDir: "obs-studio-server" },
17+
];
18+
19+
function hasDiscoveredTests(target, sourceDir) {
20+
const testsDirectory = path.join(buildDirectory, sourceDir);
1921

2022
try {
2123
return fs
@@ -39,16 +41,18 @@ function run(command, args) {
3941
}
4042
}
4143

42-
const skipBuild =
43-
process.env.OSN_SKIP_UNIT_TEST_BUILD === "1" ||
44-
// Test jobs run from uploaded build artifacts. Building again can force CMake
45-
// to reconfigure FetchContent checkouts whose hidden .git directories were not uploaded.
46-
(process.env.GITHUB_ACTIONS === "true" && hasDiscoveredTests());
44+
for (const { target, sourceDir } of testSuites) {
45+
const testPattern = `^${target}::`;
4746

48-
if (skipBuild) {
49-
console.log("Skipping unit-test build; discovered CTest tests are already present.");
50-
} else {
51-
run("cmake", ["--build", buildDirectory, "--config", buildConfig, "--target", target]);
52-
}
47+
const skipBuild =
48+
process.env.OSN_SKIP_UNIT_TEST_BUILD === "1" ||
49+
(process.env.GITHUB_ACTIONS === "true" && hasDiscoveredTests(target, sourceDir));
5350

54-
run("ctest", ["--test-dir", buildDirectory, "-C", buildConfig, "--output-on-failure", "-R", testPattern]);
51+
if (skipBuild) {
52+
console.log(`Skipping build for ${target}; discovered CTest tests are already present.`);
53+
} else {
54+
run("cmake", ["--build", buildDirectory, "--config", buildConfig, "--target", target]);
55+
}
56+
57+
run("ctest", ["--test-dir", buildDirectory, "-C", buildConfig, "--output-on-failure", "-R", testPattern]);
58+
}

js/module.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,13 @@ export interface IModule {
697697
readonly binaryPath: string;
698698
readonly dataPath: string;
699699
}
700+
export declare const NDI_RUNTIME_VERSION_MISMATCH = "NDI_RUNTIME_VERSION_MISMATCH";
701+
export declare const NDI_RUNTIME_NOT_FOUND = "NDI_RUNTIME_NOT_FOUND";
702+
export interface IObsModuleLoadFailure {
703+
module: string;
704+
code: string;
705+
message: string;
706+
}
700707
export declare function addItems(scene: IScene, sceneItems: ISceneItemInfo[]): ISceneItem[];
701708
export interface FilterInfo {
702709
name: string;
@@ -801,6 +808,14 @@ export interface IStreaming {
801808
kbitsPerSec: number;
802809
dataOutput: number;
803810
}
811+
export interface IEnhancedBroadcastingDisplayStats {
812+
kbitsPerSec: number;
813+
dataOutput: number;
814+
}
815+
export interface IEnhancedBroadcastingPerDisplayStats {
816+
horizontal: IEnhancedBroadcastingDisplayStats;
817+
vertical: IEnhancedBroadcastingDisplayStats;
818+
}
804819
export interface EOutputSignal {
805820
type: string;
806821
signal: string;
@@ -810,6 +825,12 @@ export interface EOutputSignal {
810825
export interface IEncoderOption {
811826
title: string;
812827
name: string;
828+
id: string;
829+
family: string;
830+
preset: string;
831+
codec: string;
832+
streaming: boolean;
833+
recording: boolean;
813834
}
814835
export interface ISimpleStreaming extends IStreaming {
815836
audioEncoder: IAudioEncoder;
@@ -836,6 +857,7 @@ export interface IAdvancedStreamingFactory {
836857
}
837858
export interface IEnhancedBroadcastingAdvancedStreaming extends IAdvancedStreaming {
838859
additionalVideo?: IVideo;
860+
displayStats: IEnhancedBroadcastingPerDisplayStats;
839861
}
840862
export interface IEnhancedBroadcastingAdvancedStreamingFactory {
841863
create(): IEnhancedBroadcastingAdvancedStreaming;
@@ -844,6 +866,7 @@ export interface IEnhancedBroadcastingAdvancedStreamingFactory {
844866
}
845867
export interface IEnhancedBroadcastingSimpleStreaming extends ISimpleStreaming {
846868
additionalVideo?: IVideo;
869+
displayStats: IEnhancedBroadcastingPerDisplayStats;
847870
}
848871
export interface IEnhancedBroadcastingSimpleStreamingFactory {
849872
create(): IEnhancedBroadcastingSimpleStreaming;

js/module.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.NodeObs = exports.AdvancedReplayBufferFactory = exports.SimpleReplayBufferFactory = exports.AudioEncoderFactory = exports.AdvancedRecordingFactory = exports.SimpleRecordingFactory = exports.AudioTrackFactory = exports.NetworkFactory = exports.ReconnectFactory = exports.DelayFactory = exports.EnhancedBroadcastingSimpleStreamingFactory = exports.EnhancedBroadcastingAdvancedStreamingFactory = exports.AdvancedStreamingFactory = exports.SimpleStreamingFactory = exports.ServiceFactory = exports.VideoEncoderFactory = exports.IPC = exports.ModuleFactory = exports.AudioFactory = exports.Audio = exports.FaderFactory = exports.VolmeterFactory = exports.TransitionFactory = exports.FilterFactory = exports.SceneFactory = exports.InputFactory = exports.VideoFactory = exports.Video = exports.Global = exports.DefaultPluginPathMac = exports.DefaultPluginDataPath = exports.DefaultPluginPath = exports.DefaultDataPath = exports.DefaultBinPath = exports.DefaultDrawPluginPath = exports.DefaultOpenGLPath = exports.DefaultD3D11Path = void 0;
3+
exports.NodeObs = exports.NDI_RUNTIME_NOT_FOUND = exports.NDI_RUNTIME_VERSION_MISMATCH = exports.AdvancedReplayBufferFactory = exports.SimpleReplayBufferFactory = exports.AudioEncoderFactory = exports.AdvancedRecordingFactory = exports.SimpleRecordingFactory = exports.AudioTrackFactory = exports.NetworkFactory = exports.ReconnectFactory = exports.DelayFactory = exports.EnhancedBroadcastingSimpleStreamingFactory = exports.EnhancedBroadcastingAdvancedStreamingFactory = exports.AdvancedStreamingFactory = exports.SimpleStreamingFactory = exports.ServiceFactory = exports.VideoEncoderFactory = exports.IPC = exports.ModuleFactory = exports.AudioFactory = exports.Audio = exports.FaderFactory = exports.VolmeterFactory = exports.TransitionFactory = exports.FilterFactory = exports.SceneFactory = exports.InputFactory = exports.VideoFactory = exports.Video = exports.Global = exports.DefaultPluginPathMac = exports.DefaultPluginDataPath = exports.DefaultPluginPath = exports.DefaultDataPath = exports.DefaultBinPath = exports.DefaultDrawPluginPath = exports.DefaultOpenGLPath = exports.DefaultD3D11Path = void 0;
44
exports.addItems = addItems;
55
exports.createSources = createSources;
66
exports.getSourcesSize = getSourcesSize;
@@ -50,6 +50,8 @@ exports.AdvancedReplayBufferFactory = obs.AdvancedReplayBuffer;
5050
;
5151
;
5252
;
53+
exports.NDI_RUNTIME_VERSION_MISMATCH = 'NDI_RUNTIME_VERSION_MISMATCH';
54+
exports.NDI_RUNTIME_NOT_FOUND = 'NDI_RUNTIME_NOT_FOUND';
5355
function addItems(scene, sceneItems) {
5456
const items = [];
5557
if (Array.isArray(sceneItems)) {

0 commit comments

Comments
 (0)