mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse: avoid node lookup when connecting
We can use the node name directly if we strip the .monitor suffix or remove the MONITOR flag form the name/id.
This commit is contained in:
parent
ec860d64cf
commit
8ac9ce7947
4 changed files with 23 additions and 25 deletions
|
|
@ -170,14 +170,6 @@ const char *pa_context_find_global_name(pa_context *c, uint32_t id)
|
|||
return name;
|
||||
}
|
||||
|
||||
static inline bool pa_endswith(const char *s, const char *sfx)
|
||||
{
|
||||
size_t l1, l2;
|
||||
l1 = strlen(s);
|
||||
l2 = strlen(sfx);
|
||||
return l1 >= l2 && pa_streq(s + l1 - l2, sfx);
|
||||
}
|
||||
|
||||
struct global *pa_context_find_global_by_name(pa_context *c, uint32_t mask, const char *name)
|
||||
{
|
||||
struct global *g;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue