Skip to content

Commit 3ca7609

Browse files
committed
Add gpu scale type
1 parent 4965960 commit 3ca7609

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,6 @@ jobs:
7676
print "ccacheDate=$(date +"%Y-%m-%d")" >> $GITHUB_OUTPUT
7777
print "commitHash=${"$(git rev-parse HEAD)"[0,9]}" >> $GITHUB_OUTPUT
7878
79-
- name: Restore Compilation Cache
80-
id: ccache-cache
81-
uses: actions/[email protected]
82-
with:
83-
path: ${{ github.workspace }}/.ccache
84-
key: macos-${{ matrix.arch }}-ccache-plugin-${{ steps.setup.outputs.ccacheDate }}
85-
restore-keys: |
86-
macos-${{ matrix.arch }}-ccache-plugin-
87-
8879
- name: Check for GitHub Labels
8980
id: seekingTesters
9081
if: ${{ github.event_name == 'pull_request' }}

source-record.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ static void update_video_encoder(struct source_record_filter_context *filter, ob
426426
} else {
427427
obs_encoder_set_scaled_size(filter->encoder, 0, 0);
428428
}
429-
//obs_encoder_set_gpu_scale_type(filter->encoder, (enum obs_scale_type)obs_data_get_int(settings, "scale_type"));
429+
obs_encoder_set_gpu_scale_type(filter->encoder, (enum obs_scale_type)obs_data_get_int(settings, "scale_type"));
430430
} else {
431431
obs_encoder_set_scaled_size(filter->encoder, 0, 0);
432432
}
@@ -682,7 +682,8 @@ static void update_encoder(struct source_record_filter_context *filter, obs_data
682682
} else {
683683
obs_encoder_set_scaled_size(filter->encoder, 0, 0);
684684
}
685-
//obs_encoder_set_gpu_scale_type(filter->encoder, (enum obs_scale_type)obs_data_get_int(settings, "scale_type"));
685+
obs_encoder_set_gpu_scale_type(filter->encoder,
686+
(enum obs_scale_type)obs_data_get_int(settings, "scale_type"));
686687
} else {
687688
obs_encoder_set_scaled_size(filter->encoder, 0, 0);
688689
}
@@ -1583,6 +1584,15 @@ static obs_properties_t *source_record_filter_properties(void *data)
15831584
obs_property_list_add_string(p, "1920x1080", "1920x1080");
15841585
obs_property_list_add_string(p, "2560x1440", "2560x1440");
15851586

1587+
p = obs_properties_add_list(scale, "scale_type", obs_module_text("ScaleType"), OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
1588+
obs_property_list_add_int(p, obs_frontend_get_locale_string("Basic.Settings.Video.DownscaleFilter.Bilinear"),
1589+
OBS_SCALE_BILINEAR);
1590+
obs_property_list_add_int(p, obs_frontend_get_locale_string("Basic.Settings.Video.DownscaleFilter.Area"), OBS_SCALE_AREA);
1591+
obs_property_list_add_int(p, obs_frontend_get_locale_string("Basic.Settings.Video.DownscaleFilter.Bicubic"),
1592+
OBS_SCALE_BICUBIC);
1593+
obs_property_list_add_int(p, obs_frontend_get_locale_string("Basic.Settings.Video.DownscaleFilter.Lanczos"),
1594+
OBS_SCALE_LANCZOS);
1595+
15861596
obs_properties_add_group(props, "scale", obs_module_text("Scale"), OBS_GROUP_CHECKABLE, scale);
15871597

15881598
if (obs_encoder_set_frame_rate_divisor_func) {

0 commit comments

Comments
 (0)