6126 Commits

Author SHA1 Message Date
aquilescanta
6dde1e67d3 Parse CHANNELS attribute from EXT-X-MEDIA
PiperOrigin-RevId: 230743198
2019-01-29 16:42:18 +00:00
aquilescanta
9d19a7a4b6 Move parseSelectionFlags with the rest of the parse{attribute} methods
PiperOrigin-RevId: 230734189
2019-01-29 16:42:07 +00:00
aquilescanta
642a0275d8 Propagate ExoCast errors receiver from the receiver app
PiperOrigin-RevId: 230717561
2019-01-29 16:41:55 +00:00
olly
355b3d6334 Increase minSdkVersion to 16
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.

PiperOrigin-RevId: 230701808
2019-01-29 16:41:45 +00:00
olly
2c54b83464 Move CachedContentIndex storage behind an interface
This interface will get an SQLite implementation in a subsequent CL

PiperOrigin-RevId: 230693881
2019-01-29 16:41:34 +00:00
olly
f182c0c116 Centralize serialization in CachedContentIndex
We need to support serialization to/from an SQLite table. The
model of passing something around for each class to write into
doesn't work well for SQL, and it would be messy to have two
different structural designs for serialization. This change
centralizes the logic in CachedContentIndex, where a centralized
SQL based version can more easily sit alongside it.

PiperOrigin-RevId: 230692291
2019-01-29 16:41:24 +00:00
tonihei
49b9775d08 Add getReadingPositionUs to Renderer.
This method is a generalization of the existing hasReadStreamToEnd. It is
useful to determine whether a renderer already read beyond a new duration of
a period.

PiperOrigin-RevId: 230689165
2019-01-29 16:41:13 +00:00
aquilescanta
fd081d49c7 Make the Cast demo app absorb remote queue changes
Necessary in two scenarios:
+ When the demo app starts casting to a receiver app that already
  had a queue.
+ When two demo apps are connected to the same receiver app and
  both make modifications.

PiperOrigin-RevId: 230546851
2019-01-29 16:41:02 +00:00
tonihei
d7b3820175 Make updateQueuedPeriods more readable and fix bug.
1. The method kept track of the current period index to check if the next
period is still in the correct period. This is unneccessary since we no longer
use the period index but the actual uid in MediaPeriodId and mismatches are
already detected by canKeepMediaPeriodHolder.
2. We updated the MediaPeriodIndfo twice: once in getFollowingMediaPeriodInfo
and once in getUpdatedMediaPeriodInfo. That's confusing and difficult to
follow. The only difference is that getUpdatedMediaPeriodInfo keeps the
content position while getFollowingMediaPeriodInfo resets it. This is made more
explicit for readability.
3. The durations compatibility check for all following periods was broken as
it compared the same durations (partly due to the confusion caused by 2.)

PiperOrigin-RevId: 230519295
2019-01-29 16:40:51 +00:00
olly
3a54d744b9 Default to respecting the DataSpec cache fragmentation flag
Issue: #4253
PiperOrigin-RevId: 230497544
2019-01-29 16:40:41 +00:00
aquilescanta
52f25f6ea8 Add HLS stream and remove non-working content from Cast demo app
PiperOrigin-RevId: 230496581
2019-01-29 16:40:31 +00:00
olly
4182f37b6e Make notification dismissible iff player is active
Seems like more useful default behaviour

PiperOrigin-RevId: 230356813
2019-01-29 16:40:20 +00:00
olly
de3a749b97 Fix scheduler NPE in DownloadService
PiperOrigin-RevId: 230260266
2019-01-29 16:40:09 +00:00
olly
29711b922d Cancel notification on dismiss
This doesn't happen automatically after all on older devices

