From 8704aaa044c75f23773e8e45d3093504867fc5cf Mon Sep 17 00:00:00 2001 From: Christian Glombek Date: Mon, 9 Oct 2023 07:23:02 +0200 Subject: [PATCH] module-rtp/stream: Add getter for pw_stream state --- src/modules/module-rtp/stream.c | 7 +++++++ src/modules/module-rtp/stream.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/modules/module-rtp/stream.c b/src/modules/module-rtp/stream.c index 749f07b23..86f63ab59 100644 --- a/src/modules/module-rtp/stream.c +++ b/src/modules/module-rtp/stream.c @@ -557,6 +557,13 @@ void rtp_stream_set_first(struct rtp_stream *s) impl->first = true; } +enum pw_stream_state rtp_stream_get_state(struct rtp_stream *s, const char **error) +{ + struct impl *impl = (struct impl*)s; + + return pw_stream_get_state(impl->stream, error); +} + int rtp_stream_set_param(struct rtp_stream *s, uint32_t id, const struct spa_pod *param) { struct impl *impl = (struct impl*)s; diff --git a/src/modules/module-rtp/stream.h b/src/modules/module-rtp/stream.h index 9be5c0d84..d53db7ecd 100644 --- a/src/modules/module-rtp/stream.h +++ b/src/modules/module-rtp/stream.h @@ -52,6 +52,8 @@ uint16_t rtp_stream_get_seq(struct rtp_stream *s); void rtp_stream_set_first(struct rtp_stream *s); +enum pw_stream_state rtp_stream_get_state(struct rtp_stream *s, const char **error); + int rtp_stream_set_param(struct rtp_stream *s, uint32_t id, const struct spa_pod *param); int rtp_stream_update_params(struct rtp_stream *stream,