Commit graph

23 commits

Author SHA1 Message Date
Philippe Normand
73721ad4e9 mssdemux: improved live playback support
When a MSS server hosts a live stream the fragments listed in the
manifest usually don't have accurate timestamps and duration, except
for the first fragment, which additionally stores timing information
for the few upcoming fragments. In this scenario it is useless to
periodically fetch and update the manifest and the fragments list can
be incrementally built by parsing the first/current fragment.

https://bugzilla.gnome.org/show_bug.cgi?id=755036
2016-11-29 14:43:41 +01:00
Matthew Waters
e9178fa082 smoothstreaming: implement adaptivedemux's get_live_seek_range()
Allows seeking through the available fragments that are still available
on the server as specified by the DVRWindowLength attribute in the
manifest.

https://bugzilla.gnome.org/show_bug.cgi?id=774178
2016-11-11 00:18:35 +11:00
Thiago Santos
ac2734f5cb mssdemux: implement snap seeking
Implement snap seek flags handling in stream_seek to allow the
parent class to handle it for us

https://bugzilla.gnome.org/show_bug.cgi?id=759158
2016-02-04 14:20:16 -03:00
Thiago Santos
731ab94cc3 adaptivedemux: handle snap seeks
Adaptive demuxers need to start downloading from specific positions
(fragments) for every stream, this means that all streams can snap-seek
to a different position when requested. Snap seeking in this case will
be done in 2 steps:

1) do the snap seeking on the pad that received the seek event and
   get the final position

2) use this position to do a regular seek on the other streams to
   make sure they all start from the same position

More arguments were added to the stream_seek function, allowing better control
of how seeking is done. Knowing the flags and the playback direction allows
subclasses to handle snap-seeking.
And also adds a new return parameter to inform of the final
selected seeking position that is used to align the other streams.

https://bugzilla.gnome.org/show_bug.cgi?id=759158
2016-02-04 14:05:08 -03:00
Philippe Normand
ae7d938842 mssdemux: PlayReady WRM parsing support
If the manifest has a ProtectionHeader node then parse it and emit
protection events according to the specified protection SystemID.

https://bugzilla.gnome.org/show_bug.cgi?id=753613
2015-09-30 16:49:11 +01:00
Thiago Santos
8c49c79d7e mssdemux: add live support
Implement the functions of adaptivedemux to have live support
enabled. This allows mssdemux to refresh the Manifest periodically
2014-12-04 19:52:33 -03:00
Thiago Santos
b418c88b26 mssdemux: port to adaptivedemux base class 2014-12-04 14:24:42 -03:00
Thiago Santos
613b110b25 mssdemux: seeks in the manifest never fail
Set void as the return and remove error handling as it could
never fail
2014-11-07 19:30:18 -03:00
Guillaume Desmottes
d6a9f17d8a mssmanifest: store the language of the stream
https://bugzilla.gnome.org/show_bug.cgi?id=712358
2013-12-18 18:52:19 -03:00
Thiago Santos
4545f4bf4e smoothstreaming: port to 1.0 2013-05-07 21:09:49 -03:00
Thiago Santos
255eb4b161 mssdemux: use streams bitrate individually
connection setup times seem to matter when measuring the download
rate of different streams. Streams with longer fragments have a
*relatively* lower connection setup time and achieve higher bitrates.

Using the average seems unfair here, so use each stream's measured bitrate
to select its best quality option.
2013-05-07 21:09:48 -03:00
Thiago Santos
aa1713068a mssdemux: implement live streams handling
Live streams force the demuxer to keep reloading the Manifest from
time to time, as the new fragments are being added as they are recorded.
The demuxer should also try to keep up and detect when it had to skip
fragments, marking the discont flag when that happens.

Curiously, the spec doesn't seem to mention when/how a live stream is supposed
to end, so keep trying downloads until the demuxer errors out.
2013-05-07 21:05:12 -03:00
Thiago Santos
b9aec0ad0d mssdemux: add connection-speed property
This speed limits the maximum bitrate of streams. Currently it
is only read when starting the pipeline, but it should be used
for switching bitrates during playback to adapt to network
changes.
2013-05-07 21:05:11 -03:00
Thiago Santos
4b6900999a mssdemux: add an 'active' flag to manifest stream
mssdemux should set the streams it has exposed as active so that
the manifest won't use the non-active streams to compute total bitrates
or providing fragments
2013-05-07 21:05:11 -03:00
Thiago Santos
9b3f67c5b0 mssdemux: set timestamp and duration to fragment buffers
We can get those from the manifest and helps downstream to know
the fragment start time after a seeking operation
2013-05-07 21:05:11 -03:00
Thiago Santos
cb7e3d1f3b mssdemux: initial implementation of seek event handling
Adds basic handling for seek in time events. Needs to cooperate
with the downstream qtdemux so that it forwards the seeks and
the corresponding newsegments
2013-05-07 21:05:11 -03:00
Thiago Santos
33d872916b mssdemux: handle src pad queries fir duration and latency
Add a src pad query handler to get the duration from the manifest
and report it upstream.

Also adds a simple handler for latency queries
2013-05-07 21:05:11 -03:00
Thiago Santos
3f15c9b05a mssdemux: add timescale to the caps
This is important for downstream to properly timestamp the samples

The default value is 10000000, but this can be set in the stream
or at the top-level manifest entry
2013-05-07 21:05:10 -03:00
Thiago Santos
ca4e5c34cb smoothstreaming: refactor structure names and implement url fetching
Use shorter names for the MSS manifest helper structure and functions.

Also continues the implementation of the stream fetching and pushing loop.
Now it uses the base url correctly and already fetches and pushes the fragments
downstream
2013-05-07 21:05:10 -03:00
Thiago Santos
6b63a7dc81 mssdemux: more manifest parsing and helper functions
Now the mss manifest is able to generate the files urls
2013-05-07 21:05:10 -03:00
Thiago Santos
5291985efe mssdemux: pad exposing initial implementation
Does some basic parsing of the stream caps and adds a pad for
each stream detected in the manifest
2013-05-07 21:05:10 -03:00
Thiago Santos
72b05c0051 mssdemux: add manifest parsing
Continued implementing:
1) parse the manifest with libxml2
2) detect stream types
2013-05-07 21:05:10 -03:00
Thiago Santos
95e87fbee9 smoothstreaming: stubs for mssdemux
Just the stubs for mssdemux element.
Also add some useful code from hlsdemux that we intend to reuse
2013-05-07 21:05:10 -03:00