277 Commits

Author SHA1 Message Date
olly
592b5eafee Support multiple CC channels in DASH
Issue: #5656
PiperOrigin-RevId: 241235377
2019-04-01 20:31:18 +01:00
olly
6e6df6a2f0 Improve DownloadService notification documentation
The one functional change here is to require subclasses to implement getForegroundNotification. It seems easier and less error prone to
force developers to implement it than it does to document the cases
in which they need to override it (which is most cases).

PiperOrigin-RevId: 240566737
2019-03-29 16:49:11 +00:00
eguven
facd32e65e Remove DownloadAction.createRemoveAction
PiperOrigin-RevId: 240557315
2019-03-29 16:48:55 +00:00
eguven
3919f3843d Make DownloadManager use DownloadIndex
PiperOrigin-RevId: 240320220
2019-03-26 13:18:11 +00:00
olly
77d597de5f Parse CHARACTERISTICS attribute for EXT-X-MEDIA tags
PiperOrigin-RevId: 239844963
2019-03-22 19:57:01 +00:00
Oliver Woodman
a86a9137be Merge pull request #5578 from szaboa:dev-v2-5529
PiperOrigin-RevId: 239398940
2019-03-20 23:28:28 +00:00
tonihei
8e80acd18f Use androidx.test and extensions.
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.

PiperOrigin-RevId: 238011667
2019-03-15 04:53:12 +00:00
Arnold Szabo
d7c2519a5d Fixes according to the code review 2019-03-07 00:09:11 +02:00
Arnold Szabo
854419962a Merge role and accessibility fields into RoleFlags 2019-03-05 23:38:49 +02:00
Arnold Szabo
58d746ecaa Add IntDef for role and accessibility descriptor's value, parse these also for video / audio tracks 2019-03-03 20:26:31 +02:00
Arnold Szabo
43ea388098 Remove old parseRole method that looked only for main 2019-02-28 00:11:04 +02:00
Arnold Szabo
06ed877845 Pass role and accessibility descriptor values from adaptation set to format 2019-02-27 23:53:52 +02:00
olly
0622afe170 Migrate to androidx
Issue: #5489
PiperOrigin-RevId: 234507428

Add missing annotation dependency

Issue: #5489
PiperOrigin-RevId: 234566177
2019-02-19 13:22:54 +00:00
tonihei
edabbd52d0 Update Robolectric and Truth.
PiperOrigin-RevId: 233612344
2019-02-18 15:59:32 +00:00
olly
c66d26b601 Fix EventMessage timestamp issue
Stop encoding/decoding presentation time as part of the message.
What's actually in emsg boxes is a presentation time delta,
which is why it's only 32 bits, and hence why it doesn't handle
large absolute timestamps. We were using this field to hold
absolute timestamps only for the purpose of passing presentation
times from DashManifestParser.parseEvent back to the calling
method. After this change, we return Pair<Long, EventMessage>
instead.

Issue: #5490
PiperOrigin-RevId: 233561731
2019-02-18 15:58:47 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
eguven
c9b848e500 Synchronously change to next state from downloading state
PiperOrigin-RevId: 231586206
2019-01-30 16:38:26 +00:00
tonihei
71d77d7fa0 Remove DownloadHelper subclasses and use static methods instead.
The subclasses only call specific constructor combinations and can easily
replaced by static methods.

PiperOrigin-RevId: 231385606
2019-01-29 16:45:10 +00:00
tonihei
0a8ae74217 Update DownloadHelper to use MediaSource and MediaPeriod directly.
This requires to prepare the media source and the periods in a small helper similar
to the metadata retriever. It also gets rid of the need to have abstract protected
methods to load the manifest, to extract the track groups and to convert to stream keys,
as this can now be handled by the media period.

PiperOrigin-RevId: 231385590
2019-01-29 16:44:56 +00:00
tonihei
9779f2c358 Add DashMediaPeriod getStreamKeys implementation and test.
PiperOrigin-RevId: 231385518
2019-01-29 16:44:25 +00:00
tonihei
22413b8037 Add start position to MediaSource.createPeriod.
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
2019-01-17 17:26:24 +00:00
eguven
ec77f737ee Make DownloadManager watch requirements directly
PiperOrigin-RevId: 229544734
2019-01-17 14:37:12 +00:00
tonihei
ca7675ceae Fix bug where missing switch adaptation set causes multiple identical track groups.
When the extra adaptation set of a switch group isn't defined in the manifest, we
currently assume it's the first adaptation group. This either leads to wrong grouping
or duplicate track groups.

Such a case may easily happen if the manifest is filtered such that only one of the
switch adaptation sets will be present in the manifest.

PiperOrigin-RevId: 229365379
2019-01-15 15:24:16 +00:00
tonihei
c6092bbb43 Fix typo.
PiperOrigin-RevId: 229365333
2019-01-15 15:24:03 +00:00
tonihei
e8a7cb2546 Remove player and isTopLevelSource parameters from MediaSource.prepare.
They are not longer needed anywhere, are error-prone (because of threading
requirements), and complicate testing and using MediaSources without a player.