PiperOrigin-RevId: 230251258
2019-01-29 16:39:56 +00:00
olly
9fec49f326 Update 2.9.4 release notes
PiperOrigin-RevId: 230220448
2019-01-29 16:39:45 +00:00
BAI Yanning
51632f027d
Update Ac4Reader.java 2019-01-25 16:49:43 +08:00
ybai001
e462c6aab7 Add AC-4 format support
* Add AC-4 MIME type definition
 * Add AC-4 format support in Mp4Extractor and TsExtractor
 * Add AC-4 Extractor
 * Add AC-4 playback support in MPEG-4, MPEG-DASH, TS and HLS
2019-01-25 16:32:45 +08:00
ybai001
460f576142 Add AC-4 format support
* Add AC-4 MIME type definition
 * Add AC-4 format support in Mp4Extractor and TsExtractor
 * Add AC-4 Extractor
 * Add AC-4 playback support in MPEG-4, MPEG-DASH, TS and HLS
2019-01-24 19:16:08 +08:00
tonihei
923aa420df Use loading period event time for fatal load errors.
ExoPlaybackExceptions of type SOURCE are always associated with the loading
period and thus we can use the event time for the loading period in
onPlayerError. Renderer and unexpected exceptions are still associated with the
currently playing period.

Issue:#5407
PiperOrigin-RevId: 230216253
2019-01-21 14:10:49 +00:00
andrewlewis
e671dac9a2 Fix GVR dependency
PiperOrigin-RevId: 230213842
2019-01-21 13:24:54 +00:00
olly
c2f6dd6b0a Only allow one layer of sub-directories in the cache for now
PiperOrigin-RevId: 230209898
2019-01-21 12:58:16 +00:00
tonihei
e4eaaedad3 Add max video size workaround for Amlogic decoder.
The Amlogic awesome decoder reduces the video size of interlaced videos by half
if the internal configuration isn't force reset with new maximum input size
values. The product of these new values must exceed 1920x1088 to force the
reset.

Issue:#5003
PiperOrigin-RevId: 230206675
2019-01-21 12:58:06 +00:00
olly
fb6154a905 Wipe database on downgrade
PiperOrigin-RevId: 230203593
2019-01-21 12:57:56 +00:00
aquilescanta
93e24561bb Add DefaultTsPayloadReaderFactory flag to ignore HDMV DTS streams
Prevents collisions with SCTE-35 subtitles.

Issue:#5330
PiperOrigin-RevId: 230195494
2019-01-21 12:57:46 +00:00
olly
82da627c1a Split out shared database components for reuse in caching
PiperOrigin-RevId: 229946997
2019-01-21 12:57:35 +00:00
tonihei
02dc937c78 Fix flaky DownloadIndexUtilTest.
PiperOrigin-RevId: 229934901
2019-01-21 12:57:25 +00:00
bachinger
57ed00873f bazel build and workspace to build cast receiver
PiperOrigin-RevId: 229934333
2019-01-21 12:57:15 +00:00
olly
14eb561e38 Use MediaCrypto.setMediaDrmSession to avoid black flicker
Issue: #3561
PiperOrigin-RevId: 229934093
2019-01-21 12:57:04 +00:00
aquilescanta
6a55fda66d Add DRM protected content to the Cast demo APP
Allows testing DRM-protected content in the receiver app.

Includes the DRM-related data to the media items, but does not
add support for DRM content in the local player yet.

PiperOrigin-RevId: 229932329
2019-01-21 12:56:53 +00:00
andrewlewis
310925ca12 Upgrade to GVR SDK 1.190.0
Change the dependency to the new monolithic GVR SDK target.

PiperOrigin-RevId: 229931549
2019-01-21 12:56:43 +00:00
tonihei
23c07e5c4d Update buffer-based ABR to not select track in constructor.
This mimicks a similar change in the default AdaptiveTrackSelection.
Also adds an option to cap initial format height.

PiperOrigin-RevId: 229923149
2019-01-21 12:56:33 +00:00
olly
ef24125d20 Fix release notes for 2.9.4
PiperOrigin-RevId: 229841782
2019-01-21 12:56:22 +00:00
tonihei
ac86d3b5f6 Add missing @Nullable to SimpleExoPlayer fields and methods.
Issue:#5402
PiperOrigin-RevId: 229758525
2019-01-17 17:26:35 +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
bachinger
76baa5724c solve nullness check warnings with asserts
PiperOrigin-RevId: 229755532
2019-01-17 17:26:14 +00:00
eguven
f2139d1b71 Add DownloadIndexUtil
This class includes helper methods to upgrade ActionFiles
and custom download records to DownloadIndex.

