-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
271 additions
and
397 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# 🔇 `mute-microphone` Example | ||
|
||
This example demonstrates how to mute a `pipewire::device` by enumerating its `params()`. | ||
|
||
> Note: See the comment in the source code to find out how mute most devices directly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#pragma once | ||
|
||
#include "../pod.hpp" | ||
|
||
#include <memory> | ||
#include <cstdint> | ||
|
||
struct spa_pod_object; | ||
|
||
namespace pipewire::spa | ||
{ | ||
class pod_object | ||
{ | ||
struct impl; | ||
|
||
public: | ||
using raw_type = spa_pod_object; | ||
|
||
public: | ||
class iterator; | ||
class sentinel; | ||
|
||
private: | ||
std::unique_ptr<impl> m_impl; | ||
|
||
public: | ||
~pod_object(); | ||
|
||
private: | ||
pod_object(raw_type *); | ||
|
||
public: | ||
pod_object(pod_object &&) noexcept; | ||
|
||
public: | ||
pod_object &operator=(pod_object &&) noexcept; | ||
|
||
public: | ||
[[nodiscard]] spa::pod pod() const; | ||
[[nodiscard]] spa::type type() const; | ||
[[nodiscard]] std::uint32_t id() const; | ||
|
||
public: | ||
[[nodiscard]] sentinel end() const; | ||
[[nodiscard]] iterator begin() const; | ||
|
||
public: | ||
[[nodiscard]] raw_type *get() const; | ||
|
||
public: | ||
[[nodiscard]] operator raw_type *() const &; | ||
[[nodiscard]] operator raw_type *() const && = delete; | ||
|
||
public: | ||
[[nodiscard]] static pod_object view(raw_type *); | ||
}; | ||
} // namespace pipewire::spa | ||
|
||
#include "iterator.hpp" |
Oops, something went wrong.