forked from security/hakurei
internal/pipewire: expose connection props
Unused in hakurei but could be useful when the package is moved out of internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -820,8 +820,7 @@ func connectName(name string, manager bool) (conn *net.UnixConn, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ConnectName connects to a PipeWire remote by name.
|
// ConnectName connects to a PipeWire remote by name.
|
||||||
func ConnectName(name string, manager bool) (ctx *Context, err error) {
|
func ConnectName(name string, manager bool, props SPADict) (ctx *Context, err error) {
|
||||||
var props SPADict
|
|
||||||
if manager {
|
if manager {
|
||||||
props = append(props, SPADictItem{Key: PW_KEY_REMOTE_INTENTION, Value: "manager"})
|
props = append(props, SPADictItem{Key: PW_KEY_REMOTE_INTENTION, Value: "manager"})
|
||||||
}
|
}
|
||||||
@@ -847,4 +846,6 @@ func ConnectName(name string, manager bool) (ctx *Context, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Connect connects to the PipeWire remote.
|
// Connect connects to the PipeWire remote.
|
||||||
func Connect(manager bool) (ctx *Context, err error) { return ConnectName("", manager) }
|
func Connect(manager bool, props SPADict) (ctx *Context, err error) {
|
||||||
|
return ConnectName("", manager, props)
|
||||||
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ func (k direct) waylandNew(displayPath, bindPath *check.Absolute, appID, instanc
|
|||||||
return wayland.New(displayPath, bindPath, appID, instanceID)
|
return wayland.New(displayPath, bindPath, appID, instanceID)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (k direct) pipewireConnect() (*pipewire.Context, error) { return pipewire.Connect(true) }
|
func (k direct) pipewireConnect() (*pipewire.Context, error) { return pipewire.Connect(true, nil) }
|
||||||
|
|
||||||
func (k direct) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error {
|
func (k direct) xcbChangeHosts(mode xcb.HostMode, family xcb.Family, address string) error {
|
||||||
return xcb.ChangeHosts(mode, family, address)
|
return xcb.ChangeHosts(mode, family, address)
|
||||||
|
|||||||
Reference in New Issue
Block a user