mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2025-02-18 09:42:07 +01:00
The previous implemented way to use wlr_screencopy events to cicle the screencast had issues, like halting the stream if it was paused and resumed before PipeWire triggered a recreation of buffers. This came from not returning a dequeued buffer. This is now mititgated by enqueuing the current pw_buffer imidiately on a paused event and trying to dequeue a buffer just before requesting a screencopy if none is present.
19 lines
708 B
C
19 lines
708 B
C
#ifndef PIPEWIRE_SCREENCAST_H
|
|
#define PIPEWIRE_SCREENCAST_H
|
|
|
|
#include "screencast_common.h"
|
|
|
|
#define XDPW_PWR_BUFFERS 2
|
|
#define XDPW_PWR_BUFFERS_MIN 2
|
|
#define XDPW_PWR_ALIGN 16
|
|
|
|
void xdpw_pwr_dequeue_buffer(struct xdpw_screencast_instance *cast);
|
|
void xdpw_pwr_enqueue_buffer(struct xdpw_screencast_instance *cast);
|
|
void xdpw_pwr_swap_buffer(struct xdpw_screencast_instance *cast);
|
|
void pwr_update_stream_param(struct xdpw_screencast_instance *cast);
|
|
void xdpw_pwr_stream_create(struct xdpw_screencast_instance *cast);
|
|
void xdpw_pwr_stream_destroy(struct xdpw_screencast_instance *cast);
|
|
int xdpw_pwr_context_create(struct xdpw_state *state);
|
|
void xdpw_pwr_context_destroy(struct xdpw_state *state);
|
|
|
|
#endif
|