After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759033 - basesrc: When live, sending EOS after early runtime errors have no effect
basesrc: When live, sending EOS after early runtime errors have no effect
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-04 16:13 UTC by Nicolas Dufresne (ndufresne)
Modified: 2018-11-03 12:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-launch: Don't wait for the EOS message after errors (1.90 KB, patch)
2015-12-07 11:08 UTC, Sebastian Dröge (slomo)
none Details | Review

Description Nicolas Dufresne (ndufresne) 2015-12-04 16:13:39 UTC
Filing against v4l2src for now, as it's the only src I found that could reproduce this.

gst-launch-1.0 -e v4l2src ! identity error-after=1 ! fakesink
Comment 1 Nicolas Dufresne (ndufresne) 2015-12-04 16:17:42 UTC
Ok, same with all live sources:

gst-launch-1.0 -e fakesrc is-live=1 ! identity error-after=1 ! fakesink
Comment 2 Sebastian Dröge (slomo) 2015-12-07 11:07:43 UTC
I don't think this is a bug. After an ERROR message you can't expect to get an EOS message or anything really.
Comment 3 Sebastian Dröge (slomo) 2015-12-07 11:08:36 UTC
Created attachment 316874 [details] [review]
gst-launch: Don't wait for the EOS message after errors

After an ERROR message, it's not guaranteed that we'll get an EOS message or
anything really. The only thing that can be done at this point is to shut down
the pipeline immediately.
Comment 4 Nicolas Dufresne (ndufresne) 2015-12-07 14:23:30 UTC
Review of attachment 316874 [details] [review]:

::: tools/gst-launch.c
@@ +1121,3 @@
+        PRINT (_("EOS on shutdown enabled -- Forcing EOS on the pipeline\n"));
+        gst_element_send_event (pipeline, gst_event_new_eos ());
+        ignore_errors = FALSE;

Is this boolean still useful ?
Comment 5 Tim-Philipp Müller 2015-12-07 14:36:55 UTC
I believe at some point we did make an effort to make sure that elements driving the pipeline send an EOS event when they stop streaming after an error. It seems like desirable behaviour to me, is there any good reason not to do that?
Comment 6 Sebastian Dröge (slomo) 2015-12-07 14:39:24 UTC
It's a good idea but I think it's not a good idea to depend on that
Comment 7 Sebastian Dröge (slomo) 2015-12-08 16:30:12 UTC
The reason why this doesn't work here is that the error happens while the pipeline is only set to PAUSED. The EOS event reaches the sink, the sink prerolls but it waits with posting the EOS message until the pipeline is PLAYING.

EOS messages are only ever posted in PLAYING.
Comment 8 Nicolas Dufresne (ndufresne) 2015-12-12 03:54:18 UTC
(In reply to Sebastian Dröge (slomo) from comment #7)
> EOS messages are only ever posted in PLAYING.

Should gst-launch try to set the pipeline to PLAYING again before giving up ?
Comment 9 Sebastian Dröge (slomo) 2015-12-12 04:49:15 UTC
It will never reach PLAYING because of this error
Comment 10 Nicolas Dufresne (ndufresne) 2015-12-12 15:57:11 UTC
Ok, then shall we just merge your patch, or try to wait with a timeout ?
Comment 11 Sebastian Dröge (slomo) 2015-12-14 09:35:47 UTC
I let that for Tim and you to decide :) IMHO a timeout would indeed be nicer here
Comment 12 GStreamer system administrator 2018-11-03 12:31:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/143.