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 755230 - dashdemux: need for task_cancelled variable
dashdemux: need for task_cancelled variable
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-18 16:26 UTC by Florin Apostol
Modified: 2015-10-29 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Florin Apostol 2015-09-18 16:26:55 UTC
To stop the stream download task, a function can set the stream->demux->cancelled or stream->download_finished variables and signal the task. But a dash task can perform 3 downloads (header, index and media segment) (gst_adaptive_demux_stream_download_uri is called 3 times each time the task is run) so we need a separate flag to signal that download must stop and thread must exit as soon as possible.

stream->demux->cancelled cannot be used because that is set only when all streams must stop. We cannot use that when trying to stop only tasks from old_streams list.

stream->download_finished cannot be used because that signals normal thread operation and after a sleep on it the thread is allowed to perform a second download and sleep again.

So, in order to force a demux task to exit without waiting on new downloads, we need a new variable (e.g. task_cancelled). It will be set to true from gst_adaptive_demux_stream_free and gst_adaptive_demux_stop_tasks. The gst_adaptive_demux_stream_download_uri function should check this at entry and exit with error if it is set.
Comment 1 Florin Apostol 2015-10-29 11:35:38 UTC
implemented in https://bugzilla.gnome.org/show_bug.cgi?id=755169