mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
stream: add DONT_RECONNECT flag
This commit is contained in:
parent
4d780e87aa
commit
9805c2f413
2 changed files with 7 additions and 1 deletions
|
|
@ -1102,6 +1102,8 @@ pw_stream_connect(struct pw_stream *stream,
|
||||||
pw_properties_set(stream->properties, "node.driver", "1");
|
pw_properties_set(stream->properties, "node.driver", "1");
|
||||||
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
if (flags & PW_STREAM_FLAG_EXCLUSIVE)
|
||||||
pw_properties_set(stream->properties, PW_NODE_PROP_EXCLUSIVE, "1");
|
pw_properties_set(stream->properties, PW_NODE_PROP_EXCLUSIVE, "1");
|
||||||
|
if (flags & PW_STREAM_FLAG_DONT_RECONNECT)
|
||||||
|
pw_properties_set(stream->properties, "pipewire.dont-reconnect", "1");
|
||||||
|
|
||||||
state = pw_remote_get_state(stream->remote, NULL);
|
state = pw_remote_get_state(stream->remote, NULL);
|
||||||
impl->async_connect = (state == PW_REMOTE_STATE_UNCONNECTED ||
|
impl->async_connect = (state == PW_REMOTE_STATE_UNCONNECTED ||
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,9 @@ enum pw_stream_flags {
|
||||||
PW_STREAM_FLAG_NONE = 0, /**< no flags */
|
PW_STREAM_FLAG_NONE = 0, /**< no flags */
|
||||||
PW_STREAM_FLAG_AUTOCONNECT = (1 << 0), /**< try to automatically connect
|
PW_STREAM_FLAG_AUTOCONNECT = (1 << 0), /**< try to automatically connect
|
||||||
* this stream */
|
* this stream */
|
||||||
PW_STREAM_FLAG_INACTIVE = (1 << 1), /**< start the stream inactive */
|
PW_STREAM_FLAG_INACTIVE = (1 << 1), /**< start the stream inactive,
|
||||||
|
* pw_stream_set_active() needs to be
|
||||||
|
* called explicitly */
|
||||||
PW_STREAM_FLAG_MAP_BUFFERS = (1 << 2), /**< mmap the buffers */
|
PW_STREAM_FLAG_MAP_BUFFERS = (1 << 2), /**< mmap the buffers */
|
||||||
PW_STREAM_FLAG_DRIVER = (1 << 3), /**< be a driver */
|
PW_STREAM_FLAG_DRIVER = (1 << 3), /**< be a driver */
|
||||||
PW_STREAM_FLAG_RT_PROCESS = (1 << 4), /**< call process from the realtime
|
PW_STREAM_FLAG_RT_PROCESS = (1 << 4), /**< call process from the realtime
|
||||||
|
|
@ -224,6 +226,8 @@ enum pw_stream_flags {
|
||||||
PW_STREAM_FLAG_NO_CONVERT = (1 << 5), /**< don't convert format */
|
PW_STREAM_FLAG_NO_CONVERT = (1 << 5), /**< don't convert format */
|
||||||
PW_STREAM_FLAG_EXCLUSIVE = (1 << 6), /**< require exclusive access to the
|
PW_STREAM_FLAG_EXCLUSIVE = (1 << 6), /**< require exclusive access to the
|
||||||
* device */
|
* device */
|
||||||
|
PW_STREAM_FLAG_DONT_RECONNECT = (1 << 7), /**< don't try to reconnect this stream
|
||||||
|
* when the sink/source is removed */
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Create a new unconneced \ref pw_stream \memberof pw_stream
|
/** Create a new unconneced \ref pw_stream \memberof pw_stream
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue