screen-cast/src: Do not close streams on error
Streams are generally recoverable by the client and errors may happen e.g. on negotiation failures. Right now we close the stream and corresponding session, which is neither necessary nor expected by clients. Just disable the stream instead and let clients handle things as they seem fit. This allows clients to e.g. try several Gstreamer pipelines with limited caps on a single stream. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2850>
This commit is contained in:
parent
c6b454d00f
commit
7171a41796
@ -801,8 +801,8 @@ on_stream_state_changed (void *data,
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case PW_STREAM_STATE_ERROR:
|
case PW_STREAM_STATE_ERROR:
|
||||||
g_warning ("pipewire stream error: %s", error_message);
|
if (meta_screen_cast_stream_src_is_enabled (src))
|
||||||
meta_screen_cast_stream_src_close (src);
|
meta_screen_cast_stream_src_disable (src);
|
||||||
break;
|
break;
|
||||||
case PW_STREAM_STATE_PAUSED:
|
case PW_STREAM_STATE_PAUSED:
|
||||||
if (priv->node_id == SPA_ID_INVALID && priv->pipewire_stream)
|
if (priv->node_id == SPA_ID_INVALID && priv->pipewire_stream)
|
||||||
|
Loading…
Reference in New Issue
Block a user