6122 Commits

Author SHA1 Message Date
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
andrewlewis
ad69a93708 Handle alternative DV MIME types
Also detect ISOBMFF brand for DV when sniffing.

PiperOrigin-RevId: 233433449
2019-02-18 15:58:42 +00:00
olly
a21572f0dd Fix minor issues and lint errors
PiperOrigin-RevId: 233428556
2019-02-18 15:58:37 +00:00
eguven
6a7157de11 Fix flaky test DownloadManager.differentDownloadActionsMerged
PiperOrigin-RevId: 233421480
2019-02-18 15:58:32 +00:00
olly
6d461f5b25 Fix PlayerNotificationManager lint error
builder.mActions is marked as @RestrictTo(LIBRARY_GROUP). We'll
just have to put up with notification flicker on KitKat if the
actions change.

PiperOrigin-RevId: 233420076
2019-02-18 15:58:27 +00:00
olly
de720fef77 Add missing permission to IMA demo app
PiperOrigin-RevId: 233418784
2019-02-18 15:58:22 +00:00
olly
71ab19c771 Fix a few GVR 360 nits
- Remove unused TAG
- android.Theme.Material can only be used from API level 21
- Rm "Base" from activity name for consistency

PiperOrigin-RevId: 233410603
2019-02-18 15:58:17 +00:00
olly
ae12b76ac4 Add tests to ensure DefaultRenderersFactory reflection works
Also add explicit Lint.IfChange/ThenChange rules to make it
clearer what needs to be done when changing one of the code
paths that's accessed via reflection.

PiperOrigin-RevId: 233406709
2019-02-18 15:58:11 +00:00
andrewlewis
56944caa21 Allow registration of control overlays for ad viewability
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.

Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.

PiperOrigin-RevId: 233393500
2019-02-18 15:58:06 +00:00
olly
0183678747 Suppress obsolete API warning
We'll toggle the publish flag only when doing releases.

Issue: #5477
PiperOrigin-RevId: 233392733
2019-02-18 15:58:00 +00:00
olly
8401097ead Upgrade gradle plugin and friends
PiperOrigin-RevId: 233390513
2019-02-18 15:57:55 +00:00
aquilescanta
905927554a Fix Cast demo app's blaze build and enable proguarding
PiperOrigin-RevId: 233372668
2019-02-18 15:57:49 +00:00
tonihei
abb53d7ce7 Support multiple overrides in TrackSelectionView and factor out Builder.
Supporting multiple overrides allows to select tracks from multiple groups, if
enabled. As more options are added, the creation of the dialog is moved to a
separate builder class.

PiperOrigin-RevId: 233366282
2019-02-18 15:57:44 +00:00
aquilescanta
fc2710498a Handle player errors more gracefully in the Cast demo app
PiperOrigin-RevId: 233090773
2019-02-18 15:57:39 +00:00
aquilescanta
3d822bd228 Rename ExoCastPlayerManager to PlayerManager
PiperOrigin-RevId: 233089799
2019-02-18 15:57:34 +00:00
andrewlewis
ef139b2e31 Add an overlay FrameLayout for ad UI
This will be used instead of the current overlay FrameLayout (which apps can
interact with directly).

PiperOrigin-RevId: 233077175
2019-02-18 15:57:29 +00:00
aquilescanta
a263fb1631 Remove default-receiver-related classes from Cast demo app
PiperOrigin-RevId: 233073011
2019-02-18 15:57:24 +00:00
aquilescanta
6f1daff3f1 Remove copybara scrubbing of ExoCast components
PiperOrigin-RevId: 233072247
2019-02-18 15:57:19 +00:00
andrewlewis
9b6caf9eda Merge #5438: Dolby Vision
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5438

Plus the following changes:
- Only support profile 5 (handling other profiles requires
  backward-compatibility changes in the renderer which are left for a later
  change.)
- Only add KEY_PROFILE to the codec configuration MediaFormat for Dolby Vision.
- In MediaCodecUtil support all DV profiles that Android has constants for. This
  includes ones that are "not supported for new applications". Since we don't
  extract these profiles, this is currently only for the benefit of custom
  extractors.
- Misc code style fixes and reordering for consistency.

Merge 37878b975c2bc082b0568e21cbe62bfcef97c10d into 67be9e77834c0dc9d2b5d462c01c2f39718c8817

PiperOrigin-RevId: 233066799
2019-02-18 15:57:14 +00:00
olly
434b5a3029 Enable use of database storage in CachedContentIndex
It's not yet enabled in the SimpleCache layer, however, so
this is a no-op change.

PiperOrigin-RevId: 233064490
2019-02-18 15:57:09 +00:00
andrewlewis
9c3ac92ae8 Allow extension of MatroskaExtractor
Subclasses can handle arbitrary elements.

PiperOrigin-RevId: 233057241
2019-02-18 15:57:04 +00:00
aquilescanta
36da5fb511 Group audio renditions by name
Allows the player to adapt between audio renditions with different
names.

PiperOrigin-RevId: 233052105
2019-02-18 15:56:59 +00:00
aquilescanta
891ec2230e Rearrange condition blocking to ensure Handler thread loops
Without this change, any prepare() operation that requires posting to
the DummyMainThread's handler cannot complete preparation.

PiperOrigin-RevId: 233050367
2019-02-18 15:56:54 +00:00
olly
fd979790f2 Some no-op CacheContentIndex cleanup
Push Cipher and SecretKeySpec instantiation into AtomicFileStorage,
since SQLiteStorage no longer needs them.

