Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/197'
Browse files Browse the repository at this point in the history
* origin/pr/197:
  Use the drained callback on the playback stream
  • Loading branch information
marmarek committed Nov 4, 2024
2 parents a7a6bff + fc04d11 commit f28a49f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pipewire/qubes-pw-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,8 @@ static void stream_state_changed(void *data, enum pw_stream_state old,
return;
case PW_STREAM_STATE_PAUSED:
pw_log_debug("%s paused", name);
set_stream_state(stream, false);
if (!qubes_stream_is_playback(stream))
set_stream_state(stream, false);
break;
case PW_STREAM_STATE_STREAMING:
pw_log_debug("%s streaming", name);
Expand Down Expand Up @@ -1426,6 +1427,11 @@ static void stream_param_changed(void *data, uint32_t id, const struct spa_pod *
}
}

static void playback_stream_drained(void *data)
{
set_stream_state(data, false);
}

static const struct pw_stream_events capture_stream_events = {
.version = PW_VERSION_STREAM_EVENTS,
.destroy = stream_destroy,
Expand All @@ -1448,6 +1454,7 @@ static const struct pw_stream_events playback_stream_events = {
.add_buffer = NULL,
.remove_buffer = NULL,
.process = playback_stream_process,
.drained = playback_stream_drained,
};

static void core_error(void *data, uint32_t id, int seq, int res, const char *message)
Expand Down

0 comments on commit f28a49f

Please sign in to comment.