summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-16 11:08:37 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-16 11:13:34 +0530
commit5c19f6b5d28566462d62bcc02221809a1c9b91aa (patch)
tree624a83b8f3f1a5d19603cd969197c1f04edf0869
parent479e7bcd6eb283750ee13d2270610d6d814add08 (diff)
Use sink flags to figure out if we can set formats
The server now signals when a sink supports setting formats, so we don't have to rely on the profile name.
-rw-r--r--src/mainwindow.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 906a5d9..a41dc99 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -301,7 +301,7 @@ void MainWindow::updateCard(const pa_card_info &info) {
bool MainWindow::updateSink(const pa_sink_info &info) {
SinkWidget *w;
bool is_new = false;
- const char *icon, *profile;
+ const char *icon;
std::set<pa_sink_port_info,sink_port_prio_compare> port_priorities;
if (sinkWidgets.count(info.index))
@@ -348,9 +348,7 @@ bool MainWindow::updateSink(const pa_sink_info &info) {
w->activePort = info.active_port ? info.active_port->name : "";
- /* Can we do digital? This is a hack just now... we should expose some nice properties to indicate we can do digitial*/
- profile = pa_proplist_gets(info.proplist, "device.profile.name");
- w->setDigital(profile && 0 == strncmp("iec958", profile, 6));
+ w->setDigital(info.flags & PA_SINK_SET_FORMATS);
w->updating = false;