Commit graph

241 commits

Author SHA1 Message Date
Brendan Long
9b94f29261 dash: Remove obsolete README.
https://bugzilla.gnome.org/show_bug.cgi?id=738848
2014-10-23 10:26:54 +02:00
David Waring
29f1f4533e dash: Use GstUri to join URIs 2014-09-29 12:22:19 +03:00
Matthieu Bouron
22c7559152 dashdemux: mark first buffer as discont after restarting a download task
Mark first buffer as discont after restarting a download task, so
downstream can reset its state to properly handle the new fragment.

Related issue: https://bugzilla.gnome.org/show_bug.cgi?id=736318

https://bugzilla.gnome.org/show_bug.cgi?id=736319
2014-09-24 13:30:20 -03:00
Thiago Santos
2273c15f15 dashdemux: push a time segment when restarting streaming
This should inform demuxers/decoders downstream that the stream is
about to start from a new position and they should flush accordingly

https://bugzilla.gnome.org/show_bug.cgi?id=736319
2014-09-24 12:35:37 -03:00
George Kiagiadakis
55032ae5fe dashdemux: synchronize with the download loop thread to signal it to continue
If EOS or ERROR happens before the download loop thread has reached its
g_cond_wait() call, then the g_cond_signal doesn't have any effect and
the download loop thread stucks later.

https://bugzilla.gnome.org/show_bug.cgi?id=735663
2014-09-18 13:38:25 -03:00
Thiago Santos
24c99712a8 dashdemux: fix clearing of eos state in pads
The internal pad still keeps its EOS flag and event as it can be assigned
after the flush-start/stop pair is sent. The EOS is assigned from the streaming
thread so this is racy.

To be sure to clear it, it has to be done after setting the source to READY to
be sure that its streaming thread isn't running.

https://bugzilla.gnome.org/show_bug.cgi?id=736012
2014-09-18 12:14:30 -03:00
Sebastian Dröge
1ce7d89868 dash: Actually retry 3 times as advertised instead of 2 2014-09-15 11:59:49 +03:00
Matthieu Bouron
4ed7c7919a dashdemux: improve position detection when a download restart
Query other src pads before falling back to the position of the last
known pushed segment (which can be far ahead in time).

https://bugzilla.gnome.org/show_bug.cgi?id=736421
2014-09-11 18:25:19 -03:00
Sebastian Dröge
51a9e13bf2 dashdemux: Don't send flush events to deactivated pads
https://bugzilla.gnome.org/show_bug.cgi?id=736012
2014-09-04 18:21:25 +03:00
Tim-Philipp Müller
334a71506c dashdemux: fix abort in error code path with newer glib
Don't forget to unlock mpd client again when erroring out.
Fixes abort when g_mutex_clear() is called on a locked mutex.
2014-08-21 16:25:55 +01:00
Thiago Santos
1cabb3b5a5 dashdemux: unref pad reference when removing internal source in error
Avoids leaking the pad in error situations
2014-08-19 17:17:33 -03:00
Thiago Santos
4afa05e567 dashdemux: read language from ContentComponent node as a fallback
If the language is not specified in the AdaptationSet, use the ContentComponent
node to get it. We only get it if there is only a single ContentComponent as
it doesn't seem clear on what to do if there are multiple entries

https://bugzilla.gnome.org/show_bug.cgi?id=732237
2014-08-19 16:02:52 -03:00
Matthieu Bouron
82fdb3aefc dashdemux: push language code tag
Language code tag is retrieved from the AdaptationSet language
property.

https://bugzilla.gnome.org/show_bug.cgi?id=732237
2014-08-19 15:34:01 -03:00
George Kiagiadakis
ea90ceac01 dashdemux: support downloading segments in reverse order
When a seek with a negative rate is requested, find the target
segment where gstsegment.stop belongs in and then download from
this segment backwards until the first segment.

This allows proper reverse playback.
2014-08-07 16:52:37 +03:00
Thiago Santos
24815a5feb dashdemux: return the error to the source immediately to stop faster
When flushing, this will prevent dashdemux from trying to download more
fragments or more chunks of the same fragment before stopping.

Also improves the error handling to not transform everything non-ok into
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=734014
2014-08-01 10:37:15 -03:00
Sebastian Dröge
ae679506b1 dashdemux: Always use the redirect target to resolve relative URIs
But redownload the playlists from the original URI if it's not
a permanent redirect.
2014-05-28 12:47:51 +02:00
Thiago Santos
16d969b945 dashdemux: mpdparser: properly unref gstdatetime
Avoid leaking the GstDateTime instances when summing dates

CID #1212143
2014-05-13 11:22:58 -03:00
Thiago Santos
288e8d5c0e dashdemux: mpdparser: avoid double free of segment timeline node
The parsing function already frees the old value (if any), avoid a double
free by not freeing it before calling the function without setting the
pointer to NULL

Coverity ID: 1212178
2014-05-13 10:45:29 -03:00
Thiago Santos
64bea0252b dashdemux: mpdparser: avoid double free
The _parse_url function already frees the previous pointer, avoid
freeing it before without setting to null or we have a double free.

