mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-03-31 09:07:13 +09:00
Exclude duplicate app from --list-application-audio
This commit is contained in:
4
TODO
4
TODO
@@ -190,4 +190,6 @@ Support transposing (rotating) with vaapi. This isn't supported on many devices
|
||||
|
||||
Cleanup pipewire_audio.c (proper error handling and memory cleanup of proxies).
|
||||
|
||||
Hide application audio module-null-sink by using sink_properties=media.class="Audio/Sink/Internal".
|
||||
Hide application audio module-null-sink by using sink_properties=media.class="Audio/Sink/Internal".
|
||||
|
||||
Improve software encoding performance.
|
||||
|
||||
@@ -398,6 +398,21 @@ void gsr_pipewire_audio_for_each_app(gsr_pipewire_audio *self, gsr_pipewire_audi
|
||||
if(node->type != GSR_PIPEWIRE_AUDIO_NODE_TYPE_STREAM_OUTPUT)
|
||||
continue;
|
||||
|
||||
bool duplicate_app = false;
|
||||
for(int j = i - 1; j >= 0; --j) {
|
||||
const gsr_pipewire_audio_node *prev_node = &self->stream_nodes[j];
|
||||
if(prev_node->type != GSR_PIPEWIRE_AUDIO_NODE_TYPE_STREAM_OUTPUT)
|
||||
continue;
|
||||
|
||||
if(strcasecmp(node->name, prev_node->name) == 0) {
|
||||
duplicate_app = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(duplicate_app)
|
||||
continue;
|
||||
|
||||
if(!callback(node->name, userdata))
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user