• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Pipewireパッケージ(ちょっと変更)


Commit MetaInfo

Revisão0278695e7dcdfc0f7728e1837ffb48186643d21e (tree)
Hora2023-11-15 21:02:08
AutorWim Taymans <wtaymans@redh...>
CommiterWim Taymans

Mensagem de Log

modules: add tunnel.may-pause option for pipe-tunnel

To override the default may-pause behaviour of streams.

Mudança Sumário

Diff

--- a/src/modules/module-pipe-tunnel.c
+++ b/src/modules/module-pipe-tunnel.c
@@ -40,6 +40,7 @@
4040 * ## Module Options
4141 *
4242 * - `tunnel.mode`: the desired tunnel to create. (Default `playback`)
43+ * - `tunnel.may-pause`: if the tunnel stream is allowed to pause on xrun
4344 * - `pipe.filename`: the filename of the pipe.
4445 * - `stream.props`: Extra properties for the local stream.
4546 *
@@ -55,6 +56,12 @@
5556 * When `tunnel.mode` is `source`, a source node is created. Samples read from
5657 * the the pipe will be made available on the source.
5758 *
59+ * `tunnel.may-pause` allows the tunnel stream to become inactive (paused) when
60+ * there is no data in the fifo or when the fifo is full. For `capture` and
61+ * `playback` `tunnel.mode` this is by default true. For `source` and `sink`
62+ * `tunnel.mode`, this is by default false. A paused stream will consume no
63+ * CPU and will resume when the fifo becomes readable or writable again.
64+ *
5865 * When `pipe.filename` is not given, a default fifo in `/tmp/fifo_input` or
5966 * `/tmp/fifo_output` will be created that can be written and read respectively,
6067 * depending on the selected `tunnel.mode`.
@@ -86,6 +93,7 @@
8693 * { name = libpipewire-module-pipe-tunnel
8794 * args = {
8895 * tunnel.mode = playback
96+ * #tunnel.may-pause = true
8997 * # Set the pipe name to tunnel to
9098 * pipe.filename = "/tmp/fifo_output"
9199 * #audio.format=<sample format>
@@ -128,6 +136,7 @@ PW_LOG_TOPIC_STATIC(mod_topic, "mod." NAME);
128136 "( audio.channels=<number of channels> ) " \
129137 "( audio.position=<channel map> ) " \
130138 "( tunnel.mode=capture|playback|sink|source )" \
139+ "( tunnel.may-pause=<bool, if the stream can pause> )" \
131140 "( pipe.filename=<filename> )" \
132141 "( stream.props=<properties> ) "
133142
@@ -898,6 +907,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
898907 res = -EINVAL;
899908 goto error;
900909 }
910+ if ((str = pw_properties_get(props, "tunnel.may-pause")) != NULL)
911+ impl->may_pause = spa_atob(str);
901912
902913 if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
903914 pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");