Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs update with merge fixes #1499

Open
wants to merge 5 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 5 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: 30.2.4sl8
LibOBSVersion: 30.2.4sl12
PACKAGE_NAME: osn

jobs:
Expand Down Expand Up @@ -151,8 +151,10 @@ jobs:
submodules: 'recursive'
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
run: |
$version = $env:GITHUB_REF -replace 'refs/tags/', ''
"VERSION=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
shell: pwsh
- name: Install dependencies
run: |
yarn install --immutable --immutable-cache --check-cache
Expand All @@ -169,49 +171,6 @@ jobs:
run: node ci/bump-version.js "${{ steps.get_version.outputs.VERSION }}" "${{env.PACKAGE_PATH}}"
env:
PACKAGE_PATH: "${{env.SLFullDistributePath}}/${{env.InstallPath}}"
- name: Cache build
uses: actions/cache@v3
with:
path: |
${{env.SLBUILDDIRECTORY}}
tests/
key: ${{ runner.os }}-build-${{ matrix.ReleaseName }}-${{ github.sha }}

win64_tests:
name: 'Windows 64-bit tests'
runs-on: windows-latest
needs: [win64]
strategy:
matrix:
ReleaseName: [release]
include:
- ReleaseName: release
ReleaseConfig: RelWithDebInfo
env:
OS_TAG: "win64"
steps:
- name: 'Add msbuild to PATH'
uses: microsoft/setup-msbuild@v1
- name: 'Checkout'
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
- name: Install dependencies
run: |
yarn install --immutable --immutable-cache --check-cache
yarn add electron@${{env.ElectronVersion}} -D

- name: Get build from cache
uses: actions/cache@v3
with:
path: |
${{env.SLBUILDDIRECTORY}}
tests/
key: ${{ runner.os }}-build-${{ matrix.ReleaseName }}-${{ github.sha }}

- name: 'Run tests'
continue-on-error: false
Expand Down
12 changes: 8 additions & 4 deletions obs-studio-server/source/nodeobs_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1357,16 +1357,17 @@ void OBS_settings::getEncoderSettings(const obs_encoder_t *encoder, obs_data_t *
obs_properties_t *encoderProperties = obs_encoder_properties(encoder);
obs_property_t *property = obs_properties_first(encoderProperties);

std::string bitrate_param_name = "bitrate";
OBSData service_default_settings;
if (applyServiceSettings && obs_encoder_get_type(encoder) == OBS_ENCODER_VIDEO) {
service_default_settings = obs_data_create();
// INT_MAX value is needed to get actual upper bound of service-default bitrate
obs_data_set_int(service_default_settings, "bitrate", INT_MAX);
obs_data_set_int(service_default_settings, bitrate_param_name.c_str(), INT_MAX);
obs_service_apply_encoder_settings(OBS_service::getService(StreamServiceId::Main), service_default_settings, nullptr);
}

Parameter param;
while (property) {
Parameter param;
param.name = obs_property_name(property);
obs_property_type typeProperty = obs_property_get_type(property);

Expand Down Expand Up @@ -1396,6 +1397,9 @@ void OBS_settings::getEncoderSettings(const obs_encoder_t *encoder, obs_data_t *
param.minVal = obs_property_int_min(property);
param.maxVal = obs_property_int_max(property);
param.stepVal = obs_property_int_step(property);
if (param.name == bitrate_param_name) {
param.maxVal = INT_MAX;
}
break;
}
case OBS_PROPERTY_FLOAT: {
Expand Down Expand Up @@ -1589,7 +1593,7 @@ void OBS_settings::getEncoderSettings(const obs_encoder_t *encoder, obs_data_t *
param.sizeOfCurrentValue = val_len;
} else if (obsType == OBS_DATA_NUMBER) {
const auto obs_val = obs_data_item_get_int(data_item);
if (param.name == "bitrate") {
if (param.name == bitrate_param_name) {
param.visible = true;
int64_t cur_settings_value = obs_data_get_int(settings, param.name.c_str());

Expand Down Expand Up @@ -1623,7 +1627,7 @@ void OBS_settings::getEncoderSettings(const obs_encoder_t *encoder, obs_data_t *
// Restoring back prev value if any
const auto vbitrate_abs_max = obs_data_get_int(settings, "vbitrate_abs_max");
obs_data_erase(settings, "vbitrate_abs_max");
if (param.name == "bitrate" && vbitrate_abs_max) {
if (param.name == bitrate_param_name && vbitrate_abs_max) {
param.maxVal = vbitrate_abs_max;
}
}
Expand Down
Loading