[pulseaudio-tickets] [Bug 44793] New: Unique names for ports
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jan 15 02:09:10 PST 2012
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: pulseaudio-bugs at lists.freedesktop.org
ReportedBy: tanuk at iki.fi
QAContact: pulseaudio-bugs at lists.freedesktop.org
CC: lennart at poettering.net
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.
More information about the pulseaudio-bugs
mailing list