3346 Commits

Author SHA1 Message Date
falhassen
c116391fe2 Override RangedUri#toString.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193710604
2018-05-07 05:51:53 +01:00
andrewlewis
30e040a48d Add @DrawableRes for player notification manager icon
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193670840
2018-05-07 05:50:50 +01:00
andrewlewis
9de4e5d7ac Make MediaDescriptionAdapter the last argument
If the caller wants to pass an anonymous inner class for the media description
adapter, this results in slightly more readable code.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193666444
2018-05-07 05:49:45 +01:00
aquilescanta
400619c1c6 Preemptively declare an ID3 track for HLS chunkless preparation
Issue:#3149
Issue:#4016

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193664294
2018-05-07 05:48:42 +01:00
olly
a1b8aa1514 Adding useful track selection strings
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193663850
2018-05-07 05:47:33 +01:00
eguven
53a003bae2 Start downloads on DownloadService creation if there are no requirements
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193662396
2018-05-07 05:46:02 +01:00
andrewlewis
b125d79ed6 Add a convenience constructor for a notification manager + channel
Also fix duplicate action strings when using a custom stop action, and do some
misc no-op cleanup.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193652377
2018-05-07 05:44:57 +01:00
eguven
80c28f14b3 Re enable single SimpleCache instance assertion and add helper methods
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193637830
2018-05-07 05:42:40 +01:00
falhassen
0666e4f306 Override ChunkIndex#toString.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193600860
2018-05-07 05:41:36 +01:00
andrewlewis
117dd6f33f Mark optional parameters @Nullable
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193530582
2018-05-07 05:39:18 +01:00
andrewlewis
2b367759cf Allow overriding skipping/scaling with custom AudioProcessors
Issue: #3142

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193519029
2018-05-07 05:38:10 +01:00
aquilescanta
d2c6871ce6 Fix HLS encryption method detection
Issue:#4145

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193494319
2018-05-07 05:37:04 +01:00
olly
cdb13dd548 Make SelectionOverride parcelable
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193494016
2018-05-07 05:35:55 +01:00
andrewlewis
5fe0b0a13b Fix @link typo
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193491200
2018-05-07 05:34:49 +01:00
eguven
35e3892dbf Invoke CacheDataSource EventListener.onCacheIgnored once per request
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193480939
2018-05-07 05:33:45 +01:00
andrewlewis
8bbdb1b143 Add an @IntDef for notification channel importance
This is to avoid callers needing to do an API check or suppress inlined constant
warnings.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193476188
2018-05-07 05:32:40 +01:00
olly
d4aceef8a8 Add getPlaybackError to Player/ExoPlayer interface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193400443
2018-05-07 05:31:37 +01:00
eguven
a8e16f3cfe Simplify DownloadService notification requirements
This makes DownloadService easier to use in general and when only single
notification is used for all downloads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193165982
2018-05-07 05:29:20 +01:00
olly
fec7d32836 Remove TrackSelection.Factory from SelectionOverride
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193045534
2018-05-07 05:28:06 +01:00
olly
e99b8802eb Update translations
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193044028
2018-05-07 05:27:02 +01:00
olly
45ed7c304c Update moe equivalence
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193016758
2018-05-07 05:25:36 +01:00
Oliver Woodman
d4eb2e5b85 Resync internal/external codebases 2018-04-16 11:36:59 +01:00
ojw28
b5912efb03
Merge pull request #3921 from wischnow/dev-v2
support zlib compressed PGS subtitles
2018-04-16 11:07:26 +01:00
ojw28
650f96fd6e
Merge pull request #4000 from jianx9/dev-v2
Provide an option to skip file descriptor sync in CacheDataSink. closeCurrentOutputStream
2018-04-16 11:07:11 +01:00
tonihei
92dd708ef8 Automated g4 rollback of changelist 192816182.
*** Reason for rollback ***

Added the missing initialization to Timeline.EMPTY.

*** Original change description ***

Automated g4 rollback of changelist 192742299.

*** Reason for rollback ***

Culprit for b/78018932.

*** Original change description ***

Auto-register analytics collector in SimpleExoPlayer.

This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.

***

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193006701
2018-04-16 10:55:42 +01:00
falhassen
752b90027c Automated g4 rollback of changelist 192742299.
*** Reason for rollback ***

Culprit for b/78018932.

*** Original change description ***

Auto-register analytics collector in SimpleExoPlayer.

This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192816182
2018-04-16 10:54:28 +01:00
vyao
ebc1b2d2cc Automated g4 rollback of changelist 191834511.
*** Reason for rollback ***

Rolling back to re-disable the exception as the crash is still appearing on latest version

*** Original change description ***

Automated g4 rollback of changelist 191128111.

*** Reason for rollback ***

This was a temp fix to be cherrypicked into YouTube Andorid Main App 13.12  to resolve P0 b/77315136.

*** Original change description ***

Temp fix for b/77315136: Don't lock or check cache directories in SimpleCache

To be immediately rolled back after submission

Submitting on behalf of cblay.

***

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192789263
2018-04-16 10:53:07 +01:00
olly
67cde97a70 Move code unrelated to mapping to DefaultTrackSelector
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192759210
2018-04-16 10:47:55 +01:00
olly
0ee3963789 Follow 307/308 POST redirects for license requests
I was considering putting this directly in DefaultHttpDataSource, however:

- We'd need to modify at least OkHttpDataSource as well. I'm not sure whether
  Cronet follows this type of redirect automatically or not.
- HttpDataSource instances don't know how they're going to be used, so it's
  probably correct that they behave like the underlying network stack.

Issue: #4108

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192745408
2018-04-16 10:46:38 +01:00
andrewlewis
22b8ab5c09 Fix initial application of playback parameters
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192744823
2018-04-16 10:45:19 +01:00
tonihei
b4a3385a6f Auto-register analytics collector in SimpleExoPlayer.
This automatically registers and deregisters an analytics collector in
SimpleExoPlayer. Doing this also allows to write integration tests checking
whether the reported window indices and media period ids are correct.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192742299
2018-04-16 10:44:05 +01:00
andrewlewis
387cc2f2bd Trim more than one sample for elst gapless
Allow trimming an arbitrary small number of samples (needing to trim up to two
samples actually seems to be common). For larger numbers of samples we do coarse
trimming by applying the edit list in the normal path, and don't use gapless
playback.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192736956
2018-04-16 10:42:48 +01:00
tonihei
0a68d1f09c Fix pending stream offset activation in video renderer.
Currently, pending stream offset changes are kept until an output buffer
timestamp surpasses the next pending stream offset. However, this is
problematic if the next stream offset overlaps with the current output
buffer sample times (e.g. because the next stream starts at a non-zero start
time).

To correctly time the switch to the next stream offset, this change keeps
the timestamp of the last queued input sample as switch point. And we only
switch to the new offset after an output sample timestamp reached this switch
point.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192736637
2018-04-16 10:41:27 +01:00
eguven
9a4e083b4e Blacklist Philips QM163E from setOutputSurface
Issue: #4104

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192629223
2018-04-16 10:40:07 +01:00
tonihei
0802ecfee3 Automated g4 rollback of changelist 192621199.
*** Reason for rollback ***

Rollback only needed to cherry-pick into Photos release.

*** Original change description ***

Automated g4 rollback of changelist 190906020.

*** Reason for rollback ***

Breaks looping.

*** Original change description ***

Automated g4 rollback of changelist 190628272.

*** Reason for rollback ***

b/76391022 was caused by a timestamp correction in StabilizableSimpleExoPlayer which will be fixed with this CL.

*** Original change description ***

Automated g4 rollback of changelist 189570277.

*** Reason for rollback ***

causes b/76391022, motion still playback in Photos is broken

**...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192621719
2018-04-16 10:38:48 +01:00
falhassen
692b7a674a Automated g4 rollback of changelist 190906020.
*** Reason for rollback ***

Breaks looping.

*** Original change description ***

Automated g4 rollback of changelist 190628272.

*** Reason for rollback ***

b/76391022 was caused by a timestamp correction in StabilizableSimpleExoPlayer which will be fixed with this CL.

*** Original change description ***

Automated g4 rollback of changelist 189570277.

*** Reason for rollback ***

causes b/76391022, motion still playback in Photos is broken

*** Original change description ***

Used fixed time frame in clipping media period.

Currently, whenever the clipping is updated, we...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192621199
2018-04-16 10:37:29 +01:00
eguven
8809193266 Add ContentMetadataInternal helper class
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192596362
2018-04-16 10:34:46 +01:00
andrewlewis
3c78dc22f6 Handle non-empty EoS buffers, for audio
This fixes gapless playback of streams with encoder padding on devices where the
decoder could set the end of stream flag on a non-empty final buffer.

Issue: #3449

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192407924
2018-04-16 10:30:45 +01:00
aquilescanta
2084ba7b05 Update supported-formats and DrmSessionManager#canAcquireSession
Issue:#4022

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192297801
2018-04-11 00:32:24 +01:00
olly
3c93142a4e Move MappingTrackSelector tests to DefaultTrackSelector
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192263391
2018-04-11 00:31:11 +01:00
hoangtc
986095a4a3 Support FLAC files with ID3 headers.
Support parsing ID3 tags at the beginning of FLAC files, even though FLAC spec
does not require this.

GitHub: #4055.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192127929
2018-04-11 00:28:35 +01:00
olly
6dc6f79f64 Remove redundant state from TrackSelectorResult
A renderer configuration being null is equivalent to the
renderer being disabled. Remove the redundant state.

Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192126015
2018-04-11 00:27:15 +01:00
andrewlewis
c54b195a29 Allow applications to access codec capabilities
Issue: #3820

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192115208
2018-04-11 00:25:56 +01:00
tonihei
d4a03d3b36 Remove some superfluous "custom"s.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192100852
2018-04-11 00:24:33 +01:00
andrewlewis
60aecdf3b3 Expose setExtraAdGroupMarkers on PlayerView
Issue: #4097

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192100000
2018-04-11 00:23:10 +01:00
olly
75338530ef Simplify disabling renderers in ExoPlayerTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191901120
2018-04-08 16:39:57 +01:00
olly
03a36ce6ba Fix NPE cause by demo app adding null listener to drm manager
Also added an assertion to the DRM event dispatcher to cause
immediate failure when this happens. This is consistent with
the assertion in the equivalent MediaSource class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191892735
2018-04-08 16:39:57 +01:00
andrewlewis
f5b568fc7d Scale the minimum buffer size in shouldContinueLoading
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191885689
2018-04-08 16:39:57 +01:00
olly
9a507db171 Fix ClearKey response conversion pre O-MR1
Issue: #4075

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191872512
2018-04-08 16:39:57 +01:00
andrewlewis
02bc2d7ce1 Add DefaultLoadControl test for starting playback
Also refactor the tests to make them behavioral (rather than testing the method)
and inline simple assertions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867614
2018-04-08 16:39:57 +01:00