PiperOrigin-RevId: 229744441
2019-01-17 17:26:01 +00:00
bachinger
16a185de1d make PlayerNotificationListener better suited for foreground services
Issue: #5301
Issue: #4988
Issue: #4813
Issue: #5344
Issue: #5117
PiperOrigin-RevId: 229603354
2019-01-17 14:37:23 +00:00
eguven
ec77f737ee Make DownloadManager watch requirements directly
PiperOrigin-RevId: 229544734
2019-01-17 14:37:12 +00:00
bachinger
8adc16a623 allow developers to set the subText of the notifcation
Issue: #5344
PiperOrigin-RevId: 229527963
2019-01-17 14:37:00 +00:00
Zsolt Matyas
2621d962e7 CEA608: handling channel bits properly
[Problem]
CC1 is shown even when CC2-3-4 is selected

[Solution]
 * use incoming channel and frame information
 * Misc Codes need to handle use Frame information
 * Add checks everywhere

[Test]
* Live channels and already existing test should not show any difference
in behavior when CC1 is selected.
* Live channels might have CC2-CC3-CC4
* Sarnoff test content has specific test cases for channel support
2019-01-16 16:30:46 -08: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
olly
36883e6277 Bump version for 2.9.4 release
PiperOrigin-RevId: 229364563
2019-01-15 15:03:35 +00:00
Oliver Woodman
3b5e8ada31 Merge pull request #5355 from zsmatyas:dev-v2
PiperOrigin-RevId: 229364147
2019-01-15 15:03:24 +00:00
tonihei
b97b35e2e0 Add buffer flag for last sample to improve buffered position calculation.
The buffered position is currently based on the mimimum queued timestamp of
all AV tracks. If the tracks have unequal lengths, one track continues loading
without bounds as the "buffered position" will always stay at the shorter
track's duration.

This change adds an optional buffer flag to mark the last sample of the
stream. This is set in the Mp4Extractor only so far. ExtractorMediaSource
uses this flag to ignore AV streams in the buffered duration calculation if
they already finished loading.

Issue:#3670
PiperOrigin-RevId: 229359899
2019-01-15 14:29:07 +00:00
tonihei
fcda01eb5c Remove messages on release of ConcatenatingMediaSource.
That was previously handled by the player. But since we switched to Handler
messages instead of player messages, we should do that manually.

PiperOrigin-RevId: 229341747
2019-01-15 14:28:56 +00:00
tonihei
1900e94144 Do not select a track in AdaptiveTrackSelection constructor.
This is not necessary as the track selection needs to be updated with
updateSelectedTrack anyway. It's also error-prone as the selection code
calls into a protected method of a not fully initialized class.

PiperOrigin-RevId: 229331669
2019-01-15 14:28:46 +00:00
olly
9ab08bbe5d Fix DRM protected SmoothStreaming with subtitles
Issue: #5378
PiperOrigin-RevId: 229261658
2019-01-14 23:58:45 +00:00
olly
0bfbcea632 Reset requiresSecureDecoder boolean on codec release
PiperOrigin-RevId: 229253065
2019-01-14 23:58:35 +00:00
olly
1b62277a0b Disable cache fragmentation except for progressive
DataSpec.FLAG_ALLOW_CACHE_FRAGMENTATION is added to indicate to the
cache when fragmentation is allowed. This flag is set for progressive
requests only.

To avoid breaking changes, CacheDataSink defaults to ignoring the flag
(and enabling fragmentation) for now. Respecting the flag can be
enabled manually. DownloaderConstructorHelper enables respecting of
the flag.

Issue: #4253
PiperOrigin-RevId: 229176835
2019-01-14 23:58:25 +00:00