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
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
5 changed files with 100 additions and 23 deletions

View file

@ -287,6 +287,8 @@ class PwNodeIface: public PwObjectIface {
/// If `true` then the node is likely to be a program, if `false` it is likely to be
/// a hardware device.
Q_PROPERTY(bool isStream READ isStream CONSTANT);
/// The type of this node. Reflects Pipewire's [media.class](https://docs.pipewire.org/page_man_pipewire-props_7.html).
Q_PROPERTY(qs::service::pipewire::PwNodeType::Flags type READ type CONSTANT);
/// The property set present on the node, as an object containing key-value pairs.
/// You can inspect this directly with `pw-cli i <id>`.
///
@ -324,6 +326,7 @@ public:
[[nodiscard]] bool isSink() const;
[[nodiscard]] bool isStream() const;
[[nodiscard]] bool isReady() const;
[[nodiscard]] PwNodeType::Flags type() const;
[[nodiscard]] QVariantMap properties() const;
[[nodiscard]] PwNodeAudioIface* audio() const;