PipeWire core, context, and stream setup used for screencast capture.
More...
|
| int | ensure_stream (const platf::mem_type_e mem_type, const uint32_t width, const uint32_t height, const uint32_t refresh_rate, const struct dmabuf_format_info_t *dmabuf_infos, const int n_dmabuf_infos, const bool display_is_nvidia) |
| | Create the PipeWire stream if it is not already active.
|
| |
| void | fill_img (platf::img_t *img) |
| | Copy the latest PipeWire frame into Sunshine's image buffer.
|
| |
| std::condition_variable & | frame_cv () |
| | Return the condition variable signaled when frame state changes.
|
| |
| std::mutex & | frame_mutex () |
| | Return the mutex protecting PipeWire frame state.
|
| |
| int | init (const int stream_fd, const uint32_t stream_node, const uint64_t stream_object_serial, std::shared_ptr< shared_state_t > shared_state) |
| | Initialize PipeWire core objects and optional stream negotiation.
|
| |
| bool | is_frame_ready () const |
| | Check whether frame ready.
|
| |
| void | set_frame_ready (bool ready) |
| | Set frame ready.
|
| |
| void | set_negotiate_maxframerate (bool negotiate_maxframerate) |
| | Set negotiate maxframerate.
|
| |
PipeWire core, context, and stream setup used for screencast capture.
◆ close_img_fds()
Close img fds.
- Parameters
-
| img_descriptor | Image descriptor whose duplicated DMA-BUF fds are closed. |
◆ ensure_stream()
| int pipewire::pipewire_t::ensure_stream |
( |
const platf::mem_type_e | mem_type, |
|
|
const uint32_t | width, |
|
|
const uint32_t | height, |
|
|
const uint32_t | refresh_rate, |
|
|
const struct dmabuf_format_info_t * | dmabuf_infos, |
|
|
const int | n_dmabuf_infos, |
|
|
const bool | display_is_nvidia ) |
|
inline |
Create the PipeWire stream if it is not already active.
- Parameters
-
| mem_type | Mem type. |
| width | Frame or display width in pixels. |
| height | Frame or display height in pixels. |
| refresh_rate | Refresh rate. |
| dmabuf_infos | Dmabuf infos. |
| n_dmabuf_infos | N dmabuf infos. |
| display_is_nvidia | Display is nvidia. |
- Returns
- 0 when the PipeWire stream is configured; nonzero on negotiation failure.
◆ fill_img()
Copy the latest PipeWire frame into Sunshine's image buffer.
- Parameters
-
| img | Image or frame object to read from or populate. |
◆ fill_img_dmabuf()
Populate a Sunshine image descriptor from PipeWire DMA-BUF planes.
- Parameters
-
| img_descriptor | Image descriptor receiving duplicated fds and plane layout. |
| buf | Raw byte buffer used for serialization. |
| d | PipeWire listener data passed to the callback. |
◆ fill_img_metadata()
| static void pipewire::pipewire_t::fill_img_metadata |
( |
egl::img_descriptor_t * | img_descriptor, |
|
|
struct spa_buffer * | buf ) |
|
inlinestatic |
Copy PipeWire metadata into the Sunshine image descriptor.
- Parameters
-
| img_descriptor | Image descriptor receiving timestamps, sequence, and damage flags. |
| buf | Raw byte buffer used for serialization. |
◆ frame_cv()
| std::condition_variable & pipewire::pipewire_t::frame_cv |
( |
| ) |
|
|
inline |
Return the condition variable signaled when frame state changes.
- Returns
- Condition variable used to wait for frames or shutdown.
◆ frame_mutex()
| std::mutex & pipewire::pipewire_t::frame_mutex |
( |
| ) |
|
|
inline |
Return the mutex protecting PipeWire frame state.
- Returns
- Mutex used by producer and capture threads.
◆ init()
| int pipewire::pipewire_t::init |
( |
const int | stream_fd, |
|
|
const uint32_t | stream_node, |
|
|
const uint64_t | stream_object_serial, |
|
|
std::shared_ptr< shared_state_t > | shared_state ) |
|
inline |
Initialize PipeWire core objects and optional stream negotiation.
- Parameters
-
| stream_fd | Stream fd. |
| stream_node | Stream node. |
| stream_object_serial | Stream object serial. |
| shared_state | Shared state. |
- Returns
- 0 on success; nonzero or negative platform status on failure.
◆ is_frame_ready()
| bool pipewire::pipewire_t::is_frame_ready |
( |
| ) |
const |
|
inline |
Check whether frame ready.
- Returns
- True when PipeWire has delivered a frame ready for capture.
◆ set_frame_ready()
| void pipewire::pipewire_t::set_frame_ready |
( |
bool | ready | ) |
|
|
inline |
Set frame ready.
- Parameters
-
| ready | Whether the PipeWire frame is ready for capture. |
◆ set_negotiate_maxframerate()
| void pipewire::pipewire_t::set_negotiate_maxframerate |
( |
bool | negotiate_maxframerate | ) |
|
|
inline |
Set negotiate maxframerate.
- Parameters
-
| negotiate_maxframerate | Negotiate maxframerate. |
The documentation for this class was generated from the following file: