mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -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
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include <pulse/util.h>
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#define PA_PATH_SEP_CHAR '/'
|
||||
|
||||
SPA_EXPORT
|
||||
|
|
@ -112,3 +114,11 @@ int pa_msleep(unsigned long t)
|
|||
|
||||
return nanosleep(&ts, NULL);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue