mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-05 08:15:58 +01:00
screencast: move xdpw_pwr_stream_destroy() up
- keep the order of functions in-sync with the header
This commit is contained in:
parent
f60bdcef71
commit
0d23a5ea15
1 changed files with 12 additions and 12 deletions
|
@ -206,6 +206,18 @@ void xdpw_pwr_stream_create(struct xdpw_screencast_instance *cast) {
|
|||
¶m, 1);
|
||||
}
|
||||
|
||||
void xdpw_pwr_stream_destroy(struct xdpw_screencast_instance *cast) {
|
||||
if (!cast->stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
logprint(DEBUG, "pipewire: destroying stream");
|
||||
pw_stream_flush(cast->stream, false);
|
||||
pw_stream_disconnect(cast->stream);
|
||||
pw_stream_destroy(cast->stream);
|
||||
cast->stream = NULL;
|
||||
}
|
||||
|
||||
int xdpw_pwr_context_create(struct xdpw_state *state) {
|
||||
struct xdpw_screencast_context *ctx = &state->screencast;
|
||||
|
||||
|
@ -244,15 +256,3 @@ void xdpw_pwr_context_destroy(struct xdpw_state *state) {
|
|||
ctx->pwr_context = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void xdpw_pwr_stream_destroy(struct xdpw_screencast_instance *cast) {
|
||||
if (!cast->stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
logprint(DEBUG, "pipewire: destroying stream");
|
||||
pw_stream_flush(cast->stream, false);
|
||||
pw_stream_disconnect(cast->stream);
|
||||
pw_stream_destroy(cast->stream);
|
||||
cast->stream = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue