4432 Commits

Author SHA1 Message Date
olly
322e15f63b Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187165173
2018-03-02 09:02:35 +00:00
Oliver Woodman
aa57062199 Restore equivalence 2018-02-27 13:57:18 +00:00
ojw28
51405c9959
Merge pull request #3863 from drhill/dev-v2_mkvDIVX
add h263 format support in fourcc codecID
2018-02-27 11:24:44 +00:00
ojw28
dc34ff2e6b
Merge pull request #3771 from reudismam/dev-v2
Use the pattern "string literal".equals(something) to prevent NPE …
2018-02-27 11:24:29 +00:00
ojw28
932abaf0bc
Merge pull request #3887 from CoryCharlton/dev-v2
Add abstract logging methods to EventLogger
2018-02-27 11:24:12 +00:00
ojw28
926a276c80
Merge pull request #3900 from AdityaAnand1/patch-1
replace 'compile' with 'implementation'
2018-02-27 11:24:04 +00:00
olly
803f15dec7 Sync issue template
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187026802
2018-02-27 11:06:34 +00:00
tonihei
b47fb2826b Move extension tests to Robolectric.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187021822
2018-02-27 11:03:50 +00:00
olly
d400efd0f7 Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187021535
2018-02-27 11:02:12 +00:00
Oliver Woodman
5dade71609 Merge branch 'release-v2' into dev-v2 2018-02-26 15:45:24 +00:00
olly
099cc384a8 Move scheduler into its own top level package
The util package is, in practice, for things that are misc enough
to not warrant their own package. If something is deserving of a
package, it's IMO best placed somewhere else (I know you could
argue it's a util, but you could argue that about almost anything
else as well).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187010018
2018-02-26 15:41:18 +00:00
olly
0de6bb28a2 Fix broken Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186999051
2018-02-26 15:41:18 +00:00
andrewlewis
c4f82514bf Fix ImaAdsMediaSource isTopLevelSource
AdsMediaSource must be top-level. Currently the (deprecated) ImaAdsMediaSource
can't be used because it prepares its contained AdsMediaSource as a child
source.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186990882
2018-02-26 15:41:18 +00:00
olly
f2f5aac7c5 Allow audio position to jump on first input buffer
Allow the position to jump on receiving the first presentable input buffer,
if and only if the buffer timestamp differs significantly from what was
expected. This prevents a stuck buffering case for streams that are thought
to start at t=0, but actually start at t=large_value.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186990214
2018-02-26 15:41:18 +00:00
Aditya Anand
707b481f2c
replace 'compile' with 'implementation' 2018-02-26 09:11:02 +05:30
Cory Charlton
9f2d53dc21 Fixed the Log.d call in loge 2018-02-23 09:15:14 -08:00
Cory Charlton
afd81146f5 Add abstract logging methods to EventLogger 2018-02-22 13:47:10 -08:00
ojw28
eb9c67fbc5
Merge pull request #3882 from google/dev-v2-r2.7.0
r2.7.0
2018-02-22 11:48:01 +00:00
Oliver Woodman
166c4ba795 Remove dev release notes from 2.7.0 2018-02-22 11:43:02 +00:00
Oliver Woodman
1f6607a9aa Merge branch 'release-v2' into dev-v2-r2.7.0 2018-02-22 11:39:57 +00:00
Oliver Woodman
6054ba418f Fix bad Javadoc 2018-02-22 11:14:03 +00:00
Oliver Woodman
1a5d985e2a Remove stray translations 2018-02-22 10:24:11 +00:00
Oliver Woodman
2cff596162 Allow audio position to jump on first input buffer
Allow the position to jump on receiving the first presentable input buffer,
if and only if the buffer timestamp differs significantly from what was
expected. This prevents a stuck buffering case for streams that are thought
to start at t=0, but actually start at t=large_value.
2018-02-22 10:05:16 +00:00
olly
f69cc191ab Drop EMSG atoms before MOOV
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186454715
2018-02-21 23:42:24 +00:00
olly
e3d4464635 Drop EMSG atoms before MOOV
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186454715
2018-02-21 23:40:48 +00:00
olly
93a40d1048 Fix bad @see Javadoc in CastPlayer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186305613
2018-02-20 16:31:13 +00:00
olly
fba2b46a8b Fix bad @see Javadoc in CastPlayer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186305613
2018-02-20 16:29:55 +00:00
Oliver Woodman
5e6a2e57af Fix issue template 2018-02-20 14:36:33 +00:00
olly
c851ee9388 Fix robolectric tests when running with gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186291489
2018-02-20 14:36:26 +00:00
Oliver Woodman
356e979187 Fix issue template 2018-02-20 14:36:11 +00:00
olly
44f683e04e Fix robolectric tests when running with gradle
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186291489
2018-02-20 14:32:34 +00:00
Oliver Woodman
d7a467c6be Remove unnecessary strings for 2.7.0 2018-02-20 13:39:48 +00:00
olly
db1f9d0a0f Bump to 2.7.0 and prepare release notes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186200840
2018-02-20 11:27:11 +00:00
andrewlewis
da27e7d22c Fix content progress updates and position faking
Occasionally the player could transition from playing content to playing an ad
after IMA called playAd. The discontinuity triggered faking the content
position, and the fake position was passed to IMA when content resumed causing
the wrong ad group to be loaded. Fix this by only faking the position if the
player transitions before playAd.

