6658 Commits

Author SHA1 Message Date
olly
880f403181 Fix line break
PiperOrigin-RevId: 245448908
2019-04-30 22:05:51 +01:00
Zsolt Matyas
3e14ce1094 Code changes suggested by tonihei 2019-04-29 12:56:25 -07:00
Zsolt Matyas
2f356badd2 Handling XDS and TEXT modes
[Problem]
There are 3 services / modes transported on line 21:
- Captioning
- TEXT (generally not program related)
- XDS (eXtended Data Services)

Bytes belonging to the unsupported modes are interleaved with the
bytes of the captioning mode.
See Chapter 7, Chapter 8.5 and Chapter 8.6 of the CEA608 Standard for
more details.

[Solution]
Drop all bytes belonging to unsupported modes.

[Test]
- All streams containing only captioning services should not be influenced
- Test all 4 CEA 608 channels with live over-the-air content and
using all available TEXT and XDS streams.
2019-04-26 14:56:34 -07:00
eguven
3e519824ff Downloading documentation
PiperOrigin-RevId: 245443109
2019-04-26 18:35:34 +01:00
andrewlewis
1bc279795b Log warnings when extension libraries can't be used
Issue: #5788
PiperOrigin-RevId: 245440858
2019-04-26 18:35:15 +01:00
olly
61f28f8107 Link blog post from release notes
PiperOrigin-RevId: 245411528
2019-04-26 18:34:55 +01:00
olly
2b0b6e1b2e Move DownloadManager internal logic into isolated inner class
There are no logic changes here. It's just moving code around and removing
the "internal" part of names where no longer required.

PiperOrigin-RevId: 245407238
2019-04-26 18:34:37 +01:00
olly
f37b28f12e Post maxParallelDownload and minRetryCount changes
PiperOrigin-RevId: 245405316
2019-04-26 18:34:18 +01:00
olly
643e187d99 Add missing getters and clarify STATE_QUEUED documentation
PiperOrigin-RevId: 245401274
2019-04-26 18:33:59 +01:00
eguven
01ad1c1a84 Add simpler DownloadManager constructor
PiperOrigin-RevId: 245397736
2019-04-26 18:33:39 +01:00
eguven
3382c74488 Allow content id to be set in DownloadHelper.getDownloadRequest
PiperOrigin-RevId: 245388082
2019-04-26 18:33:21 +01:00
eguven
708cad6b28 Add DownloadHelper.createMediaSource utility method
PiperOrigin-RevId: 245243488
2019-04-26 18:33:02 +01:00
tonihei
21b2a471bb Toggle playback controls according to standard Android click handling.
We currently toggle the view in onTouchEvent ACTION_DOWN which is non-standard
and causes problems when used in a ViewGroup intercepting touch events.

Switch to standard Android click handling instead which is also what most
other player apps are doing.

Issue:#5784
PiperOrigin-RevId: 245219728
2019-04-26 18:32:42 +01:00
tonihei
84e03aea70 Update gradle plugin (part 2).
PiperOrigin-RevId: 245218900
2019-04-26 18:32:23 +01:00
tonihei
b4420f61d1 Update gradle plugin.
This also removes the build warning about the experimental flag.

PiperOrigin-RevId: 245218251
2019-04-26 18:32:04 +01:00
andrewlewis
009d629650 Check codec profiles/levels for VP9
Also add some unit tests for codecs strings parsing.

PiperOrigin-RevId: 245210490
2019-04-26 18:31:45 +01:00
eguven
0ff47a8c0d Add DownloadService SET_REQUIREMENTS action
PiperOrigin-RevId: 245014381
2019-04-26 18:31:26 +01:00
olly
d60b6d64ab Migrate from containsAllOf to containsAtLeast.
The two behave identically, and containsAllOf is being removed.

More information:
  go/containsall-lsc

Tested:
    TAP --sample for global presubmit queue
    http://test/OCL:244737393:BASE:244782138:1555991083653:3080d7c7
PiperOrigin-RevId: 244886736
2019-04-26 18:31:06 +01:00
olly
ba94f9dc01 Migrate from isNotSameAs to isNotSameInstanceAs.
The two behave identically, and isNotSameAs is being removed.

More information:
  go/issameas-lsc

Tested:
    TAP --sample for global presubmit queue
    http://test/OCL:244736857:BASE:244751659:1555988098671:1e0f72c5
PiperOrigin-RevId: 244886651
2019-04-26 18:30:46 +01:00
eguven
03313fb5e2 Add option to add entries in an ActionFile to DownloadIndex as completed
PiperOrigin-RevId: 244864742
2019-04-26 18:30:27 +01:00
tonihei
06586b75b0 Fix bug which logs errors twice if stack traces are disabled.
Disabling stack trackes currently logs messages twice, once with and once
without stack trace.

PiperOrigin-RevId: 244853127
2019-04-26 18:30:08 +01:00
tonihei
4507c6870d Move away from AndroidX bundled Truth to be closer to head revision.
The AndroidX bundled version (0.42) lags behind the most up-to-date public
release (0.44) making it more difficult to stay close to the actual head
revision which is used internally.

