• 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ãoa852b979b67570e695135a5d4cbe78fac6c1962b (tree)
Hora2023-11-10 05:59:40
AutorGeorge Kiagiadakis <george.kiagiadakis@coll...>
CommiterWim Taymans

Mensagem de Log

gst: avoid reporting error twice

First, make the error permanent by calling pw_stream_set_error()
and when this emits an error state again, report that to GStreamer.

Do the same in pipewiresink, which didn't even have the
pw_stream_set_error() call before, so the stream wasn't really going
into an error state at all.

Mudança Sumário

Diff

--- a/src/gst/gstpipewiresink.c
+++ b/src/gst/gstpipewiresink.c
@@ -532,8 +532,13 @@ on_state_changed (void *data, enum pw_stream_state old, enum pw_stream_state sta
532532 pw_stream_trigger_process (pwsink->stream);
533533 break;
534534 case PW_STREAM_STATE_ERROR:
535- GST_ELEMENT_ERROR (pwsink, RESOURCE, FAILED,
536- ("stream error: %s", error), (NULL));
535+ /* make the error permanent, if it is not already;
536+ pw_stream_set_error() will recursively call us again */
537+ if (pw_stream_get_state (pwsink->stream, NULL) != PW_STREAM_STATE_ERROR)
538+ pw_stream_set_error (pwsink->stream, -EPIPE, "%s", error);
539+ else
540+ GST_ELEMENT_ERROR (pwsink, RESOURCE, FAILED,
541+ ("stream error: %s", error), (NULL));
537542 break;
538543 }
539544 pw_thread_loop_signal (pwsink->core->loop, FALSE);
--- a/src/gst/gstpipewiresrc.c
+++ b/src/gst/gstpipewiresrc.c
@@ -681,9 +681,13 @@ on_state_changed (void *data,
681681 case PW_STREAM_STATE_STREAMING:
682682 break;
683683 case PW_STREAM_STATE_ERROR:
684- pw_stream_set_error (pwsrc->stream, -EPIPE, "%s", error);
685- GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED,
686- ("stream error: %s", error), (NULL));
684+ /* make the error permanent, if it is not already;
685+ pw_stream_set_error() will recursively call us again */
686+ if (pw_stream_get_state (pwsrc->stream, NULL) != PW_STREAM_STATE_ERROR)
687+ pw_stream_set_error (pwsrc->stream, -EPIPE, "%s", error);
688+ else
689+ GST_ELEMENT_ERROR (pwsrc, RESOURCE, FAILED,
690+ ("stream error: %s", error), (NULL));
687691 break;
688692 }
689693 pw_thread_loop_signal (pwsrc->core->loop, FALSE);