4783 Commits

Author SHA1 Message Date
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
aquilescanta
10d727e810 Use misc status code string when a Cast status code description is not available
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192609475
2018-04-16 10:36:07 +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
aquilescanta
7d0067e298 Fix external storage read permissions bug
Fix bug which causes the PlayerActivity to finish whenever the
android.permission.READ_EXTERNAL_STORAGE permission is requested.

A better solution would involve not requesting permissions if a
previous request is still pending. This would involve keeping
extra state in the activity, so this solution is used to keep
the demo app's complexity at a minimum.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192588821
2018-04-16 10:33:27 +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
andrewlewis
ee8fc74d65 Update IMA to 3.8.5 and Play Services to 12.0.0
Issue: #3911

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192404702
2018-04-16 10:29:23 +01:00
ojw28
d075945487
Merge pull request #3977 from Khang-NT/dev-v2
Remove duplicate code MediaSessionConnector.java
2018-04-11 00:33:31 +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
olly
3568dca3b1 Make tests use DefaultTrackSelector
Issue: #3915

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192259167
2018-04-11 00:29:53 +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
tonihei
66d2b76a6c Remove test max SDK version overrides.
These don't seem to be needed anymore. All tests run without them in gradle
and Blaze.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867518
2018-04-08 16:39:57 +01:00
danarapagna
8a74acbe6f Automated g4 rollback of changelist 191128111.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191834511
2018-04-08 16:40:58 +01:00
tek
26cb32ab6a Migrating to new "android" handler from deprecated "androidlocalizer".
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191788495
2018-04-08 16:39:57 +01:00
andrewlewis
280cc545dd Search for TrueHD syncframes
In MatroskaExtractor TrueHD audio samples are joined into larger chunks. For
some streams the resulting chunked samples seem never to start with a syncframe.
This could result in playback of TrueHD streams getting stuck after seeking
because we could never read a syncframe at the start of a sample to determine
the sample size.

Instead of expecting to find a syncframe at the start of a sample, search for it
within the sample, to fix this issue.

Note: this means that we may search a few thousand bytes to find the sample
size, but the cost is only incurred for the first audio sample read.

Issue: #3845

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191775779
2018-04-07 19:15:50 +01:00
andrewlewis
1b84544264 Improve TrueHD syncframe detection
Also increase the chunking size to sixteen samples.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191768169
2018-04-07 19:14:03 +01:00