gstreamer/ext/smoothstreaming
Thiago Santos 2ce4f6a8e4 mssdemux: avoid downloading not-linked streams
When a stream gets a not-linked return, it will be marked as so and
won't download any more new fragments until a reconfigure event
is received. This will make mssdemux expose all pads, but only download
fragments for the streams that are actually being used.

Relying on the pads being linked/unlinked isn't enough in this scenario
as there might be an input-selector downstream that is actually discarding
buffers for a given linked pad.

When streams are switching, the old active stream can be blocked because
input-selector will block not-linked streams. In case the mssdemux's
stream loop is blocked pushing a buffer to a full queue downstream it will
never unblock as the queue will not drain (input-selector is blocking).

In this scenario, stream switching will deadlock as input-selector is
waiting for the newly active stream data and the stream_loop that would
push this data is blocked waiting for input-selector.

To solve this issue, whenever an stream is reactivated on a reconfigure
it will enter into the 'catch up mode', in this mode it can push buffers
from its download thread until it reaches the currrent GstSegment's position.
This works because this timestamp will always be behind or equal to the maximum
timestamp pushed for all streams, after pushing data for this timestamp,
the stream will go back to default and be pushed sequentially from the main
streaming thread. By this time, the input-selector should have already
released the thread.

https://bugzilla.gnome.org/show_bug.cgi?id=711849
2013-12-18 18:52:18 -03:00
..
gstdownloadrate.c smoothstreaming: port to 1.0 2013-05-07 21:09:49 -03:00
gstdownloadrate.h smoothstreaming: port to 1.0 2013-05-07 21:09:49 -03:00
gstmssdemux.c mssdemux: avoid downloading not-linked streams 2013-12-18 18:52:18 -03:00
gstmssdemux.h mssdemux: avoid downloading not-linked streams 2013-12-18 18:52:18 -03:00
gstmssmanifest.c mssdemux: fix setting codec_data when using WaveFormatEx 2013-11-27 09:26:36 -03:00
gstmssmanifest.h smoothstreaming: port to 1.0 2013-05-07 21:09:49 -03:00
gstsmoothstreaming-plugin.c dash/smoothstreaming: Remove unused debug category with the same name 2013-09-19 20:09:59 +02:00
Makefile.am smoothstreaming: port to 1.0 2013-05-07 21:09:49 -03:00