https://bugs.freedesktop.org/show_bug.cgi?id=44793
Bug #: 44793
Summary: Unique names for ports
Classification: Unclassified
Product: PulseAudio
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: enhancement
Priority: medium
Component: core
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
CC: [email protected]
I have written a function:
static const char *get_port_name(pa_device_port *port) {
if (port)
return port->name;
else
return "(no port)"
}
The port name isn't guaranteed to be unique across different cards. I'd like
the port name to be an unique identifier, because the result of get_port_name()
is used in a log message. If the name is not unique, the log message may be
ambiguous. I could change get_port_name() so that it would allocate a new
string: pa_sprintf_malloc("%s on %s", port->name, port->card->name), but
freeing the string would be inconvenient for the caller.
Now, logging being slightly inconvenient may not be the most convincing
argument when the requested change would be relatively big. So, here's another
argument: we will anyway have to make the name unique, because it would be
awesome if pa_connect_playback() could take a port name in it's dev argument -
if the requested port isn't active, it will be automatically made active. And
we're going to merge the sink and port concepts anyway, aren't we, so all this
makes just perfect sense, right?
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
pulseaudio-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-bugs