1501 Commits

Author SHA1 Message Date
andrewlewis
b1fcfa9677 Bump version for 2.9.6 release
PiperOrigin-RevId: 234578712
2019-02-19 18:06:00 +00:00
andrewlewis
5402f20216 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-19 09:18:56 +00:00
andrewlewis
c16af73717 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-19 09:10:21 +00:00
tonihei
85b8e1f706 Add back deprecated MediaSource.prepareSource for ExoPlayerSampleExtractor.
This should be removed after releasing.

PiperOrigin-RevId: 231380393
2019-02-19 09:07:20 +00:00
tonihei
a973b6f34f 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-02-19 09:05:14 +00:00
tonihei
5fc975b728 Replace isTopLevelSource check by period count check in AdsMediaSource.
The top level requirement only tried to ensure that the entire timeline only
has one period. This is already asserted by ImaAdsLoader. AdsMediaSource
itself works fine as long as the wrapped timeline has one period only. This
is now asserted instead.

PiperOrigin-RevId: 227682141
2019-02-19 08:59:35 +00:00
tonihei
caca14c5f9 Set Player separately in AdsLoader interface.
Passing the player through MediaSource.prepare is only needed for the AdsLoader
and complicates other usages of MediaSource. Providing the player directly to
the AdsLoader is also in line with the usage pattern of PlayerView and other
components.

Also rename methods to start/stop to better reflect their usage.

PiperOrigin-RevId: 227682112
2019-02-19 08:56:30 +00:00
Oliver Woodman
4d843da6b0 Remove failing test on 2.9.5 2019-02-10 19:06:35 +00:00
tonihei
6330d46d9e Improve housekeeping of ConcatenatingMediaSource callbacks.
When calling releaseSource(), all pending messages will be removed. That means
that all action-on-completion callbacks which are somewhere in flight are
just dropped without being called. This change adds code to keep track of the
current state of each callback to allow all of them being called when the
source is released.

Issue:#5464
PiperOrigin-RevId: 232312528
2019-02-04 19:58:34 +00:00
tonihei
9dc5c87079 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-02-04 19:58:13 +00:00
tonihei
22599a6d6c Pass Handler together with Runnable callbacks for playlist commands.
We currently either use the app thread returned by the player or the thread
the commands are called on depending on whether the media source is already
prepared or not.

This change lets the application decide which callback thread to use. As a
side effect, we also don't longer need access the player instance passed to
MediaSource.prepare.

PiperOrigin-RevId: 227871111
2019-02-04 19:57:41 +00:00
olly
fb81d629f0 Merge #5462: Making easier to set the playClearSampleWithoutKeys to renderers
Imported from GitHub PR https://github.com/google/ExoPlayer/pull/5462

Pull request for the following issue: #5421
Merge d9d88b079c4ca0533a836b2715a65b924babbb89 into a73819162751116acd3863cf5473b0ff78fac805

PiperOrigin-RevId: 232335113
2019-02-04 19:46:07 +00:00
olly
f8772fda21 Wider fix for OMX.SEC.mp3.dec issue
Issue: #4519
PiperOrigin-RevId: 232299233
2019-02-04 19:45:37 +00:00
olly
ba2ef0be94 Add additional device to output surface workaround
Issue: #4468
PiperOrigin-RevId: 231759438
2019-01-31 14:08:32 +00:00
Oliver Woodman
4a946550c9 Update version 2019-01-30 22:33:12 +00:00
aquilescanta
92e60d2edb Add DefaultTsPayloadReaderFactory flag to ignore HDMV DTS streams
Prevents collisions with SCTE-35 subtitles.

Issue:#5330
PiperOrigin-RevId: 230195494
2019-01-30 20:09:49 +00:00
andrewlewis
4acdc8d0b7 Fix buffered position when loading has not completed
If there is data after the last samples in the container, we may request
continue loading after the last samples have been read but before the load has
completed. In this situation the buffered position is returned as
Long.MAX_VALUE, which prevents continuing loading, yet the media period is not
treated as fully buffered because its buffered position is not
C.TIME_END_OF_SOURCE.

PiperOrigin-RevId: 231406964
2019-01-30 19:47:07 +00:00
andrewlewis
21e593a14d Fix float output capability check
Float output is only possible from API 21, but the high-res int
to float conversion path was checking for 32-bit PCM not float
output capability.

PiperOrigin-RevId: 231172495
2019-01-30 19:45:37 +00:00
olly
a96d26dbc1 Clarify LoopingMediaSource documentation
PiperOrigin-RevId: 231171425
2019-01-30 19:45:25 +00:00
tonihei
0b49d002f1 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:18:59 +00:00
tonihei
563d3c20ab 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 13:22:59 +00:00
tonihei
29376b3dd2 Add missing @Nullable to SimpleExoPlayer fields and methods.
Issue:#5402
PiperOrigin-RevId: 229758525
2019-01-21 13:18:55 +00:00
tonihei
9911c11191 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 19:07:49 +00:00
olly
84574d9c11 Bump version for 2.9.4 release
PiperOrigin-RevId: 229364563
2019-01-15 15:06:18 +00:00
tonihei
e1b55e6d27 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:31:18 +00:00
tonihei
66ca43ed1d Don't forget isSeekable in ExtractorMediaSource.
We currently forget whether a source is seekable at re-preparation. This was
implemented intentionally this way under the assumption that we really can't seek
until we have loaded the seek map again. However, seek operations are only
allowed after a media period is prepared. So there is no harm in remembering
whether a source is seekable.

