Commit graph

347 commits

Author SHA1 Message Date
Gianluca Gennari
9387365fc9 dashdemux: reworked the API to retrieve fragment timestamp, fragment duration and media presentation duration
This was necessary to support variable-duration Fragments.

in the new API:
- gst_mpd_client_get_current_position returns the timestamp of the NEXT fragment to download;
- gst_mpd_client_get_next_fragment_duration returns the duration of the next fragment to download;
- gst_mpd_client_get_media_presentation_duration returns the mediaPresentationDuration from the MPD file;

also there is a new internal parser function:
- gst_mpd_client_get_segment_duration extracts the constant segment duration from the MPD file
(only used when there is no SegmentTimeline syntax element in the current representation)

In gst_mpd_client_get_next_fragment, we set the timestamp/duration of the fragment just downloaded
copying the values from the corresponding GstMediaSegment.

TODO: rework SEEKING to support seeking across different Periods.
2013-05-08 18:14:25 -03:00
Gianluca Gennari
dc5d7d258e dashdemux: use effective segment duration to reschedule the streaming task
do not assume segment duration is constant

Conflicts:

	ext/dash/gstdashdemux.c
2013-05-08 18:14:22 -03:00
Gianluca Gennari
cfcd9ffac6 dashdemux: reworked gst_dash_demux_get_buffering_time() to return the effective buffering time
do not assume the Fragment duration is constant
2013-05-08 18:14:16 -03:00
Gianluca Gennari
0abd777257 dashdemux: complete support for Media Presentations with several Periods
- Periods are played in sequence, from PeriodStart to PeriodEnd
- seamless switching from one Period to the next one works fine;
- the 'new-segment' generation is broken, so if we need to switch pads for a new Period there is a crash;
2013-05-08 18:14:10 -03:00
Gianluca Gennari
9d09e99ebe mpdparser: initial support for Media Presentations made of several Periods
- build a list of the available Periods with their start and duration time
- add the list of GstStreamPeriod in the GstMpdClient data struct
- remove cur_period from GstMpdClient and introduce an API to get the current GstStreamPeriod
- several API clean-ups
2013-05-08 18:14:10 -03:00
Gianluca Gennari
53f383eff0 dashdemux: reworked caps detection
also reworked the API to extract audio/video parameters from the manifest file
(mimeType, width, height, rate, num channels)
2013-05-08 18:14:06 -03:00
Gianluca Gennari
fe05060044 dashdemux: do not send bogus duration messages when mediaPresentationDuration is unknown 2013-05-08 18:14:03 -03:00
David Corvoysier
41733d8296 Fixed wrong index in fragments 2013-05-08 18:14:03 -03:00
Gianluca Gennari
8e9ba056d7 mpdparser: fix memory leak in gst_mpd_client_get_next_fragment_set()
we have to free next_fragment_uri
2013-05-08 18:14:03 -03:00
David Corvoysier
cf0ab8e1f3 Removed unused function 2013-05-08 18:14:03 -03:00
David Corvoysier
84c8de8ab6 Seek event handling cleanup 2013-05-08 18:14:02 -03:00
Gianluca Gennari
b580ee8cd7 dashdemux: fix playing of single-segment media streams
other fixes:
- fixed a buffering bug: now we stop buffering when we reach the end of manifest
- now gst_mpd_client_get_target_duration() always returns a valid duration
(in case of single-segment streams, we return either Period duration or mediaPresentation duration)
TODO: support SegmentTimeline
2013-05-08 18:14:02 -03:00
Gianluca Gennari
5b830c3c91 dashdemux: unref caps in function need_add_header() 2013-05-08 18:13:58 -03:00
Gianluca Gennari
cd84aaa9aa dashdemux: fix memory leak in gst_dash_demux_get_next_header() 2013-05-08 18:13:58 -03:00
David Corvoysier
95ee452625 We now only accept actual manifest files, and not any XML file 2013-05-08 18:13:58 -03:00
David Corvoysier
29c62f4780 Fixed state machine (again) 2013-05-08 18:13:57 -03:00
David Corvoysier
a7ad12e208 Code refactoring 2013-05-08 18:13:57 -03:00
David Corvoysier
f4756f7cb0 Fixed state machine 2013-05-08 18:13:57 -03:00
David Corvoysier
7f2207732b Improve consistency of the tasks shutdown code 2013-05-08 18:13:57 -03:00
David Corvoysier
28aaff747c Added missing g_list_free 2013-05-08 18:13:57 -03:00
David Corvoysier
30fece810f Do not answer to URI queries 2013-05-08 18:13:56 -03:00
David Corvoysier
0e2c3ffc0b Try queries upstream if we cannot process them 2013-05-08 18:13:56 -03:00
David Corvoysier
089daeba1b Renamed demux->next_stream in demux->next_push 2013-05-08 18:13:56 -03:00
David Corvoysier
943f4fa152 Inlined one-line utility funciton that was called only once 2013-05-08 18:13:56 -03:00
David Corvoysier
3cb7b12cbe Fixed regression after the introduction of the multi-screen support, preventing the pipeline from stopping properly 2013-05-08 18:13:56 -03:00
David Corvoysier
6f5d6f91ff Modified log level of shutdown message 2013-05-08 18:13:56 -03:00
David Corvoysier
90be873ee1 Comments: We don't select a single representation, but a representation for each stream Code: cleanup of gst_get_next_fragment (also renamed in gst_get_next_fragment_set) 2013-05-08 18:13:56 -03:00
David Corvoysier
d3c4c48923 Removed debug trace 2013-05-08 18:13:56 -03:00
David Corvoysier
6be9a30ad8 Added introduction and general design notes 2013-05-08 18:13:56 -03:00
David Corvoysier
35c04708ba Fixed wrong comment 2013-05-08 18:13:56 -03:00
David Corvoysier
6255b2762f Documented gst_dash_demux_download_loop 2013-05-08 18:13:55 -03:00
David Corvoysier
5b6bede189 Commented gst_dash_demux_stream_loop 2013-05-08 18:13:55 -03:00
David Corvoysier
b9d6796cb5 Commented needs_pad_switch 2013-05-08 18:13:55 -03:00
David Corvoysier
54fcbf89f1 Documented the representation switch mechanism 2013-05-08 18:13:55 -03:00
David Corvoysier
7764efb761 Replaced references to playlist (HLS) by references to manifest (DASH) 2013-05-08 18:13:55 -03:00
David Corvoysier
ad22e0da6d Renamed gst_dash_demux_switch_playlist to gst_dash_demux_select_representation and added comments 2013-05-08 18:13:55 -03:00
David Corvoysier
204ea9fc67 Removed obsolete comment 2013-05-08 18:13:55 -03:00
David Corvoysier
ae32818105 Applied gst-indent 2013-05-08 18:13:55 -03:00
Gianluca Gennari
375634f669 mpdparser/dashdemux: fixed get_width, get_height, get_audio_rate, get_num_audio_channels API functions
the actual values now can be extracted also from the AdaptationSet element;
checking NULL structs for better robustness;
2013-05-08 18:13:55 -03:00
Gianluca Gennari
98a41f2c9e mpdparser: added support for single-segment streams with the URL encoded in the baseURL syntax element 2013-05-08 18:13:54 -03:00
Gianluca Gennari
dd198bc86d mpdparser: fixed parsing of SegmentList syntax element, and eliminated Represention node list from Period node
SegmentList nodes are allowed into Period, AdaptationSet or Representation nodes
and there is at most 1 element, so no need to keep a list;

Period nodes cannot have any Represention elements, as AdaptationSet nodes are mandatory;
this breaks compatibility with some legacy DASH test sequences.
2013-05-08 18:13:48 -03:00
hzakari
ec44485510 Optimize the two functions that return the number and the list of languages in a single function 2013-05-08 18:13:48 -03:00
Hamid ZAKARI
fab388c9fd Add the headers to the adaptationsets segments if any one of these changed representation 2013-05-08 18:13:46 -03:00
Hamid ZAKARI
713d02b81a Support Multi languages (need a decodebin2 patch) 2013-05-08 18:13:45 -03:00
Hamid ZAKARI
a4ac4a3117 Remove the "TODO" comment 2013-05-08 18:13:45 -03:00
David Corvoysier
3c937636ee Renamed LICENSE into COPYING 2013-05-08 18:13:44 -03:00
David Corvoysier
6fc0db0e0b Initial import of gstdashdemux sources 2013-05-08 18:13:43 -03:00