diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index 681e93ff7..dea18eb46 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -957,6 +957,12 @@ pw_stream_connect(struct pw_stream *stream, return true; } +uint32_t +pw_stream_get_node_id(struct pw_stream *stream) +{ + return stream->node_id; +} + void pw_stream_finish_format(struct pw_stream *stream, int res, struct spa_param **params, uint32_t n_params) diff --git a/src/pipewire/stream.h b/src/pipewire/stream.h index 8629f6f39..c1dfd0e66 100644 --- a/src/pipewire/stream.h +++ b/src/pipewire/stream.h @@ -265,6 +265,11 @@ pw_stream_connect(struct pw_stream *stream, /**< a \ref pw_stream */ uint32_t n_possible_formats, /**< number of items in \a possible_formats */ const struct spa_format **possible_formats /**< an array with possible accepted formats */); +/** Get the node ID of the stream. \memberof pw_stream + * \return node ID. */ +uint32_t +pw_stream_get_node_id(struct pw_stream *stream); + /** Disconnect \a stream \memberof pw_stream */ void pw_stream_disconnect(struct pw_stream *stream);