311 Commits

Author SHA1 Message Date
Oliver Woodman
16bf7f9106 Merge pull request #5908 from sr1990:dev-v2
PiperOrigin-RevId: 256147805
2019-07-02 17:49:45 +01:00
tonihei
2a765f6b5a Visibility clean-up: Don't extend visibility of protected methods in overrides.
PiperOrigin-RevId: 255412493
2019-07-02 17:46:30 +01:00
sr1990
ec6604b4f7 [Patch V4] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-26 20:29:37 -07:00
sr1990
5f6a7fc7f1 [Patch V3] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-22 18:56:06 -07:00
sr1990
5b02f92dad [Patch V2] Support signalling of last segment number via supplemental descriptor in mpd 2019-06-10 22:22:15 -07:00
eguven
00b26a51df Modify DashDownloaderTest to test if content length is stored
PiperOrigin-RevId: 250655481
2019-05-30 15:26:32 +01:00
aquilescanta
04f3888550 Add allowOnlyClearBuffers to SampleQueue#read
Removes the need for duplicate calls to SampleQueue#read when
implementing DecryptionResources acquisition in the MediaSources.

PiperOrigin-RevId: 250298175
2019-05-30 15:25:28 +01:00
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00
tonihei
33c677846a Use versioned manifest in all Robolectric tests.
We are currently defaulting to targetSdk=1 as no targetSdk is specified. Only
tests which explicitly ask for another SDK use another test SDK. With the
versioned manifest, all tests run using the targetSDK by default.

PiperOrigin-RevId: 249060796
2019-05-21 13:51:43 +01:00
sr1990
2091aa5cf9 Support signalling of last segment number via supplemental descriptor in mpd 2019-05-18 19:49:14 -07:00
eguven
4ca670bed3 Use MediaSourceFactory interface to simplify DownloadHelper
PiperOrigin-RevId: 248367983
2019-05-15 20:13:59 +01:00
aquilescanta
cf389268b0 Add links to the developer guide in some READMEs
PiperOrigin-RevId: 248221982
2019-05-15 18:14:07 +01:00
aquilescanta
50c9ae0efc Assume that encrypted content requires secure decoders in renderer support checks
Issue:#5568
PiperOrigin-RevId: 247973411
2019-05-15 18:13:12 +01:00
Oliver Woodman
2a0ead1b29 Merge pull request #5760 from matamegger:feature/hex_format_tags_in_url_template
PiperOrigin-RevId: 246733842
2019-05-05 19:42:42 +01:00
tonihei
c480818249 Fix some random AndroidStudio warnings.
PiperOrigin-RevId: 245956915
2019-04-30 22:08:07 +01:00
olly
3e9a45b9d3 Fix DownloadManagerDashTest tests
Also re-enable two of them, although note that the fix here is
not related to the flakiness that caused them to be disabled.
I'm re-enabling them since much has changed in DownloadManager,
and the hope is that these tests are no longer flaky.

PiperOrigin-RevId: 244826225
2019-04-26 18:28:51 +01:00
olly
748a29e8f5 Further improve DownloadService action names & methods
- We had buildAddRequest and sendNewDownload. Converged to
  buildAddDownload and sendAddDownload.
- Also fixed a few more inconsistencies, and brought the
  action constants into line as well.

PiperOrigin-RevId: 244274041
2019-04-18 23:45:49 +01:00
olly
82061e9afb Improve progress reporting logic
- Listener based reporting of progress allows the content length
  to be persisted into the download index (and notified via a
  download state change) as soon as it's available.
- Moved contentLength back into Download proper. It should only
  ever change once, so I'm not sure it belongs in the mutable part
  of Download.
- Made a DownloadProgress class, for naming sanity.

PiperOrigin-RevId: 244242487
2019-04-18 23:24:11 +01:00
olly
e9413b0d41 Simplify DownloadManager constructors
PiperOrigin-RevId: 244223870
2019-04-18 23:23:33 +01:00
olly
62964026b9 Rename start/stopDownloads to resume/pauseDownloads
PiperOrigin-RevId: 244216620
2019-04-18 23:23:14 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +01:00
eguven
50c9fe6294 Fix flaky DownloadManagerDashTest
PiperOrigin-RevId: 244170179
2019-04-18 15:17:52 +01:00
olly
af5131e393 Rename Shadow*Looper classes (PR#4868)
ShadowLooper -> ShadowLegacyLooper
ShadowRealisticLooper -> ShadowPausedLooper
ShadowBaseLooper -> ShadowLooper

And all public methods from ShadowLegacyLooper get pushed up to ShadowLooper

Pull Request: https://github.com/robolectric/robolectric/pull/4868

Copybara: OK

Also adjust Google3 tests  using custom looper shadows where necessary.
Convert exoplayer to paused looper to eliminate reliance on custom shadows

PiperOrigin-RevId: 243839311
2019-04-18 15:13:07 +01:00
eguven
5856e75781 Rename DownloadAction to DownloadRequest
PiperOrigin-RevId: 243806888
2019-04-16 16:41:29 +01:00
eguven
c2c7c43a36 Remove redundant proguard files
PiperOrigin-RevId: 243781000
2019-04-16 15:28:39 +01:00
olly
7b84a1ead7 DownloadManager.getCurrentDownloads: Return list instead of array
- Allows enforcing immutability, which in a future CL will allow
  avoiding allocating a new array/list on every call.
- Also some left over doc cleanup from the DownloadState rename.

PiperOrigin-RevId: 243627352
2019-04-16 15:27:03 +01:00
tonihei
1ee51518ae Use new exoplayer.dev domain everywhere.
The old domain automatically forwards to the new one. For consistency, change
all doc and code references regardless.

Also adds GitHub CNAME config file which configures our page for the custom
domain.

PiperOrigin-RevId: 243592110
2019-04-16 15:25:27 +01:00
aquilescanta
1bf1790edc Extract factory method for FragmentedMp4Extractor in DefaultHlsExtractorFactory
PiperOrigin-RevId: 243582468
2019-04-16 15:24:48 +01:00
tonihei
c1e25f7768 Add check for retryDelayMs==C.TIME_UNSET in DASH and SS manifest onLoadError.
If the returned retry delay is unset, we should use a DONT_RETRY_FATAL action
instead and dispatch the event with the "canceled" flag.

PiperOrigin-RevId: 243251554
2019-04-13 01:42:42 +01:00
tonihei
c830c8dc63 Use LoadErrorHandlingPolicy.getRetryDelayMsFor for DASH/SS manifest loads.
Both manifest loads currently use the default retry delay although a
LoadErrorHandlingPolicy is provided to the MediaSource.

PiperOrigin-RevId: 242852672
2019-04-13 01:39:05 +01:00
eguven
8688bd2d88 Rename DownloadState to Download
PiperOrigin-RevId: 242839480
2019-04-13 01:38:25 +01:00
olly
d3b63a97ad Remove DownloadAction serialization
Implement Parcelable instead, which is a more intented way of
passing structured data via Intents.

PiperOrigin-RevId: 242646441
2019-04-13 01:36:46 +01:00
olly
47601980d9 Use DownloadAction.id properly
- Fix ID being dropped when DownloadAction is serialized and
  de-serialized as it's passed to DownloadService
- Properly set DownloadAction.id when building an action from
  a DownloadState
- Make ID a required constructor argument. Else it's too easy
  to not propagate it by accident.

PiperOrigin-RevId: 242457831
2019-04-13 01:34:07 +01:00
Matthias Tamegger
55154ad475 Allow hex format tags when parsing url templates 2019-04-12 10:49:48 +02:00
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