This problem currently prevents reusing ClippingMediaSources with
ExtractorMediaSource and a non-zero start clip position.

Issue: #5351
PiperOrigin-RevId: 229169441
2019-01-15 14:13:34 +00:00
andrewlewis
34d0e0cea1 Blacklist OMX.SEC.mp3.dec for more devices
Issue: #4519
PiperOrigin-RevId: 229145790
2019-01-15 14:13:03 +00:00
tonihei
81ca7fe090 Add missing call to timeline.getWindow.
The window object is used without being filled with data. This used to work
well for most cases as the same live stream is sending regular updates and the
first update is almost never used if it's not the first item in a playlist.

It causes problems when the first timeline update of a live stream is actually
used for playback (e.g. when the live stream is lazily prepared in a playlist
and played first).

PiperOrigin-RevId: 228530232
2019-01-15 14:12:25 +00:00
olly
80645056d2 Doc fix.
PiperOrigin-RevId: 228296962
2019-01-15 14:11:25 +00:00
aquilescanta
32bad69158 Increase search size in mp4 sniffing once moov has been found
Issue:#5320
PiperOrigin-RevId: 228142567
2019-01-15 14:10:53 +00:00
andrewlewis
99bc13221c Treat AVERROR_INVALIDDATA as non-fatal
Also configure the FFmpeg context to ignore errors as far as possible (this
appears to have an effect only for certain decoders).

Issue: #5293
PiperOrigin-RevId: 227851397
2019-01-15 14:10:02 +00:00
andrewlewis
189e3c31be Fix nullness issue
PiperOrigin-RevId: 227822937
2019-01-15 14:09:18 +00:00
andrewlewis
a568fbdd51 Parse frame rate from 'mdta' metadata
PiperOrigin-RevId: 227813461
2019-01-15 14:09:04 +00:00
aquilescanta
4847889a2f Prevent IllegalStateException in Mp4 sniffing
If a negative value is read, sniffing should just fail.

PiperOrigin-RevId: 227689568
2019-01-15 14:07:59 +00:00
aquilescanta
61a7750f23 Enable setOutputSurfaceWorkaround for Huawei P10 lite
Issue:#5312
PiperOrigin-RevId: 227673949
2019-01-15 14:07:28 +00:00
aquilescanta
aff689a7da Fix bug when calculating EOF position in mp4 sniffing
PiperOrigin-RevId: 227668426
2019-01-15 14:07:18 +00:00
tonihei
fc16833903 Use Handler instead of ExoPlayer messages in ConcatenatingMediaSource
ExoPlayer methods must not be called from any thread besides the specified
app thread. Therefore we shouldn't use them here. Using a regular Handler
instead is fully equivalent.

Issue:#5240
PiperOrigin-RevId: 227650489
2019-01-15 14:07:05 +00:00
andrewlewis
f11abbda97 Fix replacement char check
PiperOrigin-RevId: 227646358
2019-01-15 14:06:47 +00:00
olly
6373554d6a Move syncFileDescriptor to use an experimental method
PiperOrigin-RevId: 227520168
2019-01-15 14:05:21 +00:00
andrewlewis
d3f5057d59 Handle rectangular rotation projections in Matroska
See also https://github.com/Matroska-Org/matroska-specification/issues/269.

PiperOrigin-RevId: 226758584
2019-01-15 14:03:54 +00:00
olly
f042ae4cf3 Don't write CachedContentIndex to disk on key removal
Issue: #5136
PiperOrigin-RevId: 224857629
2018-12-20 21:41:47 +00:00
olly
c73c6f2013 Bump for 2.9.3
PiperOrigin-RevId: 226356810
2018-12-20 21:18:41 +00:00
Oliver Woodman
4ccfa6f068 Fix buffer size for renderers with TRACK_TYPE_NONE
This includes NoSampleRenderers.
2018-12-20 12:31:20 +00:00
Oliver Woodman
6060b8113d Relax audio decoder capability checks
Issue: #5145
2018-12-19 22:01:20 +00:00
aquilescanta
f6165f753c Mitigate the need for FLAG_ALLOW_NON_IDR_KEYFRAMES
Use random access indicator in transport streams

Issue:#1967
Issue:#2020
Issue:#2182
Issue:#2469
Issue:#2581
Issue:#2748
Issue:#2939
Issue:#2979
Issue:#3316
Issue:#3574
Issue:#3709
Issue:#3747
Issue:#4103
Issue:#4184
Issue:#4355
Issue:#4538
Issue:#4719
Issue:#4861
Issue:#4925
Issue:#4951
Issue:#5108
Issue:#5186
PiperOrigin-RevId: 225798044
2018-12-19 21:56:58 +00:00
Oliver Woodman
fa82004fa3 Merge pull request #5066 from szaboa:feature/1583_support_png_ttml
PiperOrigin-RevId: 225531695
2018-12-19 21:51:36 +00:00
olly
ca9ecaa448 Blacklist OMX.SEC.mp3.dec for more devices
Issue #4519

PiperOrigin-RevId: 226205245
2018-12-19 21:50:26 +00:00
andrewlewis
975ed6c277 Use the true bitrate for CBR MP3 seeking
PiperOrigin-RevId: 225989898
2018-12-19 21:50:14 +00:00
Oliver Woodman
78cdd5fee1 Merge pull request #5216 from mseroczynski:dev-v2
PiperOrigin-RevId: 225966289
2018-12-19 21:49:48 +00:00
olly
abdb58485f Add Player.MetadataComponent for completeness
PiperOrigin-RevId: 225795581
2018-12-19 21:49:21 +00:00