services/pipewire: expose node type

This commit is contained in:
nydragon 2025-06-07 03:26:55 -07:00 committed by outfoxxed
parent 6b3d64e32a
commit ee570ec623
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
5 changed files with 100 additions and 23 deletions

View file

@ -146,7 +146,7 @@ void PwDefaultTracker::onNodeDestroyed(QObject* node) {
void PwDefaultTracker::changeConfiguredSink(PwNode* node) {
if (node != nullptr) {
if (!node->isSink) {
if (!node->type.testFlags(PwNodeType::AudioSink)) {
qCCritical(logDefaults) << "Cannot change default sink to a node that is not a sink.";
return;
}
@ -168,7 +168,7 @@ void PwDefaultTracker::changeConfiguredSinkName(const QString& sink) {
void PwDefaultTracker::changeConfiguredSource(PwNode* node) {
if (node != nullptr) {
if (node->isSink) {
if (!node->type.testFlags(PwNodeType::AudioSource)) {
qCCritical(logDefaults) << "Cannot change default source to a node that is not a source.";
return;
}