summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pavucontrol.glade26
-rw-r--r--src/sinkwidget.cc22
-rw-r--r--src/sinkwidget.h2
3 files changed, 49 insertions, 1 deletions
diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade
index 253534e..d081e8a 100644
--- a/src/pavucontrol.glade
+++ b/src/pavucontrol.glade
@@ -581,6 +581,32 @@
<property name="top_attach">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatTRUEHD">
+ <property name="label" translatable="yes">TrueHD</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="encodingFormatDTSHD">
+ <property name="label" translatable="yes">DTS-HD</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/sinkwidget.cc b/src/sinkwidget.cc
index b9002dd..f30bd37 100644
--- a/src/sinkwidget.cc
+++ b/src/sinkwidget.cc
@@ -74,6 +74,28 @@ SinkWidget::SinkWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
encodings[i].widget->set_sensitive(true);
}
#endif
+ ++i;
+ encodings[i].encoding = PA_ENCODING_INVALID;
+ x->get_widget("encodingFormatTRUEHD", encodings[i].widget);
+ encodings[i].widget->set_sensitive(false);
+#ifdef PA_ENCODING_TRUEHD_IEC61937
+ if (pa_context_get_server_protocol_version(get_context()) >= 33) {
+ encodings[i].encoding = PA_ENCODING_TRUEHD_IEC61937;
+ encodings[i].widget->signal_toggled().connect(sigc::mem_fun(*this, &SinkWidget::onEncodingsChange));
+ encodings[i].widget->set_sensitive(true);
+ }
+#endif
+ ++i;
+ encodings[i].encoding = PA_ENCODING_INVALID;
+ x->get_widget("encodingFormatDTSHD", encodings[i].widget);
+ encodings[i].widget->set_sensitive(false);
+#ifdef PA_ENCODING_DTSHD_IEC61937
+ if (pa_context_get_server_protocol_version(get_context()) >= 33) {
+ encodings[i].encoding = PA_ENCODING_DTSHD_IEC61937;
+ encodings[i].widget->signal_toggled().connect(sigc::mem_fun(*this, &SinkWidget::onEncodingsChange));
+ encodings[i].widget->set_sensitive(true);
+ }
+#endif
#endif
}
diff --git a/src/sinkwidget.h b/src/sinkwidget.h
index 924fca0..207d115 100644
--- a/src/sinkwidget.h
+++ b/src/sinkwidget.h
@@ -27,7 +27,7 @@
#if HAVE_EXT_DEVICE_RESTORE_API
# include <pulse/format.h>
-# define PAVU_NUM_ENCODINGS 6
+# define PAVU_NUM_ENCODINGS 8
typedef struct {
pa_encoding encoding;