mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse-server: make method to pause/resume stream
Make a method to pause and resume a stream and keep track of the paused state of the stream. Use this function instead of setting the stream inactive/active so that we get nice logging for each state change.
This commit is contained in:
parent
4c3f56fca1
commit
fc159be9c6
3 changed files with 21 additions and 4 deletions
|
|
@ -115,6 +115,7 @@ struct stream {
|
|||
unsigned int in_prebuf:1;
|
||||
unsigned int killed:1;
|
||||
unsigned int pending:1;
|
||||
unsigned int is_paused:1;
|
||||
};
|
||||
|
||||
struct stream *stream_new(struct client *client, enum stream_type type, uint32_t create_tag,
|
||||
|
|
@ -124,6 +125,8 @@ void stream_free(struct stream *stream);
|
|||
void stream_flush(struct stream *stream);
|
||||
uint32_t stream_pop_missing(struct stream *stream);
|
||||
|
||||
void stream_set_paused(struct stream *stream, bool paused, const char *reason);
|
||||
|
||||
int stream_send_underflow(struct stream *stream, int64_t offset);
|
||||
int stream_send_overflow(struct stream *stream);
|
||||
int stream_send_killed(struct stream *stream);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue