Discussion:
[Bug 752815] New: [basesrc] Events aren't pushed if basesrc has no pending buffers to send
"GStreamer" (GNOME Bugzilla)
2015-07-24 09:17:30 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

Bug ID: 752815
Summary: [basesrc] Events aren't pushed if basesrc has no
pending buffers to send
Classification: Platform
Product: GStreamer
Version: git master
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gstreamer (core)
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@igalia.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

Use case:

In some later stage of the pipeline I want to detect when an append has been
fully processed. Timeouts aren't a very robust solution, and EOS isn't an
alternative either (I don't want to reset the pipeline). The best alternative
is to send a custom downstream event after the append, signaling that no more
data will be fed by now. That event will be detected by a probe later in the
pipeline.

Problem:

However, basesrc doesn't emit the custom event until a new chunk of data is
appended after the event (but I don't want to do that). The primary reason for
not emitting the event is that gst_base_src_loop() is stalled waiting for new
buffers in a call to gst_base_src_getrange().
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-24 09:20:57 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

--- Comment #1 from Enrique Ocaña González <***@igalia.com> ---
Created attachment 308066
--> https://bugzilla.gnome.org/attachment.cgi?id=308066&action=edit
Patch 1/2

This patch partially solves the problem, but not in all the cases. Some review
and guidance would be great.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-24 09:25:29 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

--- Comment #2 from Enrique Ocaña González <***@igalia.com> ---
Created attachment 308067
--> https://bugzilla.gnome.org/attachment.cgi?id=308067&action=edit
patch 2/2

This patch complements the previous one, checking have_events again after the
create function returns, possibly waken by the GST_EVENT_CUSTOM_DOWNSTREAM case
in gst_base_src_send_event().
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-24 09:27:53 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

Philippe Normand <***@base-art.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@base-art.net
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-24 09:31:26 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

Tim-Philipp Müller <***@zen.co.uk> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@zen.co.uk
Summary|[basesrc] Events aren't |basesrc: events don't get
|pushed if basesrc has no |pushed if basesrc has no
|pending buffers to send |pending buffers to send

--- Comment #3 from Tim-Philipp Müller <***@zen.co.uk> ---
A unit test would be great too :)
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2015-07-24 17:55:51 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

--- Comment #4 from Enrique Ocaña González <***@igalia.com> ---
Created attachment 308096
--> https://bugzilla.gnome.org/attachment.cgi?id=308096&action=edit
Unit test

This unit test clearly fails with a timeout when the event is not received.
With my patches applied, the event is received.

However, even though the last step of the test inserts an EOS (I can see it in
the logs), it seems to be never processed. Therefore, the test doesn't succeed
either.

I work in a cross-build environment and can't run the tests directly. I use
this command to manually run the basesrc test after copying it to the device:

GST_DEBUG="check:INFO,fdsrc:7,basesrc:7" GST_STATE_IGNORE_ELEMENTS="" ./basesrc
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-19 17:55:46 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

Nicolas Dufresne (stormer) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #308066|none |needs-work
status| |

--- Comment #5 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
Review of attachment 308066:
--> (https://bugzilla.gnome.org/review?bug=752815&attachment=308066)

This patch needs to be rebased now, sorry. Careful, the locking have changed.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-19 17:56:55 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

Nicolas Dufresne (stormer) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@ndufresne.ca
Depends on| |785142

--- Comment #6 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
This patch, when rebased, will have the same issue reported by #785142, so
adding a dep on it (even though not a blocker, it's just so we remember there
is a link).
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-11-03 12:29:14 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815

GStreamer system administrator <***@gstreamer.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |OBSOLETE

--- Comment #7 from GStreamer system administrator <***@gstreamer.net> ---
-- 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/124.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2018-11-03 12:42:09 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=752815
Bug 752815 depends on bug 785142, which changed state.

Bug 785142 Summary: basesrc: Sending eos maybe block for a small period or if pipeline is PAUSED
https://bugzilla.gnome.org/show_bug.cgi?id=785142

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |OBSOLETE
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...