1477 Commits

Author SHA1 Message Date
tonihei
3a802eb06c Add onDrmSessionAcquired and onDrmSessionReleased callbacks.
To report DRM session metrics in the future as part of the listener, we need
a callback at the end of the drm session to get the final metric state.
For completion, the session acquired callback is also added.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211328412
2018-09-03 14:15:51 +01:00
aquilescanta
514edb699f Add a type check for OGG files with a single payload page
Also make some javadocs more consistent with the rest of the library.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211071559
2018-09-03 14:12:47 +01:00
borrelli
595b6b8fde Add unit tests for AudioFocusManager.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210714110
2018-09-03 14:11:10 +01:00
tonihei
d308fff88d Restructure media period queue tracker in AnalyticsCollector.
The current structure tries to associate events to media periods and windows
based on the reported values and the current timeline. However the reported
EventTime may not always be consistent in case the timeline doesn't contain
windows or media periods yet or not anymore.

The recent changes to MediaPeriodId allow to use it as a unique identifer for
media periods independent of the timeline. This enables more accurate tracking
of the media period queue and prevents reporting events with inconsistent
data.

Issue:#4492
Issue:#4634

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210713120
2018-09-03 14:09:35 +01:00
eguven
ca0e276798 Reset camera motion rotation when camera motion track is disabled
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210696525
2018-09-03 14:07:58 +01:00
olly
13889c9116 Pass multiple PSSH boxes to Widevine CDM
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210551848
2018-09-03 14:06:22 +01:00
tonihei
6b9e1824ad Extend updateSelectedTrack method with additional information.
This provides the list of currently buffered media chunks and iterators over
the potential next chunks to the track selection. Having these two parameters
enables more advanced decision logic based on this data.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210551812
2018-09-03 14:04:45 +01:00
Art Vynogradov
89080874af Add parsing a-law and mu-law atom types 2018-08-29 16:23:34 +02:00
eguven
a429f4819e Use camera motion metadata to stabilize 360 videos
RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210537375
2018-08-28 16:43:53 +01:00
olly
ce1d8d6ce2 Remove obsolete SDK_INT modification
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210531569
2018-08-28 16:42:28 +01:00
andrewlewis
efe8f09f45 Propagate EoS in renderer when using video tunneling
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210529471
2018-08-28 16:40:55 +01:00
eguven
23817eecfd Release zip inflater when finished
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210513776
2018-08-28 16:38:42 +01:00
tonihei
d0161ad18b Fix all error-prone, style, optional suggestion, etc. issues.
This fixes or suppresses all reported issues by the code review linter tools.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210107759
2018-08-28 16:37:14 +01:00
olly
ff1812d3fe Fix ClearKey prior to API 27
There are C.CLEARKEY_UUID.equals(uuid) checks in FrameworkMediaDrm,
so uuid needs to be CLEARKEY_UUID, not COMMON_PSSH_UUID

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210094372
2018-08-24 16:17:45 +01:00
olly
fdda2bb841 Make setConstantBitrateSeekingEnabled consistent with other method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210093143
2018-08-24 16:16:24 +01:00
olly
924a76d532 Clean up use of deprecated APIs
- Add @Deprecated on overrides of deprecated method.
- Suppress deprecation warnings where appropriate.
- Use non-deprecated alternatives where appropriate.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210092434
2018-08-24 16:12:44 +01:00
olly
0da7f6ca08 Use EventLogger in ExoHostedTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210082909
2018-08-24 16:11:07 +01:00
tonihei
335fa13063 Use set-like behaviour for BaseDataSource listeners.
This prevents problems caused by unintended double-registration of the same
transfer listener.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210078454
2018-08-24 16:07:11 +01:00
tonihei
a71e28440d Add parameter to force disable adaptive track selection.
This option is currently not available as a non-null adaptive track selection
has to be provided. Adds a parameter "forceHighestSupportedBitrate" which
corresponds to the default fixed track selection for audio and video.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210073675
2018-08-24 16:04:06 +01:00
andrewlewis
9c36773602 Fix playback of postrolls with multiple ads
At the point of starting to play a postroll, source info refreshes for future
postroll ads in the same ad group would cause a seek that incorrectly identified
the media period to play as the content media period. Fix the logic in
getAdGroupIndexForPositionUs to address this.

Also handle empty postroll ad breaks by resetting the expected ad group index
when we send content complete.

Issue: #4710
Issue: #4681

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210071054
2018-08-24 16:02:38 +01:00
olly
4d8a5c44b3 Fix some more lint issues
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209947034
2018-08-24 15:59:32 +01:00
tonihei
2a9d5c21e2 Clarify doc for Player.getDuration and add Player.getContentDuration.
Similar to getBufferedPosition and getCurrentPosition, getDuration should
mention that it also returns the duration of the current ad.

And, also similar to getContentBufferedDuration and getContentPosition, a
new method getContentDuration simplifies querying the content duration while
playing an ad.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209914696
2018-08-24 15:58:01 +01:00
tonihei
74e2384fb6 Add response headers to LoadEventInfo.
The response headers of the last load are available from the loading source
when creating media source events and can be easily forwarded.

