3811 Commits

Author SHA1 Message Date
josephmarques
aa7134d538 Adds support for the messageData attribute of the Event element in DASH MPDs for ExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211854408
2018-09-12 14:55:34 +01:00
aquilescanta
f47f1b9f4b Remove BOM check in Webvtt header checks
Reverts the BOM check changes in []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211826731
2018-09-12 14:54:06 +01:00
tonihei
67a2bb3d28 Fix various period preparation and source info refresh error throwing issues
1. Currently, we may throw source info refresh errors while the previous media
   period is still playing.
2. We don't throw if the next period in a playlist fails to prepare and the
   previous renderers are all disabled.
3. We throw source info refresh errors for playlists before playback reaches
   the culprit source.

This change:
1. Defers the exceptions until all existing media periods have been played.
2. Checks for period preparation exception if the next period is not
   getting prepared and the renderer time reached the next period.
3. Does no longer throw from ConcatenatingMediaSource.maybeThrowSourceInfo
   RefreshError. The deferred media periods take care of that for each source
   individually.

Issue:#4661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211819436
2018-09-12 14:52:33 +01:00
olly
502fae7cd4 Bump version to 2.9.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211792952
2018-09-06 13:47:59 +01:00
olly
c3c309b8a8 Blacklist OMX.SEC.mp3.dec on SM-T530
Issue: #4519

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211646358
2018-09-06 12:04:48 +01:00
bachinger
0e12eb4d92 Dispatch notification actions to the originating PlayerNotificationManager only.
Issue #4643

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211613803
2018-09-06 12:00:55 +01:00
olly
c57fe1897c Add ExoPlayer.retry convenience method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211463309
2018-09-05 12:33:28 +01:00
aquilescanta
7959a691ad Add sniffing to WebvttExtractor
Preparation for sniffing in HLS

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211455454
2018-09-05 12:31:06 +01:00
olly
80e64e58ec WAV: Don't output data beyond the data limit
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211446207
2018-09-05 12:28:13 +01:00
Oliver Woodman
29ab6f7466 Automatic styling fix 2018-09-03 15:19:51 +01:00
ojw28
fc47f2222c
Merge pull request #4747 from kolpacheque/issue-4360-pcm-mulaw-support
Add parsing a-law and mu-law atom types
2018-09-03 15:17:18 +01:00
olly
8d0c4b1b87 Fix some Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211352749
2018-09-03 15:16:47 +01:00
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
eguven
5335b258de Make SceneRenderer implement VideoFrameMetadataListener and CameraMotionListener
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=211084127
2018-09-03 14:14:23 +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
olly
38f2f352f9 Move playback tests off deprecated APIs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210077548
2018-08-24 16:05:40 +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
aquilescanta
24d04a26e4 Add support for variable substition in HLS
Issue:#4422

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209958623
2018-08-24 16:01:08 +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
eguven
3f70454cc2 Fix controller ui toggling when using SphericalSurfaceView
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209909845
2018-08-24 15:56:28 +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
56aecf6614 Make HLS and SS chunk iterators private.
They don't need to be accessed publicly and are can be moved into the
respective chunk sources. This is the same structure used for Dash.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209507217
2018-08-24 15:33:41 +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