Commit graph

22 commits

Author SHA1 Message Date
Thiago Santos
80c6973319 dashdemux: fix seeking on multiple streams
Each stream has its own durations and timestamps, the fragment number
is different for each stream when seeking, so the seek has to be done
for all streams, rather than on a single stream and propagated to
others
2013-05-08 18:14:34 -03:00
Thiago Santos
a1447a8ede dash: fixing build warnings
Also running through gst-indent
2013-05-08 18:14:33 -03:00
Louis-Francis Ratté-Boulianne
04004cdf65 dashdemux: various fixes 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
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
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
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
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
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
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
779bf29879 mpdparser: added lang attribute to ProgramInformation node 2013-05-08 18:13:52 -03:00
Gianluca Gennari
94644fa82e mpdparser: added support for Accessibility, Role, Rating, Viewpoint elements to AdaptationSet node
those are DescriptorType elements, so they are just parsed and dumped for now;
2013-05-08 18:13:50 -03:00
Gianluca Gennari
416ea67979 mpdparser: support multiple ProgramInformation nodes
now we keep a list of ProgramInformation nodes for each Period node
2013-05-08 18:13:48 -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
Gianluca Gennari
7330bbfa7a mpdparser.c/.h: changed license from dual MIT/LGPL 2.0 to LGPL 2.1
uniformed licencinsing to the other libraries in the dashdemux project
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
713d02b81a Support Multi languages (need a decodebin2 patch) 2013-05-08 18:13:45 -03:00
David Corvoysier
6fc0db0e0b Initial import of gstdashdemux sources 2013-05-08 18:13:43 -03:00