Commit graph

13969 commits

Author SHA1 Message Date
David Corvoysier
c901f610c2 Applied gst-indent 2013-05-08 18:14:33 -03:00
David Corvoysier
582aa51fd6 Replaced URL pointing to obsolete Klagenfurt MPD by a new one 2013-05-08 18:14:33 -03:00
Gianluca Gennari
c988ee3a4b mpdparser: fix escape sequence in URL template resolving 2013-05-08 18:14:33 -03:00
Gianluca Gennari
470c860ffa mpdparser: do not switch pads when bitstreamSwitching = true 2013-05-08 18:14:32 -03:00
Gianluca Gennari
e0c55050e1 dashdemux: complete support for manifest file updates 2013-05-08 18:14:32 -03:00
Gianluca Gennari
7092a9c1ac dashdemux: add support for manifest file updates
- the MPD file is updated in the download loop (only if we have a "dynamic" MPD and minimumUpdatePeriod is valid);
- properly LOCK/UNLOCK the GstMpdClient;
2013-05-08 18:14:32 -03:00
Gianluca Gennari
7371b7997b dashdemux: new API to set/get segment index and period index
TODO: rework segment selection to support Representations or Adaptation Sets with segments not aligned
2013-05-08 18:14:32 -03:00
Gianluca Gennari
e7fad847bb dashdemux: new API to load the stream Period with a given index
this avoids to fiddle with stream internals in the code
2013-05-08 18:14:32 -03:00
Gianluca Gennari
9d43e33319 dashdemux: implement seeking across Periods 2013-05-08 18:14:32 -03:00
David Corvoysier
f7c6403432 Applied gst-indent 2013-05-08 18:14:32 -03:00
David Corvoysier
e323c099a0 By default, do not forward pad queries upstream, because it may have unforessen side-effects (forwarding the new 1.0 GST_CAPS query would prevent pad linking for instance) 2013-05-08 18:14:32 -03:00
Olivier Blin
d058a7f2b2 plugin: register as dashdemux instead of fragmented
This fixes conflicts with the HLS plugin, which is also named
fragmented.
When building its registry, gstreamer was picking one or the other
between hls and dashdemux.
2013-05-08 18:14:31 -03:00
Gianluca Gennari
895e804a86 dashdemux: check if we have received the MPD file in the proper way 2013-05-08 18:14:31 -03:00
Gianluca Gennari
8f13f246e0 mpdparser: silence warning 2013-05-08 18:14:31 -03:00
Olivier Blin
0b5eb519e7 dashdemux: fix printing buffering time and download rate/size
This was broken on armv7.
2013-05-08 18:14:31 -03:00
Olivier Blin
bd2784ffbb dashdemux: fix unused-but-set variable 2013-05-08 18:14:30 -03:00
Olivier Blin
cbebb01f23 dashdemux: use new gst_mpd_client_get_next_fragment_duration API
This fixes build that has been broken by commit
fb9aeac6552021b176a4c4bd07265e02a0b70e0f.

gst_mpd_client_get_target_duration has been removed, and
gst_mpd_client_get_next_fragment_duration should be used instead.
2013-05-08 18:14:29 -03:00
Gianluca Gennari
f728e424b2 dashdemux: remove FIXME comment
pad switching across multiple periods works perfectly fine now
and it is done only when there is a change in the CAPS
2013-05-08 18:14:29 -03:00
Gianluca Gennari
e96cc18ab9 dashdemux: send new-segment events to all pads 2013-05-08 18:14:27 -03:00
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
Olivier Blin
ba3bd1c69a mpdparser: support BaseURL for SegmentURL using mediaRange
This is used in big_buck_bunny_CappedVBR_Multirate_4s_0_AudioVideo_MainProfile.mpd
2013-05-08 18:14:10 -03:00
Olivier Blin
767a5ebed0 mpdparser: factorize adding range parameter to URL 2013-05-08 18:14:08 -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
Gianluca Gennari
fba69179e4 mpdparser: support SegmentTimeline syntax also for list-based media segment generation 2013-05-08 18:14:03 -03:00
Gianluca Gennari
362b5e9446 mpdparser: add support for SegmentTimeline syntax elements
build the list of segments to be played using the SegmentTimeline syntax, if present
bugfixes:
- for dynamic MPD files, when mediaPresentationDuration is not present use minimumUpdatePeriod instead
- do not add a spurious '$' when building an URL from a template like "$Bandwidth$/init.mp4v"
- introduce gst_mpd_client_add_media_segment() to avoid code duplication
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
5ade664680 uridownloader: deleted useless declaration of gst_uri_downloader_free() 2013-05-08 18:14:00 -03:00
Gianluca Gennari
122f10669f uridownloader: when possible, reuse existing element to download a new URI
previously a new element was allocated for each media segment, and it was never freed
2013-05-08 18:14:00 -03:00
Gianluca Gennari
5b830c3c91 dashdemux: unref caps in function need_add_header() 2013-05-08 18:13:58 -03:00
Gianluca Gennari
3726ff73ad dashdemux: fix extraction of SegmentTemplate->initialization in gst_mpd_client_get_next_header()
now the following MPD files are properly supported:

http://dash.edgesuite.net/adobe/hdworld_dash/HDWorld-1600.mpd
http://dash.edgesuite.net/adobe/hdworld_dash/HDWorld.mpd
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
763f4c3fc3 Added a typefind helper for DASH: this commit should be reverted as soon as a proper patch has been submitted to gst-plugins-base 2013-05-08 18:13:57 -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