Commit Graph

15 Commits

Author SHA1 Message Date
Timothy Drews fbea2279b3 Re-work stream switching.
* Allow segments from different streams (Representations) to coexist
  in buffer.
* Only fetch a single segment at a time.
* Remove id field from SegmentReference and remove SegmentRange.
* Only start the Streams once the buffer is "full".
* Stop DashVideoSource from triggering an extra resync during startup.
* Make Task.abort call order deterministic.

A follow-up patch is required to handle certain seek patterns in
live streams.

Issue #51

Change-Id: Ib7c9021471f1ed89323f19764463202b119cb491
2015-06-18 12:54:25 -07:00
Timothy Drews 22c57e99e4 Rework SegmentIndex functionality.
This patch reworks SegmentIndexes so that any SegmentReference they
contain is guaranteed to be available. This makes SegmentIndexes work
consistently between static content and live content (specifically
content specified using SegmentTemplate with @duration).

* Rework StreamInfo to use a ISegmentIndexSource and a ISegmentInitSource,
  which construct a SegmentIndex and an intiailization segment
  respectively.
* Make ManifestInfo destructible and various async operations in
  StreamVideoSource safer.
* Introduce LiveSegmentIndex, which manages SegmentReference eviction.
* Introduce DynamicLiveSegmentIndex, which manages SegmentReference
  eviction and generation.
* Implement improved segment availability logic for segment eviction.
* Move SegmentIndex construction from MpdProcessor to several
  ISegmentIndexSource implementations.
* Use a SegmentIndex to represent subtitles to simplify Stream creation
  in StreamVideoSource.
* Move manifest update code from StreamVideoSource to ManifestUpdater.
* Move PeriodInfo.duration determination in MpdProcessor to StreamVideoSource.
* Since "forced" manifest updates are no longer required for content
  specified using SegmentTemplate with @duration, simplify manifest update
  code in DashVideoSource.
* Make Stream continue to update even if it runs out of
  SegmentReferences, this simplifies previous resync logic and makes
  DynamicLiveSegmentIndex work seamlessly.
* Refactor SegmentIndex and initialization fetch code in ContentDatabase.
* Download all SegmentIndexes in the background after the initial streams
  have started.

Follow up work is required to remove seek range logic from
DashVideoSource.

Change-Id: I4a908195aba632a911a6e55213fc41d41428162b
2015-06-09 11:46:40 -07:00
Natalie Harris 23e7a8e11f Progress events for Offline storage. Issue #22
Change-Id: Ic8c24241b8a55a42c4207084491e5a3e2a0d0a86
2015-04-24 16:45:24 +00:00
Joey Parrish d67198e61f Use a separate content DB for unit tests.
Issue #22.

Change-Id: I4a1f62dd0106ab8e68fe80bde9f4d2f75e00c373
2015-04-10 23:27:57 +00:00
Joey Parrish 03964e4c84 Drop suppressMultipleEvents from DrmSchemeInfo.
This interfered with key rotation, and was not widely used.  Removing
the feature is the more general approach, and the worst that will
happen is that some applications will see more sessions than they
strictly need.

Change-Id: Ide2238433af296e729e4401711672fb17257093e
2015-04-09 19:31:34 +00:00
Natalie Harris a0aa5e51c6 Retrieve list of currently stored group ids. Issue #22
Change-Id: Ifeaa4085ec289679ccd9cb1fc22bd400c9cd8198
2015-04-07 15:32:36 +00:00
Natalie Harris 6f573def03 OfflineVideoSource load and addition of offline to test app. Issue #22
Change-Id: Iad9737829c7404443849c48420d2d81d32857bf8
2015-03-27 19:57:49 +00:00
Natalie Harris c97ebf3485 Support for EME offline. Issue #23
Change-Id: I27632f196b6ec65ace67d3ee9794683fd9f639ab
2015-03-25 22:22:42 +00:00
Joey Parrish ae35ac25bb Fix ContentDatabase test crashes on Chrome 42+.
Chrome 42+ is crashing when we insert roughly 64MB of data into the
database at a time.  The database now tries to batch up 1MB of
segments, which means only single segments will be inserted for high
bitrate content, but we will still get a performance boost from
batching up segments for low bitrate content.

Change-Id: I3205b108dc089ea2901ea6b9eae5125901535f0c
2015-03-05 11:41:50 -08:00
Joey Parrish d2d6f67a52 Fix ContentDatabase test failures.
Tests were failing if an existing database had a greater version
number.  This was an artifact of an older version of ContentDatabase
which used a different version number.

Tests would also fail if one of the 'stores a stream' tests was run
several times in a row, such that the stream ID had more than one
digit.  The reference matcher now accepts multi-digit IDs.

Change-Id: I8d8949e46bd0720abd761248790b2ee5965ff4a1
2015-03-05 19:34:49 +00:00
Joey Parrish f43cfff622 Fix ContentDatabase error reporting.
Rejected promises now pass an Error object instead of a simple event.
This causes test failures to display useful error messages now.

Change-Id: I9d9a756e84d204185ca9a2e36ca92ef814d05e4d
2015-03-04 13:56:25 -08:00
Natalie Harris 4a8d26af9b Support of idb URI's.
Change-Id: Ie964da2d435349be6c2ee9a88202f1c058b8ed05
2015-02-27 23:16:15 +00:00
Natalie Harris c6a74f3171 Additional functionality added to ContentDatabase. Issue #22
Change-Id: Ic00a42b7bfcd0619adf358f4907675e7c7767bb7
2015-02-25 15:52:53 -08:00
Joey Parrish 520c45b842 Fix flaky tests.
This fixes timing-based flakiness on these tests:
 * ContentDatabase - deletes the database
 * Player - seek - does not hang when seeking to evicted data

Change-Id: Ieb4e1291289fa589ccda94a86698c15f1bde8fba
2015-02-24 09:15:57 -08:00
Natalie Harris 302f6faf64 Offline storage module.
Change-Id: I6d67faf99d535c0c77764b3c3b6311736ce8f9e1
2015-02-04 01:24:09 +00:00