5060 Commits

Author SHA1 Message Date
olly
adc77fd0b1 Simplify & clean up offline support in demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193938140
2018-05-07 05:58:59 +01:00
bachinger
e0af050163 add notification priority for lower API levels
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193934212
2018-05-07 05:57:53 +01:00
olly
7d6b0e1fda Move renderer flags, overrides and tunneling ID into Parameters
- This is needed to make DefaultTrackSelector properly thread
  safe, and enable atomic changes to the selector that, for
  example, disable a renderer and enable another one at the same
  time.

- This change also saves/restores parameters and the start
  position in PlayerActivity, resolving the ref'd issue.

Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193913350
2018-05-07 05:56:48 +01:00
andrewlewis
5926e20105 Use the codec MIME type for configuration
This may differ from the format MIME type for audio/eac3-joc.

Issue: #4165

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193906521
2018-05-07 05:55:43 +01:00
andrewlewis
a07471ddef Add player to getMediaDescription
This allows access to the timeline for example.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193900798
2018-05-07 05:54:39 +01:00
olly
d3cdf52591 Sanitize MappedTrackInfo API
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193897041
2018-05-07 05:53:05 +01:00
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
olly
503a911a77 Use correct IntDef
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193651020
2018-05-07 05:43:46 +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
eguven
f4ade38ae4 Add ability to download not DRM protected content to the demo app
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193554024
2018-05-07 05:40:30 +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
hoangtc
fb5e31d3d6 Simplify logic to handle FLAC files with ID3 header.
LibFlac internally can skip ID3 tags correctly. Therefore, we don't need to keep track of the whole ID3 header section and skip through this section in Java code. We can just set the whole stream to the native library, and it will handle skipping ID3 tags correctly.

The only thing that the Java part need to do is peeking and parsing ID3 tags (if present), in order to populate the track format metadata.

GitHub: #4055.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193327602
2018-05-07 05:30:29 +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
cdotchen
693fe2841d fix timebar scrubber notify wrong start position 2018-04-24 22:08:30 +08:00
Justin Yorke
3f3191bb75
OkHttp extension - properly use response headers instead of request headers when throwing InvalidResponseCodeException 2018-04-19 17:08:16 -07: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
hoangtc
0b0868889e Supports FLAC files with high sample rate (176400 and 192000).
Also add testing media to verify FLAC extension can play these sample rates.

Github: #3769.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192783193
2018-04-16 10:51:50 +01:00
andrewlewis
fdbf16ed6d Allow setting the ad media load timeout in ImaAdsLoader
Issue: #3691

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192769801
2018-04-16 10:50:32 +01:00
olly
1944ebb463 Move random adaptation to an intent extra.
This will help with removing selection factories from
SelectionOverride. It doesn't seem worth the effort to
have this togglable and in the UI of our demo app.

This change will also:

- Help to move TrackSelectionHelper into the UI module,
  since it removes the part that's obviously debug-only.
- Make it possible to specify the ABR algorithm for each
  sample, which might be nice as we start implementing
  more of them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192760196
2018-04-16 10:49:12 +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