* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.
This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.
Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.
The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.
We can re-examine this once we have restructured the license headers.
Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
Added a new class called FailoverUri which handles multiple URLs and
switches to others when one fails. This is also handles the request
itself. This replaces SegmentMetadata as well as a number of manual
requests.
The MPD parser now produces arrays of URIs rather than just one. The
MPD Processor then converts it to a FailoverUri inside the manifest.
Added unit tests to test the new functionality and updated the old ones
to the new changes.
This does not support failover on subtitles since subtitles are handled
by the browser.
Closes#68
Change-Id: I5410104827b9e4102b243444b1b5a3f01dcaf10d
The circular dependency,
ContentDatabase -> RangeRequest -> AjaxRequest -> ContentDatabase,
causes issues for the upstream Closure compiler. This patch breaks that
cycle by factoring out reading and writing operations from ContentDatabase
into ContentDatabaseReader and ContentDatabaseWriter respectively.
The following minor changes have been made to code that has moved:
* Removed retrieveInitSegment() since it's not used.
* Changed .stream_ids to ['stream_ids'] in retriveGroup().
* Reworked deleteGroup() so that it doesn't depend on retrieveGroup().
* Made deleteStream() private.
* Made minor formatting changes to meet the 80 character limit.
Change-Id: Idfc5d04ad32225a915b1531e0f4205137de5cc73
Now that google/closure-compiler#715 is fixed and we have upgraded to
a newer compiler, we can remove these casts.
b/21559591
Change-Id: I7769d95d7b440c648eb78e026d94544c640c41b4
Newer versions of the Closure Compiler issue warnings for several
anonymous functions due to what appears to be a failure to infer
certain types. This patch uses TypedBind to mollify the compiler.
This patch also fixes another issue raised by the newer compiler,
which is that index does not have duration and key_system properties.
b/21559591
Change-Id: Icff84ad084bfcd049f962bd4a0698b3fc78fc279
* 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
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
* Rename SegmentIndex functions to shorter names.
* Add first() and last() functions for convenience.
* Throw exceptions for out of range errors.
* Handle more corner-cases in merge().
* Add more unit tests.
Change-Id: If875cd766e7091504c028413694326fcdf2aae5b
If a stream insertion didn't complete successfully, it was possible an error
would occur during the next stream insertion due to a key (streamId) conflict.
Updated to always take the max next stream id from the indexStore/contentStore
and to try to delete partially inserted streams.
Change-Id: I85c379a6ef17853da28ae873c448873006b1dce4
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
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
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