update patches
This commit is contained in:
parent
f31c978cac
commit
4cac9e85fe
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,23 @@
|
||||
diff '--color=auto' -ru a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipewire/pipewire.c
|
||||
--- a/plugins/linux-pipewire/pipewire.c 2023-02-04 13:17:10.000000000 +0300
|
||||
+++ b/plugins/linux-pipewire/pipewire.c 2023-03-04 20:51:36.512199751 +0300
|
||||
@@ -125,6 +125,41 @@
|
||||
From 037f33d27d521202f31e4590a7594e92f9767823 Mon Sep 17 00:00:00 2001
|
||||
From: columbarius <co1umbarius@protonmail.com>
|
||||
Date: Sat, 21 Jan 2023 08:45:38 +0100
|
||||
Subject: [PATCH] pipewire: calc spa buffer size
|
||||
|
||||
Modern GPUs might support a lot of modifiers. As such the hardcoded size
|
||||
for the ENUM_Formats PipeWire params are not enough and we should
|
||||
calculate the required size manually.
|
||||
|
||||
Added logs if a ENUM_Format can't be assembled, which happens when the
|
||||
buffer size was not large enough.
|
||||
---
|
||||
plugins/linux-pipewire/pipewire.c | 47 +++++++++++++++++++++++++++++--
|
||||
1 file changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipewire/pipewire.c
|
||||
index ada92cfe70007..43af0e7c7ef2a 100644
|
||||
--- a/plugins/linux-pipewire/pipewire.c
|
||||
+++ b/plugins/linux-pipewire/pipewire.c
|
||||
@@ -144,6 +144,41 @@ static void update_pw_versions(obs_pipewire *obs_pw, const char *version)
|
||||
blog(LOG_WARNING, "[pipewire] failed to parse server version");
|
||||
}
|
||||
|
||||
@ -40,10 +56,10 @@ diff '--color=auto' -ru a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipe
|
||||
+ return size;
|
||||
+}
|
||||
+
|
||||
static void teardown_pipewire(obs_pipewire_data *obs_pw)
|
||||
static void teardown_pipewire(obs_pipewire *obs_pw)
|
||||
{
|
||||
if (obs_pw->thread_loop) {
|
||||
@@ -319,6 +354,10 @@
|
||||
@@ -408,6 +443,10 @@ static bool build_format_params(obs_pipewire *obs_pw,
|
||||
obs_pw->format_info.array[i].spa_format,
|
||||
obs_pw->format_info.array[i].modifiers.array,
|
||||
obs_pw->format_info.array[i].modifiers.num);
|
||||
@ -54,7 +70,7 @@ diff '--color=auto' -ru a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipe
|
||||
}
|
||||
|
||||
build_shm:
|
||||
@@ -326,6 +365,10 @@
|
||||
@@ -415,6 +454,10 @@ static bool build_format_params(obs_pipewire *obs_pw,
|
||||
params[params_count++] = build_format(
|
||||
pod_builder, &obs_pw->video_info,
|
||||
obs_pw->format_info.array[i].spa_format, NULL, 0);
|
||||
@ -65,7 +81,7 @@ diff '--color=auto' -ru a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipe
|
||||
}
|
||||
*param_list = params;
|
||||
*n_params = params_count;
|
||||
@@ -432,7 +475,7 @@
|
||||
@@ -521,7 +564,7 @@ static void renegotiate_format(void *data, uint64_t expirations)
|
||||
|
||||
pw_thread_loop_lock(obs_pw->thread_loop);
|
||||
|
||||
@ -74,12 +90,12 @@ diff '--color=auto' -ru a/plugins/linux-pipewire/pipewire.c b/plugins/linux-pipe
|
||||
struct spa_pod_builder pod_builder =
|
||||
SPA_POD_BUILDER_INIT(params_buffer, sizeof(params_buffer));
|
||||
uint32_t n_params;
|
||||
@@ -757,7 +800,7 @@
|
||||
@@ -967,7 +1010,7 @@ void obs_pipewire_connect_stream(obs_pipewire *obs_pw, int pipewire_node,
|
||||
struct spa_pod_builder pod_builder;
|
||||
const struct spa_pod **params = NULL;
|
||||
uint32_t n_params;
|
||||
- uint8_t params_buffer[2048];
|
||||
+ uint8_t params_buffer[calc_spa_enumformat_buffer_size(obs_pw)];
|
||||
|
||||
obs_pw->thread_loop = pw_thread_loop_new("PipeWire thread loop", NULL);
|
||||
obs_pw->context = pw_context_new(
|
||||
pw_thread_loop_lock(obs_pw->thread_loop);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user