diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce7ad4d08..40e8db808 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ env: SLGenerator: Visual Studio 17 2022 SLDistributeDirectory: distribute SLFullDistributePath: "streamlabs-build.app/distribute" # The .app extension is required to run macOS tests correctly. - LibOBSVersion: 28.2.66 + LibOBSVersion: 28.2.67 PACKAGE_NAME: osn jobs: @@ -193,7 +193,7 @@ jobs: shell: powershell - name: Install specific version of AWS CLI run: | - $version = "2.12.1" + $version = "2.12.5" $zipfile = "AWSCLIV2.zip" Invoke-WebRequest -OutFile $zipfile "https://awscli.amazonaws.com/AWSCLIV2-$version.msi" Start-Process msiexec.exe -Wait -ArgumentList "/i $zipfile /qn" diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index ed1e1e9d5..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,331 +0,0 @@ -trigger: none - -variables: - RuntimeURL: https://artifacts.electronjs.org/headers/dist - RuntimeName: iojs - ElectronVersion: 22.3.3 - SLBuildDirectory: streamlabs-build - SLGenerator: Visual Studio 16 2019 - SLDistributeDirectory: distribute - SLFullDistributePath: $(SLBuildDirectory)\$(SLDistributeDirectory) - LibOBSVersion: 28.2.60 - -jobs: -- job: 'WindowsRelease' - pool: 'Default' - workspace: - clean: all - variables: - ReleaseName: release - steps: - - powershell: | - Write-Host "##vso[task.setvariable variable=tagartifact]osn-$((git.exe describe --tags --abbrev=0) | Out-String)" - 'yarn install' - displayName: 'Install dependencies' - - - script: 'yarn add electron@%ElectronVersion% -D' - displayName: 'Install Electron' - - - script: 'git submodule update --init --recursive' - displayName: 'Update submodules' - - - script: ./ci/configure-osn.cmd - displayName: 'Configure obs-studio-node' - - - script: 'node ci/bump-version.js' - displayName: 'Bump version number' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: ./ci/build-osn.cmd - displayName: 'Build obs-studio-node' - - - script: 'yarn run test' - env: - SLOBS_BE_STREAMKEY: $(testsStreamKey) - SLOBS_TEST_USER_POOL_TOKEN: $(userPoolToken) - OSN_ACCESS_KEY_ID: $(awsAccessKeyId) - OSN_SECRET_ACCESS_KEY: $(awsSecretAccessKey) - RELEASE_NAME: $(ReleaseName) - continueOnError: true - displayName: 'Run tests' - - - script: 'git clone https://github.com/stream-labs/symsrv-scripts.git' - displayName: 'Fetch symsrv-scripts' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: ./symsrv-scripts/main.bat "%CD%/symsrv-scripts" ".\main.ps1 -pdbPaths '%CD%\$(SLBuildDirectory)\lib-streamlabs-ipc,%CD%\$(SLBuildDirectory)\obs-studio-client,%CD%\$(SLBuildDirectory)\obs-studio-server' -localSourceDir '%CD%' -repo_userId 'stream-labs' -repo_name 'obs-studio-node' -repo_branch '$(Build.SourceVersion)' -subModules 'lib-streamlabs-ipc,stream-labs,lib-streamlabs-ipc,streamlabs'" - displayName: 'Run symbol server scripts' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - env: - AWS_SYMB_ACCESS_KEY_ID: $(AWS_SYMB_ACCESS_KEY_ID) - AWS_SYMB_SECRET_ACCESS_KEY: $(AWS_SYMB_SECRET_ACCESS_KEY) - - - script: ./ci/copy-files.cmd - displayName: 'Copy necessary dll files' - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLFullDistributePath)\obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: '$(SLFullDistributePath)\$(tagartifact)-release-win64.tar.gz' - displayName: 'Generate build artifact' - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(SLFullDistributePath)\$(tagartifact)-release-win64.tar.gz - artifactName: $(tagartifact)-release-win64.tar.gz - displayName: 'Publish build artifact' - - - script: ./ci/prepare-artifact.cmd - displayName: 'Prepare tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLFullDistributePath)\obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: '$(tagartifact)-release-win64.tar.gz' - displayName: 'Generate tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.SourcesDirectory)\$(tagartifact)-release-win64.tar.gz - artifactName: '$(tagartifact)-release-win64.tar.gz' - displayName: 'Publish tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - powershell: | - mkdir syms - mkdir syms\ascii - mkdir syms\ascii\client - .\ci\run-sentry-cli-azure.ps1 - env: - RootDirectory: $(Build.SourcesDirectory) - PDBPath: $(Build.SourcesDirectory)\$(SLFullDistributePath) - errorActionPreference: silentlyContinue - ignoreLASTEXITCODE: true - displayName: 'Prepare pdbs to Sentry' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: 'sentry-cli.exe upload-dif --log-level DEBUG --org streamlabs-desktop --project obs-server %BUILD_SOURCESDIRECTORY%\syms\ascii' - env: - SENTRY_AUTH_TOKEN: $(sentryAuth) - displayName: 'Upload obs-server pdbs' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: '.\sentry-cli.exe upload-dif --log-level DEBUG --org streamlabs-desktop --project obs-server-preview %BUILD_SOURCESDIRECTORY%\syms\ascii' - env: - SENTRY_AUTH_TOKEN: $(sentryAuth) - displayName: 'Upload obs-server-preview pdbs' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: '.\sentry-cli.exe upload-dif --log-level DEBUG --org streamlabs-desktop --project obs-client %BUILD_SOURCESDIRECTORY%\syms\ascii' - env: - SENTRY_AUTH_TOKEN: $(sentryAuth) - displayName: 'Upload obs-client pdbs' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: S3Upload@1 - inputs: - awsCredentials: 'Streamlabs AWS' - regionName: 'us-west-2' - bucketName: 'obsstudionodes3.streamlabs.com' - globExpressions: '$(tagartifact)-release-win64.tar.gz' - filesAcl: 'public-read' - displayName: 'Upload tag artifact to S3' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - -- job: 'WindowsDebug' - pool: 'Default' - workspace: - clean: all - variables: - ReleaseName: debug - steps: - - powershell: | - Write-Host "##vso[task.setvariable variable=tagartifact]osn-$((git.exe describe --tags --abbrev=0) | Out-String)" - 'yarn install' - displayName: 'Install dependencies' - - - script: 'yarn add electron@%ElectronVersion% -D' - displayName: 'Install Electron' - - - script: 'git submodule update --init --recursive' - displayName: 'Update submodules' - - - script: ./ci/configure-osn.cmd - displayName: 'Configure obs-studio-node' - - - script: 'node ci/bump-version.js' - displayName: 'Bump version number' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: ./ci/build-osn.cmd - displayName: 'Build obs-studio-node' - - - script: 'yarn run test' - env: - SLOBS_BE_STREAMKEY: $(testsStreamKey) - SLOBS_TEST_USER_POOL_TOKEN: $(userPoolToken) - OSN_ACCESS_KEY_ID: $(awsAccessKeyId) - OSN_SECRET_ACCESS_KEY: $(awsSecretAccessKey) - RELEASE_NAME: $(ReleaseName) - continueOnError: true - displayName: 'Run tests' - - - script: ./ci/copy-files.cmd - displayName: 'Copy necessary dll files' - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLFullDistributePath)\obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: '$(SLFullDistributePath)\$(tagartifact)-debug-win64.tar.gz' - displayName: 'Generate build artifact' - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(SLFullDistributePath)\$(tagartifact)-debug-win64.tar.gz - artifactName: $(tagartifact)-debug-win64.tar.gz - displayName: 'Publish build artifact' - - - script: ./ci/prepare-artifact.cmd - displayName: 'Prepare tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLFullDistributePath)\obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: $(tagartifact)-debug-win64.tar.gz - displayName: 'Generate tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.SourcesDirectory)\$(tagartifact)-debug-win64.tar.gz - artifactName: $(tagartifact)-debug-win64.tar.gz - displayName: 'Publish tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: S3Upload@1 - inputs: - awsCredentials: 'Streamlabs AWS' - regionName: 'us-west-2' - bucketName: 'obsstudionodes3.streamlabs.com' - globExpressions: '$(tagartifact)-debug-win64.tar.gz' - filesAcl: 'public-read' - displayName: 'Upload tag artifact to S3' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - -- job: 'MacOSX' - pool: - vmImage: 'macOS-13' - - strategy: - matrix: - Release-x86_64: - BuildConfig: RelWithDebInfo - ReleaseName: release - Architecture: x86_64 - Debug-x86_64: - BuildConfig: Debug - ReleaseName: debug - Architecture: x86_64 - Release-arm64: - BuildConfig: RelWithDebInfo - ReleaseName: release - Architecture: arm64 - Debug-arm64: - BuildConfig: Debug - ReleaseName: debug - Architecture: arm64 - steps: - - powershell: Write-Host "##vso[task.setvariable variable=tagartifact]osn-$((git describe --tags --abbrev=0) | Out-String)" - displayName: 'Get current tag' - - - script: './ci/install-dependencies-osx.sh' - displayName: 'Install dependencies' - - - script: 'git submodule update --init --recursive' - displayName: 'Update submodules' - - - script: './ci/configure-osn-osx.sh' - env: - ARCHITECTURE: $(Architecture) - displayName: 'Configure obs-studio-node' - - - script: 'node ci/bump-version.js' - displayName: 'Bump version number' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - script: ./ci/build-osn-osx.sh - env: - SENTRY_AUTH_TOKEN: $(sentryAuth) - displayName: 'Build obs-studio-node' - - - script: 'yarn run test' - env: - SLOBS_BE_STREAMKEY: $(testsStreamKey) - SLOBS_TEST_USER_POOL_TOKEN: $(userPoolToken) - OSN_ACCESS_KEY_ID: $(awsAccessKeyId) - OSN_SECRET_ACCESS_KEY: $(awsSecretAccessKey) - RELEASE_NAME: $(ReleaseName) - continueOnError: true - displayName: 'Run tests' - - - script: 'python ./ci/sentry-osx.py' - env: - SENTRY_AUTH_TOKEN: $(sentryAuth) - displayName: 'Upload debug files to Sentry' - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLBuildDirectory)/$(SLDistributeDirectory)/obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: '$(SLBuildDirectory)/$(SLDistributeDirectory)/$(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz' - displayName: 'Generate build artifact' - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(SLBuildDirectory)/$(SLDistributeDirectory)/$(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz - artifactName: $(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz - displayName: 'Publish build artifact' - - - task: ArchiveFiles@2 - inputs: - rootFolderOrFile: $(SLBuildDirectory)/$(SLDistributeDirectory)/obs-studio-node - includeRootFolder: true - archiveType: tar - tarCompression: gz - archiveFile: '$(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - displayName: 'Generate tag artifact' - - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: $(Build.SourcesDirectory)/$(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz - artifactName: $(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz - displayName: 'Publish tag artifact' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) - - - task: S3Upload@1 - inputs: - awsCredentials: 'Streamlabs AWS' - regionName: 'us-west-2' - bucketName: 'obsstudionodes3.streamlabs.com' - globExpressions: '$(tagartifact)-$(ReleaseName)-osx-$(Architecture).tar.gz' - filesAcl: 'public-read' - displayName: 'Upload tag artifact to S3' - condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'tags')) diff --git a/obs-studio-server/source/nodeobs_api.cpp b/obs-studio-server/source/nodeobs_api.cpp index 8276fdcb2..0013c13cb 100644 --- a/obs-studio-server/source/nodeobs_api.cpp +++ b/obs-studio-server/source/nodeobs_api.cpp @@ -115,7 +115,8 @@ HMODULE hRtwq; std::string slobs_plugin; std::vector> obsModules; OBS_API::LogReport logReport; -OBS_API::OutputStats streamingOutputStats; +OBS_API::OutputStats streamingOutputStatsMain; +OBS_API::OutputStats streamingOutputStatsSecondary; OBS_API::OutputStats recordingOutputStats; std::mutex logMutex; std::string currentVersion; @@ -996,9 +997,9 @@ void OBS_API::OBS_API_getPerformanceStatistics(void *data, const int64_t id, con rval.push_back(ipc::value(getNumberOfDroppedFrames())); rval.push_back(ipc::value(getDroppedFramesPercentage())); - getCurrentOutputStats(OBS_service::getStreamingOutput(StreamServiceId::Main), streamingOutputStats); - rval.push_back(ipc::value(streamingOutputStats.kbitsPerSec)); - rval.push_back(ipc::value(streamingOutputStats.dataOutput)); + getCurrentOutputStats(OBS_service::getStreamingOutput(StreamServiceId::Main), streamingOutputStatsMain); + rval.push_back(ipc::value(streamingOutputStatsMain.kbitsPerSec)); + rval.push_back(ipc::value(streamingOutputStatsMain.dataOutput)); getCurrentOutputStats(OBS_service::getRecordingOutput(), recordingOutputStats); rval.push_back(ipc::value(recordingOutputStats.kbitsPerSec)); @@ -1009,9 +1010,9 @@ void OBS_API::OBS_API_getPerformanceStatistics(void *data, const int64_t id, con rval.push_back(ipc::value(getMemoryUsage())); rval.push_back(ipc::value(getDiskSpaceAvailable())); - getCurrentOutputStats(OBS_service::getStreamingOutput(StreamServiceId::Second), streamingOutputStats); - rval.push_back(ipc::value(streamingOutputStats.kbitsPerSec)); - rval.push_back(ipc::value(streamingOutputStats.dataOutput)); + getCurrentOutputStats(OBS_service::getStreamingOutput(StreamServiceId::Second), streamingOutputStatsSecondary); + rval.push_back(ipc::value(streamingOutputStatsSecondary.kbitsPerSec)); + rval.push_back(ipc::value(streamingOutputStatsSecondary.dataOutput)); AUTO_DEBUG; } diff --git a/obs-studio-server/source/nodeobs_display.cpp b/obs-studio-server/source/nodeobs_display.cpp index d8ca1928d..0c93df881 100644 --- a/obs-studio-server/source/nodeobs_display.cpp +++ b/obs-studio-server/source/nodeobs_display.cpp @@ -1387,6 +1387,9 @@ void OBS::Display::DisplayCallback(void *displayPtr, uint32_t cx, uint32_t cy) gs_technique_t *solid_tech = gs_effect_get_technique(solid, "Solid"); vec4 color; + if (dp->m_canvas) + obs_set_video_rendering_canvas(dp->m_canvas); + dp->UpdatePreviewArea(); // Get proper source/base size. diff --git a/tests/osn-tests/src/test_osn_input.ts b/tests/osn-tests/src/test_osn_input.ts index c9b0bec98..3abb85e2b 100644 --- a/tests/osn-tests/src/test_osn_input.ts +++ b/tests/osn-tests/src/test_osn_input.ts @@ -155,6 +155,8 @@ describe(testName, () => { case 'game_capture': { settings = inputSettings.gameCapture; settings['allow_transparency'] = true; + settings['default_height'] = 1080; + settings['default_width'] = 1920; break; } case 'dshow_input': { @@ -196,6 +198,8 @@ describe(testName, () => { } case 'screen_capture': { settings = inputSettings.simpleCapture; + settings['default_height'] = 1080; + settings['default_width'] = 1920; break; } }