Commit Graph

11 Commits

Author SHA1 Message Date
Timothy Drews 4a5738d881 Support years and months in xs:duration strings.
Assume a year is 365 days and a month is 30 days. Supporting years and
months is useful as some MPDs that describe live content specify
@minimumUpdatePeriod in terms of years; here, an accurate number of
seconds is not needed, but the duration string should not be treated as
invalid.

Change-Id: Ic4ea26f5a7572711e047c237dced33d80a698840
2015-03-06 13:25:12 -08:00
Timothy Drews 27ed78203a Merge Segment{Base, List, Template} across levels.
* Instead of overriding SegmentBase, SegmentList, etc. between
  levels (e.g., from Period to AdaptationSet) merge them, but
  prefer elements and attributes from inner levels.
* Refactor MPD parsing unit tests into separate files.
* Rewrite SegmentBase unit tests, add SegmentList, and
  SegmentTemplate unit tests.

Change-Id: I3fdb7657bb9f468e10f63e47e9a52fbf8ebbd40b
2015-03-05 01:20:07 +00:00
Timothy Drews b244def2f4 Fix-up startNumber behavior.
* Revert 5c7fca90b6, which intended
  to allow startNumber to be 0, and maintain the previous behavior,
  which requires startNumber to begin at 1 (this appears to be in-line
  with the MPD spec).
* Correctly compute the $Time$ placeholder.
* Rename firstSegmentNumber to startNumber to clarify code.

Closes #10

Change-Id: I9b565edc9e23b9ad7c6bc62829d6b0ab565008a4
2015-02-13 18:45:59 +00:00
Timothy Drews 7e5983feac Change SourceBuffer timestamp offset calculation.
* Adjust SourceBuffer timestamps forward by the Period's
  start time and backwards by the Representation's
  presentationTimeOffset.
* Incorporate the start time of a Representation's first
  segment in the calculation of a Period's duration.
* Seek to the latest start time before starting playback.

Further adjustments will be required to support live playback.

Closes #17, b/19130302

Change-Id: Ia9fe6d8bbe5a69488130de2d8b146ce54dfff50e
2015-02-11 22:16:23 +00:00
Joey Parrish d3e1e0a329 Fix linter error.
Change-Id: Ia3c351b7b0a037a0c61c4c925ac5e3b2c5434b63
2015-02-04 21:35:13 +00:00
Joey Parrish a92d673b1a Add support for the Role tag.
AdaptationSets are sorted by language (audio-only), then by those with
the "main" role.  Main sets are preferred when there are multiple to
choose from.

Closes #20, b/19214703.

Change-Id: I4fdd601c0bd7c7d29801084199123311ab9dbec3
2015-01-30 15:18:43 -08:00
Joey Parrish f7d9ea5794 Refactor StringUtils into Uint8ArrayUtils.
Most of these StringUtils were either operating on Uint8Arrays directly
or using strings to move around Uint8Array data anyhow.

Change-Id: I71efe6ede34210ca721d46acd53452344efff5bb
2015-01-29 09:41:06 -08:00
Timothy Drews c8036b8cad Decouple DashVideoSource and DashStream from MPD classes.
* Create generic stream description classes to represent
  Representations, AdaptationSets, and Periods.
* Move generic stream selection logic out of MpdProcessor and
  into StreamInfoProcessor.
* Refactor DashVideoSource and DashStream to use the generic
  stream description classes.

A follow-up patch is required to re-organize files and namespaces.

b/18903621
b/18948677

Change-Id: I8bbb87ebf0242b31541199d0d1d3c40767c93a29
2015-01-26 15:08:48 -08:00
Timothy Drews 5c7fca90b6 Allow startNumber attribute to be 0.
Closes b/19093388, #10.

Change-Id: Ie05b1f337f4ffd6b24d3e56666663a2ecc284deb
2015-01-26 15:08:48 -08:00
Joey Parrish d4df6987e7 Shaka Player release v1.1 2015-01-15 15:12:58 -08:00
Joey Parrish b3d035be9f Shaka Player release v1.0 2014-12-19 14:26:19 -08:00