Also fix the calculation of the expected ad group index for a postroll ad, and
wait for the player to transition back from ad to content before passing a
content progress update.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185994229
2018-02-20 11:24:56 +00:00
andrewlewis
20dc5dc096 Catch exceptions in all IMA callbacks
If an exception is thrown in an IMA callback it crashes the process with lots of
logging from WebView (including several stack traces, etc.). This change wraps
ImaAdsLoader code that might throw, skips any remaining ads (as the errors are
not recoverable, in general) and notifies a new load error callback so that the
application can implement its own handling. The intention is to make the loader
robust to unexpected requests from IMA and avoid crashes.

Also handle IMA loading an ad in an ad group that has no available ads. In rare
cases IMA will try to load an ad for which an error was previously notified, so
this drops those load requests allowing playback of the content to continue.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185985850
2018-02-20 11:24:56 +00:00
aquilescanta
b36db1a87e Add little endian and 14-bit mode support for DtsReader
Issue:#3340

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185973510
2018-02-20 11:24:56 +00:00
tonihei
454ec5a2d7 Add window sequence number to MediaPeriodId.
All media periods are part of a queue of windows buffered and played by
ExoPlayer. When repeating windows, the current MediaPeriodId is insufficient
to distinguish between the repetitions of the same period. This makes it hard
to see to which media period load events belong to, and it is also difficult to
determine whether two media periods belong to the same logical window or
whether they are part of different repetitions of the same window.

Therefore this change adds a unique sequence number to each window in the
sequence of windows and this sequence number is saved as part of the
MediaPeriodId.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185829509
2018-02-20 11:24:56 +00:00
andrewlewis
fe2b01c57e Fix content progress reporting if there is no preroll
If there was no preroll and the pending content position was set before the
first midroll, the pending content position was never cleared so loading the ad
was never triggered.

Only set a pending content position if we know that we need to trigger playing
an ad for the current position and IMA will poll for an ad (because there is a
midroll ad group). Clearing the pending content position happens when IMA pauses
content to play the ad.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185818315
2018-02-20 11:24:56 +00:00
andrewlewis
1c140603d4 Fix handling of ad group load errors
IMA sometimes delivers an ad group load error just after the time of the ad
group, which is problematic now that we set the expected ad group index based on
the last returned content progress.

Only update the expected ad group index once we are within a fixed preloading
threshold of the next ad.

Also fix updating the ad group to use the new ad count, and check for ad group
load errors when we have no expected ad group defensively.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185803086
2018-02-20 11:24:56 +00:00
tonihei
bc792c3202 Broaden the surface switching workaround to other Moto C+ variants.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185681751
2018-02-20 11:24:56 +00:00
andrewlewis
95f298f5a4 Fix handling of ad tags with only preroll and postroll ads
Content progress is only polled if there are midroll ad groups. If the ad tag
had only preroll/postroll ads, the pending content position was not provided to
IMA, which meant that the postroll ad could never play.

Only set the pending content position if there are midroll ads.

Issue: #3715

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185680803
2018-02-20 11:24:56 +00:00
aquilescanta
4276a199ba Add initial support for EXT-X-GAP
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185676652
2018-02-20 11:24:56 +00:00
eguven
0ae56cc117 Fix SmoothStreaming manifest url for downloading
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185526653
2018-02-20 11:02:59 +00:00
olly
93e6813f76 Use stable order for subtitle buffers with identical timestamps
Issue: #3782

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185673731
2018-02-20 10:51:19 +00:00
aquilescanta
8dad8fde78 Fix CeaUtil's invalid SeiMessage skipping
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185673454
2018-02-20 10:51:19 +00:00
aquilescanta
ed527437b7 Make ID3 GEOB frames parsing more robust
Issue:#3792

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185668919
2018-02-20 10:51:19 +00:00
andrewlewis
5bd744000c Handle VAST_LINEAR_ASSET_MISMATCH
This error marks the current ad group as unplayable.

Issue: #3801

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185663472
2018-02-20 10:51:19 +00:00
tonihei
1d7e8efbdf Add Meizu M5C, Lenovo K4 Note, and Sony Xperia E5 to surface workaround.
Also added comments for all existing devices for easier reference.

Issue:#3835
Issue:#3236

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185661900
2018-02-20 10:51:19 +00:00
andrewlewis
4ca755a344 Skip ads for which the media failed to prepare
Also make ad group skipping more robust. After calling onError for an ad, IMA
will sometimes trigger an ad group load error, so this needs to be handled in a
way that allows some ads to be loaded already for the ad group.

This change also fixes calculation of the expected ad index to take into account
whether the position is being faked to trigger loading an ad or is the actual
player position.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185655844
2018-02-20 10:51:19 +00:00
andrewlewis
7b5bdd3c44 Release Extractors on the loading thread
Releasing the player released the internal playback thread once renderers were
released. Releasing a MediaPeriod queued a Loader.ReleaseTask on the loading
thread which would post back to the playback thread. If the playback thread had
been quit by the time this happened, the release task wouldn't be run.

Release on the loading thread instead of the playback thread. This avoids
needing to block releasing the player until the loading threads have ended, and
ensures that release tasks will run eventually. As part of this change,
ExtractorMediaPeriod's call to Extractor.release will now run on the loading
thread (which means that all Extractor methods are called on that thread) and
other cleanup in ReleaseCallback will run on the loading thread instead of the
playback thread.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185651320
2018-02-20 10:51:19 +00:00