PiperOrigin-RevId: 233043754
2019-02-18 15:56:49 +00:00
olly
42e691519a Generate per-cache unique identifier.
PiperOrigin-RevId: 233030337
2019-02-18 15:56:44 +00:00
andrewlewis
dec00997e3 Remove deprecated ImaAdsMediaSource and constructors
Given the change to require setPlayer on AdsLoaders, it seems like a good
opportunity to clean up deprecated ads-related symbols.

PiperOrigin-RevId: 233020171
2019-02-18 15:56:39 +00:00
olly
1a5bf28669 Cleanup for database on internal storage
PiperOrigin-RevId: 232923385
2019-02-18 15:56:34 +00:00
olly
dd99fdcb82 Changes for SQLite databases on internal storage
- Remove ability to encrypt content index for SQLite storage
- Remove hack for specifying arbitrary database location

PiperOrigin-RevId: 232863763
2019-02-18 15:56:29 +00:00
olly
a7324061b3 Fix proguard configuration
PiperOrigin-RevId: 232835218
2019-02-18 15:56:24 +00:00
andrewlewis
858415e3b1 Update test names for attach -> start renaming
PiperOrigin-RevId: 232676346
2019-02-18 15:56:18 +00:00
tonihei
f898bddbfc Do not prepare MediaPeriods in a loop.
They may prepare immediately and let pendingMediaPeriods become empty before
all other periods are even created.

PiperOrigin-RevId: 232675283
2019-02-18 15:56:13 +00:00
Arnold Szabo
eaf0d40886 Extract time bar delay calculations to a static method 2019-02-16 12:17:09 +02:00
Arnold Szabo
ecfce46296 Changes according to the code review 2019-02-13 19:31:11 +02:00
Arnold Szabo
62e6455dce Taking consideration the current position before calculating the delay before the next update 2019-02-12 23:02:34 +02:00
Arnold Szabo
c905891d10 Taking into consideration the media's duration when updating the time bar 2019-02-10 21:43:34 +02:00
zsmatyas
fd4998bcca
Merge branch 'dev-v2' into dev-v2 2019-02-07 13:13:47 -08:00
olly
a6c1dbe156 Implement CacheFileMetadataIndex using SQLite
PiperOrigin-RevId: 232670039
2019-02-06 15:47:08 +00:00
eguven
7eed60c9e3 Add DownloadManager.stopDownloads(int manualStopReason)
Also removed STOP_FLAG_DOWNLOAD_MANAGER_NOT_READY.

PiperOrigin-RevId: 232669463
2019-02-06 15:46:57 +00:00
olly
bdc87a4fc7 API and plumbing for indexing file metadata (length + timestamp)
When SimpleCache uses a CacheFileMetadataIndex, it will be able to avoid
querying file.length() and renaming files, both of which are expensive
operations on some file systems.

PiperOrigin-RevId: 232664255
2019-02-06 15:46:47 +00:00
olly
3845304e58 Shard SimpleCache files into 10 sub-directories
Issue: #4253
PiperOrigin-RevId: 232659869
2019-02-06 15:46:37 +00:00
andrewlewis
2169b9417f Fix HEVC level error logging
PiperOrigin-RevId: 232651944
2019-02-06 15:46:27 +00:00
olly
ebfbb4f915 Hide progress bar for end state download notifications
Now we're reusing the builder, it's necessary to set maxProgress
back to 0 to avoid the progress bar appearing for end state
notifications.

PiperOrigin-RevId: 232520007
2019-02-06 15:46:18 +00:00
andrewlewis
0bf9ebf91e Switch to non-deprecated way of setting AdDisplayContainer
PiperOrigin-RevId: 232507469
2019-02-06 15:46:06 +00:00
aquilescanta
fc2a99a688 Generalize selectedVariantIndices in preparation for non-main adaptation
After this change, multiple HlsSampleStreamWrappers may contain an apdaptive
track group.

PiperOrigin-RevId: 232507292
2019-02-06 15:45:54 +00:00
olly
6b81d9e7a4 Fix DownloadHelper for some HLS streams
onContinueLoadingRequested can occur during preparation, so
MediaPreparer needs to handle it.

PiperOrigin-RevId: 232507267
2019-02-06 15:45:44 +00:00
andrewlewis
589af35c65 Set player on ads loader in IMA demo
Issue: #5476
PiperOrigin-RevId: 232503736
2019-02-06 15:45:34 +00:00
olly
e3981ec484 Fix notifications to avoid flicker on KitKat
On KitKat you need to reuse the same notification builder when
generating a notification that's intended to replace a previous
one. See:

https://stackoverflow.com/questions/6406730/updating-an-ongoing-notification-quietly

PiperOrigin-RevId: 232503682
2019-02-06 15:45:24 +00:00
olly
391f2bb6c2 Remove indirection in DefaultDownloadIndex
DefaultDownloadIndex is currently just forwarding all calls to its
inner class. getDownloadTable() handles initialization, but this
doesn't really seem different to having an initialization method. It
doesn't guarantee initialization happens, since a bad method
implementation could try and access downloadTable directly, just as
a bad method implementation could forget to call the initialization
method. Hence this change removes the indirection.

PiperOrigin-RevId: 232482228
2019-02-06 15:45:10 +00:00
olly
784906b872 Update release notes
PiperOrigin-RevId: 232481580
2019-02-06 15:44:56 +00:00
eguven
c0e6cd1b17 Add DownloadState.mergeAction method
This method is needed by DownloadManager.

PiperOrigin-RevId: 232447145
2019-02-06 15:44:45 +00:00