Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/curve/rohrkabel

๐Ÿ”Œ A C++ RAII Pipewire-API Wrapper
https://github.com/curve/rohrkabel

cpp-library cpp20 cpp20-library library pipewire raii rohrkabel

Last synced: 12 days ago
JSON representation

๐Ÿ”Œ A C++ RAII Pipewire-API Wrapper

Awesome Lists containing this project

README

        





A C++20 pipewire-api wrapper

## ๐Ÿ“ƒ Description

_rohrkabel_ is a wrapper around the pipewire-api that embraces RAII and tries to simplify working with pipewire.

> [!NOTE]
> As of writing only a portion of the pipewire-api has been wrapped.
> In case we're missing something you need feel free to [open an issue](https://github.com/Curve/rohrkabel/issues/new).
> More portions of the api might be covered in the future depending on personal demand as well as demand from [Soundux](https://github.com/Soundux/Soundux).

## ๐Ÿ“ฆ Installation

* Using [CPM](https://github.com/cpm-cmake/CPM.cmake)
```cmake
CPMFindPackage(
NAME rohrkabel
VERSION 4.0
GIT_REPOSITORY "https://github.com/Curve/rohrkabel"
)
```

* Using FetchContent
```cmake
include(FetchContent)

FetchContent_Declare(rohrkabel GIT_REPOSITORY "https://github.com/Curve/rohrkabel" GIT_TAG v4.0)
FetchContent_MakeAvailable(rohrkabel)

target_link_libraries( cr::rohrkabel)
```

## ๐Ÿงต Thread-Safety

The `pw_main_loop` is not thread-safe, but supplies a [special loop implementation](https://docs.pipewire.org/page_thread_loop.html) meant for threaded-usage. However said special loop is cumbersome to deal with, especially from a RAII perspective, thus _rohrkabel_ uses a different, [channel-based](https://github.com/Curve/channel) approach inspired by [pipewire-rs](https://pipewire.pages.freedesktop.org/pipewire-rs/pipewire/channel/index.html).

The channel based approach greatly simplifies working with _rohrkabel_ in multi-threaded environments.

For more information check out [this example](examples/channels), or feel free to [open a discussion](https://github.com/Curve/rohrkabel/discussions/new/choose).

## ๐ŸŒŽ Who's using rohrkabel?



[Soundux](https://github.com/Soundux)

[Discord Screenaudio](https://github.com/maltejur/discord-screenaudio)

[Vencord](https://github.com/Vencord/linux-virtmic)

[Crescendo](https://github.com/PolisanTheEasyNick/Crescendo)