Issue:#4361
Issue:#4615

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209900693
2018-08-24 15:55:01 +01:00
tonihei
4bf5e4991c Improve IntDef javadoc.
The doc can be improved by enumerating and linking all possible values from
the interface doc.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
2018-08-24 15:53:30 +01:00
eguven
14c7c2995c Add android.permission.FOREGROUND_SERVICE
Apps targeting P or later now must request this permission in order to
use foreground services.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209762160
2018-08-24 15:51:58 +01:00
eguven
509be44fe8 Ignore cache span rename error
This happens rarely and SimpleCache can continue fine.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209759996
2018-08-24 15:50:28 +01:00
olly
9f0303b079 Fix a bunch of misc analysis warnings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209758330
2018-08-24 15:48:58 +01:00
olly
9ccbb5bd6d Add some missing Nullable annotations
Also remove NonNull, since we assume NonNull by default. Except
where explicitly overriding a method with NonNull annotated args,
in which case we're still expected to use it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209758204
2018-08-24 15:47:31 +01:00
eguven
02a8964fe2 Support VR180 videos
If available parse and use spherical metadata:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md

RELNOTES=true

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209754080
2018-08-24 15:44:24 +01:00
tonihei
bf43cca302 Fix flaky ExoPlayerTest tests.
Some tests were flaky because of the PlayUntilPosition action which called
player.setPlayWhenReady from the wrong thread. Also fixed some other misc
flakiness.

ExoPlayerTest seems to be non-flaky now (tested with 10000 runs).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209743076
2018-08-24 15:39:49 +01:00
aquilescanta
afebd60ee4 Do not seek to the start of live Transport Streams after preparation
Issue:#4666

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209742008
2018-08-24 15:36:44 +01:00
olly
bcc69efc7c Remove deprecated SimpleExoPlayer constructor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209580625
2018-08-24 15:35:10 +01:00
tonihei
d51b98dd1f Replace period index with uid in MediaPeriodId.
The MediaPeriodId with index is only properly defined together with a
timeline containing the index. Changing it to the period uid allows to use
the MediaPeriodId independent of the corresponding timeline.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209430257
2018-08-24 15:32:11 +01:00
aquilescanta
2cd7d7102b Add DummyExtractorOutput
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209417004
2018-08-24 15:29:04 +01:00
andrewlewis
5c2dd9ca42 Move all tests to JUnit 4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209412403
2018-08-24 15:25:56 +01:00
olly
05dcf502e5 Add missing cases to IntDef switch + fix default locale usage
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209396260
2018-08-24 15:24:14 +01:00
eguven
b58f6940eb Add VideoFrameMetadataListener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209193233
2018-08-24 15:21:03 +01:00
olly
bd8a956d53 Use lamdas everywhere
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209162373
2018-08-24 15:19:30 +01:00
olly
b34c46415d Bump version to 2.8.4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209134753
2018-08-17 13:27:42 +01:00
andrewlewis
d05d2fcea9 Support seamless adaptation of xHE-AAC audio streams
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209113673
2018-08-17 11:15:58 +01:00
olly
7a34869f9a Fix seeking in progressive live streams
Issue: https://github.com/google/ExoPlayer/issues/4493

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208992790
2018-08-16 17:15:25 +01:00
Oliver Woodman
32bd69d4b2 Cleanup recent merged pull requests 2018-08-16 17:02:08 +01:00
ojw28
52b6b3b8e0
Merge pull request #4564 from BrainCrumbz/feat/playlist-remove-range
feat(playlist): remove MediaSource range
2018-08-16 16:45:47 +01:00
olly
94c7fbbc24 Add more information to unexpected assertion failure
Issue: #4532

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208968252
2018-08-16 16:42:09 +01:00
andrewlewis
80f5b7e7b2 Check CodecProfileLevels for audio decoders
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208796064
2018-08-16 16:40:45 +01:00
andrewlewis
e7ef75342c Scale up initial video decoder maximum input size
When playing a playlist where the exact maximum input size is known from the
container for each item, it may be necessary to recreate the decoder to increase
its maximum input buffer size at the point of transitioning from one item to the
next, which can make transitions non-seamless.

Scale up the initial video decoder maximum input size so playlist item
transitions with small increases in maximum sample size don't require
reinitialization.

Issue: #4510

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208650244
2018-08-16 16:39:38 +01:00
aquilescanta
c5bc2d5f80 Add support for reporting AudioCapabilities changes on custom threads
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208622197
2018-08-16 16:38:32 +01:00
andrewlewis
8854aa415f Add support for setting auxiliary audio effects
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208611493
2018-08-14 10:02:58 +01:00
bachinger
c4024e17f6 adjust timestamps for cea608 and emsg in FMP4
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208526775
2018-08-14 10:01:58 +01:00
andrewlewis
32035e1bf3 Fix NPE in ExtractorMediaPeriod
Also turn on nullity checks for ExtractorMediaPeriod.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=208467644
2018-08-14 10:00:31 +01:00