Coverity ID: 1212181
Coverity ID: 1212180
Coverity ID: 1212179
2014-05-13 10:13:37 -03:00
Edward Hervey
651a4ae2e7 dash: Don't leak GstActiveStream
CID #1212142
2014-05-13 13:52:48 +02:00
Thiago Santos
4c59f7df4c dashdemux: initialize the mutex and cond for fragment download 2014-05-12 16:27:37 -03:00
Thiago Santos
21b1d37023 dashdemux: remove unused stream uridownloader
The uridownloader for the stream fragments isn't used anymore.
2014-05-11 15:26:45 -03:00
Thiago Santos
a5b3ba09b8 dashdemux: deprecate max-buffering-time property
It is not used as dashdemux doesn't have a internal buffer
for fragments anymore
2014-05-07 01:00:50 -03:00
Thiago Santos
e9638fe3fd dashdemux: removing old unused code
The 'catch up mode' isn't needed anymore since dashdemux
is downloading and pushing from the same thread
2014-05-07 01:00:49 -03:00
Thiago Santos
5df2edf80c dashdemux: remember to set starting fragment to new fragments 2014-05-07 01:00:49 -03:00
Thiago Santos
733c7c0f16 dashdemux: handle a few more error cases
related to missing plugins, bad URI and a lockup on dealing with
errors from the source.
2014-05-07 01:00:49 -03:00
Thiago Santos
173c353716 dashdemux: Only set timestamp to the first buffer of fragments
Setting it to the other parts of the fragment is slightly wrong
and misleading as it isn't accurate enough.
2014-05-07 01:00:49 -03:00
Thiago Santos
f09dd7e7a5 dashdemux: handle error messages from the sources
Set up a message handling function to be able to catch errors
from the source element and signal the cond to allow the download
loop to retry the download.
2014-05-07 01:00:49 -03:00
Thiago Santos
15952dcd8e dashdemux: check for errors between downloads
To abort earlier in case of failures
2014-05-07 01:00:49 -03:00
Thiago Santos
b5998a4c3b dashdemux: Always accept the latency configure event
Upstream or internal elements are irrelevant and we should
always succeed.
2014-05-07 01:00:49 -03:00
Thiago Santos
d6671e73a6 dashdemux: measure download rate just like hlsdemux
new bitrate = (old bitrate + (last fragment bitrate * 3)) / 4
2014-05-07 01:00:49 -03:00
Thiago Santos
bed3d66605 dashdemux: remove uridownloader from fragments download
Instead, use a source element linked to a ghostpad to provide
smaller buffers and more granular control for downstream
buffering elements while also reducing startup latency
2014-05-07 01:00:49 -03:00
Sebastian Dröge
bb8227e279 dashdemux: Update for uri downloader API changes 2014-05-05 09:41:51 +02:00
Sebastian Dröge
f910ffb637 dashdemux: Update for URI downloader API changes
And include the MPD file as referer in requests, and make sure
to set refresh=TRUE when updating the MPD.
2014-05-02 10:39:22 +02:00
Vincent Penquerc'h
2e940ba253 dashdemux: do not ignore failure to register typefinder
Coverity 1139629
2014-04-10 17:52:02 +01:00
Vincent Penquerc'h
2dd898793e dashdemux: fix time leak
Coverity 1147016
2014-04-10 17:48:03 +01:00
Vincent Penquerc'h
59654c68ee dashdemux: remove dead code and variable
A recent commit made stream not able to be NULL, ending up with
a flag being always set to FALSE when it matters.

Coverity 1146968, 1147012
2014-04-10 17:46:32 +01:00
Wim Taymans
6c014f7e36 mpdparse: only add location when node existed
Actually return FALSE when the location node was non-existing
Only add the location node when it existed
2014-04-03 11:48:07 +02:00
Matthieu Bouron
820685409e dashdemux: use correct print format for gint64
https://bugzilla.gnome.org/show_bug.cgi?id=727385
2014-03-31 14:50:17 +02:00
Sebastian Dröge
b47a4faf5f ext: Use Codec/Demuxer/Adaptive for the adaptive streaming demuxers 2014-02-23 00:11:04 +01:00
Chris Bass
6342d225bf dashdemux: ensure segments aren't fetched before they're available
Incorrect time scaling in gst_dash_demux_wait_for_fragment_to_be_available()
means that media segments are fetched before their availablity time. This
patch fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=724875
2014-02-22 16:29:13 +01:00
Chris Bass
462c04cade dashdemux: initialise demux->last_manifest_update
demux->last_manifest_update is not initialised at startup, with the
effect that live manifests are reloaded immediately after the download
loop begins. This patch fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=724790
2014-02-20 20:26:25 +01:00
Sebastian Dröge
48ba499ed2 dashdemux: Download MPD with compression, the fragments without 2014-02-12 13:10:50 +01:00
Sebastian Dröge
3a5abc233d ext: Update for GstUriDownloader API changes 2014-02-11 14:18:32 +01:00
Thiago Santos
3d2f3bcf62 dashdemux: remove unnecessary variable
Instead of using 2 indexes that were actually the same, use only
one. Saves a variable.
2014-01-09 09:13:48 -03:00
Thiago Santos
cea909b877 dashdemux: fix seeking when the mpd uses a segment template
Remove the dashdemux seeking function to use the one implemented
in mpdparser as it is more complete. This also makes dashdemux not
crash when seeking on streams that use segment templates.
2014-01-09 09:11:23 -03:00
Thiago Santos
da329b44a4 dashdemux: remove stream loop thread
Download and push from the same task, makes code a lot simpler
to maintain. Also pushing from separate threads avoids deadlocking
when gst_pad_push blocks due to downstream queues being full.
2013-12-24 17:07:52 -03:00
Thiago Santos
d353d229b1 dash: detect EOS when segments are generated by template
Use the Period duration do know when to end the stream
2013-12-24 17:07:52 -03:00
Thiago Santos
5b1eda95eb dashdemux: do not try to access buffer after losing the ref
For obvious reasons
2013-12-24 17:07:52 -03:00
Thiago Santos
be54766975 dashdemux: use a separate GstUriDownloader per stream
Avoids one download having to wait for another to finish
before starting
2013-12-24 17:07:52 -03:00