PiperOrigin-RevId: 227871157
2019-01-08 07:38:00 +00:00
eguven
781ba39097 Disabled test case due to flakiness
PiperOrigin-RevId: 227682600
2019-01-08 07:34:24 +00:00
eguven
3d6707e2c4 Don't create Downloads until DownloadManager is initialized
PiperOrigin-RevId: 225824428
2018-12-18 19:45:58 +00:00
tonihei
173ddd6ee7 Add simplified adaptive media source stream key filter to factory classes.
This change only simplifies the API by using the ManifestParser internally.

PiperOrigin-RevId: 225516193
2018-12-14 15:42:36 +00:00
tonihei
c03b7e32e2 Remove TrackKey and its remaining usages.
This is no longer needed as the public API uses TrackSelection as the way to specify
selected tracks.

PiperOrigin-RevId: 225158867
2018-12-14 15:40:36 +00:00
tonihei
6a6b211233 Update DownloadHelper constructors and their usage in the demo app.
PiperOrigin-RevId: 224797598
2018-12-10 18:17:52 +00:00
Oliver Woodman
556dd7e9e0 Merge pull request #5187 from BrainCrumbz:feat/get-tag
PiperOrigin-RevId: 224166374
2018-12-05 17:49:07 +00:00
olly
22a8aa311b Clean up requesting non-media segments in downloader implementations
- Enable GZIP for media playlist + encryption key chunk requests in
  HLS, as we do during playback
- Pass around DataSpecs rather than Uris. This will be needed for if
  we add manifest cacheKey support (which seems like a good idea for
  completeness, if nothing else)

PiperOrigin-RevId: 224057139
2018-12-05 17:48:45 +00:00
tonihei
8a566fb330 Converge DownloadHelper implementations.
Moving most of the logic to the base DownloaderHelper helps to implement track
selection for downloading in a single place instead of multiple places.

PiperOrigin-RevId: 223964869
2018-12-05 17:48:18 +00:00
olly
f196630863 Remove contentId from Representation creators/constructor
PiperOrigin-RevId: 223796377
2018-12-04 06:02:23 +00:00
GiuseppePiscopo
b278b02816 chore(MediaSource): move getTag after removeEventListener 2018-12-03 18:21:37 +01:00
GiuseppePiscopo
8a359bb1fb feat(MediaSource): client code can get the tag of a MediaSource 2018-12-03 15:17:36 +01:00
olly
d650f8e0e3 Remove ability to inject content-id via DashManifestParser
It doesn't make sense for multi-period manifest

PiperOrigin-RevId: 223537958
2018-12-01 00:08:10 +00:00
olly
a1b8e17ed1 Remove Representation.contentId. It doesn't really make sense.
PiperOrigin-RevId: 223535353
2018-12-01 00:08:05 +00:00
olly
beae7c9df5 Don't resolve UtcTiming element for static manifests
It doesn't do anything useful in this case.

PiperOrigin-RevId: 223516909
2018-11-30 16:13:52 +00:00
olly
e317305909 Remove custom data from remove actions
A remove action will eventually just be the unique ID of the download
that should be removed. This is a step toward that goal.

PiperOrigin-RevId: 222832456
2018-11-27 15:45:38 +00:00
Oliver Woodman
56e4860cb0 Remove stray proguard files 2018-11-23 12:28:23 +00:00
olly
dd2cba04dd Offline refactor step 1b - Consolidate tests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222529260
2018-11-22 13:40:38 +00:00
olly
6ebb6124bb Offline refactor step 1a - Make DownloadAction concrete
1. Pull up all subclasses of DownloadAction into DownloadAction
2. Add DownloaderFactory for Downloader instantiation, and DefaultDownloaderFactory
   to replace the instantiation logic being removed from the DownloadAction
   subclasses.

This change will upgrade existing action files gracefully (i.e. it does not
lose compatibility with the existing offline implementation, other than some
minor breaking changes to the API).

TODOs:

1. Move test methods from the XDownloadActionTest classes into DownloadActionTest.
   This will be done in a subsequent CL. There's a lot of consolidation that can
   be done here, including de-duplicating some of the test code added in this CL.
2. Look at merging DownloaderConstructorHelper into DefaultDownloaderFactory.
3. Use customCacheKey in DASH/HLS/SS Downloaders, for completeness.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222258983
2018-11-22 12:39:37 +00:00
olly
5e6174fe38 DASH: Fix detection of end of live events
The remaining work is to split Window.isDynamic so that it's
possible to represent a window that wont be appended to, but
may still be removed from.

Issue: #4780

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=221439220
2018-11-14 18:09:44 +00:00
eguven
d7e23f826b Fix package visibility comments
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220323772
2018-11-07 17:57:42 +00:00
Oliver Woodman
a442c72814 Fix nullability 2018-10-31 20:40:57 +00:00
Oliver Woodman
2dfe7a7ad6 Misc fixes / stylistic consistency changes for merged pull requests 2018-10-31 20:37:59 +00:00
ojw28
16326bae46
Merge pull request #4930 from Comcast/program_information
Add Support for Parsing ProgramInformation
2018-10-31 20:21:44 +00:00
eguven
86fdcb08d8 Fix documentation confusion in MediaChunkIterator subclasses
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217505571
2018-10-18 23:39:51 +01:00
Lieblich, Jonathan
0af9ccc990 added handling of unexpected tags 2018-10-15 15:37:42 -06:00