PiperOrigin-RevId: 244848568
2019-04-26 18:29:49 +01:00
tonihei
3acd8a6048 Remove unused PlaybackInfo.resetToNewPosition
PiperOrigin-RevId: 244838165
2019-04-26 18:29:30 +01:00
tonihei
9441f72445 Always update loading period in handleSourceInfoRefreshed.
This ensures we keep the loading period in sync with the the playing period in
PlybackInfo, when the latter changes to something new.

PiperOrigin-RevId: 244838123
2019-04-26 18:29:11 +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
tonihei
9725132e3c Update default min duration for playbacks with video to match max duration.
Experiments show this is beneficial for rebuffers with only minor impact
on battery usage.

Configurations which explicitly set a minimum buffer duration are unaffected.

Issue:#2083
PiperOrigin-RevId: 244823642
2019-04-26 18:28:32 +01:00
olly
d89f3eeb29 Update dependency versions
PiperOrigin-RevId: 244816212
2019-04-26 18:28:13 +01:00
andrewlewis
b01075f325 Play out remaining data on reconfiguration
Before this change we'd release the audio track and create a new one as soon
as audio processors had drained when reconfiguring.

Fix this behavior by stop()ing the AudioTrack to play out all written data.

Issue: #2446
PiperOrigin-RevId: 244812402
2019-04-26 18:27:53 +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
bab7b9e9a1 Fix lint warnings for 2.10
PiperOrigin-RevId: 244268855
2019-04-18 23:24:49 +01:00
olly
864b59080a Clean up database tables for launch
PiperOrigin-RevId: 244267255
2019-04-18 23:24:30 +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
0ccda60ab4 Support multiple DefaultDownloadIndex instances
PiperOrigin-RevId: 244226680
2019-04-18 23:23:52 +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
olly
82af6899a0 Rename manualStopReason to stopReason
PiperOrigin-RevId: 244210737
2019-04-18 23:22:55 +01:00
eguven
f9f009645d Add missing DownloadService build*Intent and startWith* methods
PiperOrigin-RevId: 244196081
2019-04-18 23:22:35 +01:00
aquilescanta
4ea2463856 Avoid selecting a forced text track that doesn't match the audio selection
Assuming there is no text language preference.

PiperOrigin-RevId: 244176667
2019-04-18 15:18:48 +01:00
andrewlewis
fe65f002a5 Move E-AC3 workaround out of MediaCodecUtil
PiperOrigin-RevId: 244173887
2019-04-18 15:18:29 +01:00
andrewlewis
6665af5b7b Support additional DV profiles that require fallback
PiperOrigin-RevId: 244170391
2019-04-18 15:18:10 +01:00
eguven
50c9fe6294 Fix flaky DownloadManagerDashTest
PiperOrigin-RevId: 244170179
2019-04-18 15:17:52 +01:00
aquilescanta
f6de1aa242 Add test for HlsTrackMetadataEntry population in the HlsPlaylistParser
PiperOrigin-RevId: 244168713
2019-04-18 15:17:33 +01:00
andrewlewis
2347bd2c99 Prioritize decoders with format support
PiperOrigin-RevId: 244167456
2019-04-18 15:17:14 +01:00
andrewlewis
a985ca93c5 Extend Bluetooth dead audio track workaround to Q
PiperOrigin-RevId: 244139959
2019-04-18 15:16:55 +01:00
olly
4c967895e9 [libvpx] permalaunch number of buffers.
PiperOrigin-RevId: 244094942
2019-04-18 15:16:36 +01:00
aquilescanta
92269ff774 Make MediaCodecRenderer#onInputFormatChanged take a FormatHolder
PiperOrigin-RevId: 244056421
2019-04-18 15:16:17 +01:00
olly
4d6aca7629 Remove TODOs we're not going to do
1. customCacheKey for DASH/HLS/SS is now asserted against
   in DownloadRequest
2. Merging of event delivery in DownloadManager is very
   tricky to get right and probably not a good idea

PiperOrigin-RevId: 244048392
2019-04-18 15:15:58 +01:00
eguven
f001e49295 Small javadoc fix for DownloadManager constructors
PiperOrigin-RevId: 244009343
2019-04-18 15:15:39 +01:00
olly
e290f883d1 Disable cache span touching for offline
Currently SimpleCache will touch cache spans whenever it reads
from them. With legacy SimpleCache setups this involves a potentially
expensive file rename. With new SimpleCache setups it involves
a more efficient but still non-free database write.

For offline use cases, and more generally any use case where the
eviction policy doesn't use last access timestamps, touching is
not useful. This change allows the evictor to specify whether it
needs cache spans to be touched or not. SimpleCache will only touch
spans if the evictor requires it.

Note: There is a potential change in behavior in cases where a
cache uses an evictor that doesn't need cache spans to be touched,
but then later switches to an evictor that does. The new evictor
may temporarily make sub-optimal eviction decisions as a result.
I think this is a very fair trade-off, since this scenario is
unlikely to occur much, if at all, in practice, and even if it
does occur the result isn't that bad.
PiperOrigin-RevId: 244005682
2019-04-18 15:15:20 +01:00
olly
d656782bd4 Don't start download if user explicitly deselects all tracks
PiperOrigin-RevId: 244003817
2019-04-18 15:15:01 +01:00