7047 Commits

Author SHA1 Message Date
olly
b71b9f7c58 Bump version to 2.10.6
PiperOrigin-RevId: 274534626
2019-10-14 13:57:41 +01:00
andrewlewis
d52f06e611 Clean up surface on setting renderer
If a surface was previously passed to the player then an output buffer
renderer was set, we would remove surface callbacks but not clear the
surface on renderers that accept MSG_SET_SURFACE.

PiperOrigin-RevId: 274532266
2019-10-14 13:57:33 +01:00
olly
ce01c79e01 Add a javadoc explanation for ProgressiveDownloader that explains that it tries to skip downloading already cached bytes.
download calls through to CacheUtil#cache, which handles skipping already downloaded bytes.

It is useful for callers to know that ProgressiveDownloader has this behavior - otherwise, they might reimplement the logic themselves.

I hope this behavior is something that can be part of the public API :)

PiperOrigin-RevId: 274202995
2019-10-13 12:41:55 +01:00
andrewlewis
1c66010b4a Add MediaFormat on video frame metadata listener
This is useful for apps that want to access HDR metadata that MediaCodec puts
in its output format.

PiperOrigin-RevId: 274169985
2019-10-13 12:41:47 +01:00
olly
4ae79105de Make FileDataSourceFactory an inner class
This is a proof of concept for cleanup we should do for all of
our DataSource implementations as we move toward stabilizing
parts of the API.

- Move all XDataSourceFactory classes to be inner classes.
- Remove chained constructors for XDataSourceFactory classes. Keep
  required args going through constructors. Use setters for the
  rest.
- Not applicable in this case, but we probably want to deprecate
  all but the no-arg method for instantiating eac XDataSource
  instance (with the all-arg method kept but with the intention
  of making it package private).

PiperOrigin-RevId: 274162076
2019-10-13 12:41:39 +01:00
andrewlewis
be23995100 Remove ineffective copybara strip directive
PiperOrigin-RevId: 274161845
2019-10-13 12:41:31 +01:00
andrewlewis
5f71e86335 Handle legacy DASH audio channel configuration
Issue: #6523
PiperOrigin-RevId: 274160232
2019-10-13 12:41:24 +01:00
ibaker
a81dea6a47 In-line 2 method reference runnables in HlsSampleStreamWrapper
PiperOrigin-RevId: 274148614
2019-10-13 12:41:16 +01:00
bachinger
674e92e1ee provide content description for the player view to make show/hide controls accessible
PiperOrigin-RevId: 274148026
2019-10-13 12:41:08 +01:00
olly
a268e1b63f Test audio focus denial
- Verifies that playWhenReady doesn't become true if audio focus
  is denied.
- Also verifies there's no suppression reason in this case, because
  the denial is permanent rather than temporary.

PiperOrigin-RevId: 274141099
2019-10-13 12:41:00 +01:00
olly
46c6f260f5 Add test action for setting audio attributes
Also removed "to be executed" from all the comments, since it
didn't seem to add value.

PiperOrigin-RevId: 274139837
2019-10-13 12:40:52 +01:00
olly
3f7c3bb085 Don't set a playback suppression reason for permanent audio focus loss
It's documented to be for temporary loss only (i.e. the case where
externally reported playWhenReady is still true)

PiperOrigin-RevId: 274129922
2019-10-13 12:40:44 +01:00
sofijajvc
d01d8f0344 Use google cpu_features library
Currently, ndk cpu-features is being used.
This is now deprecated and google open-source
cpu_features library is recommended.

PiperOrigin-RevId: 273987647
2019-10-10 18:55:50 +01:00
krocard
58cb7d29ca Update Gradle version
PiperOrigin-RevId: 273971120
2019-10-10 18:55:43 +01:00
sofijajvc
62618f24ec Remove copybara exclusions and add extension to the demo app
Issue: #3353
PiperOrigin-RevId: 273949689
2019-10-10 14:46:16 +01:00
ibaker
60566721d4 Enable ID3-in-EMSG for HLS streams
This supports both chunkless & traditional preparation

PiperOrigin-RevId: 273938344
2019-10-10 14:46:07 +01:00
sofijajvc
a96a82588e Update release notes for GL classes changes
PiperOrigin-RevId: 273937090
2019-10-10 14:45:58 +01:00
sofijajvc
ad50f62eec Remove method for setting custom gav1 libraries
PiperOrigin-RevId: 273929000
2019-10-10 14:45:49 +01:00
sofijajvc
f098562208 Fix comments in AV1 extension
PiperOrigin-RevId: 273928626
2019-10-10 14:45:40 +01:00
andrewlewis
51177303a3 Add av1 extension to version control ignores
PiperOrigin-RevId: 273919032
2019-10-10 14:45:32 +01:00
andrewlewis
3574345960 Fail av1 extension build if CMake is missing
If a user has checked out libgav1 they almost certainly want to
build the extension, so fail if CMake is not present but
libgav1 is present. Also add a note to the README linking to
instructions for installing CMake.

Also remove the NDK check, as ndk.dir is apparently deprecated
and Android Studio appears to install this automatically anyway.

PiperOrigin-RevId: 273918142
2019-10-10 14:45:23 +01:00
sofijajvc
5cf82a5079 Support GL rendering with SimpleExoPlayer and PlayerView
PiperOrigin-RevId: 273760294
2019-10-10 14:45:14 +01:00
aquilescanta
a35a0925ed Mask repeatMode in CastPlayer
When the user calls setRepeatMode, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.

PiperOrigin-RevId: 273754931
2019-10-10 14:45:06 +01:00
aquilescanta
5775a47010 Remove maybe prefix for cast setting methods
Also move the masking internal state update before the message
dispatch, so as to ensure the result of the operation prevails
over the masking state.

PiperOrigin-RevId: 273740585
2019-10-10 14:44:57 +01:00
sofijajvc
1312a54295 Avoid sync failures if libgav1 isn't present
PiperOrigin-RevId: 273734495
2019-10-10 14:44:48 +01:00
olly
3d0886f458 Fix bogus reporting of audio focus loss
Playback cannot be suppressed if playWhenReady=false

PiperOrigin-RevId: 273726084
2019-10-10 14:44:39 +01:00
andrewlewis
e6fe80fa88 Improve sample naming consistency
PiperOrigin-RevId: 273712563
2019-10-10 14:44:30 +01:00
sofijajvc
70abbb9689 Add test AV1 video to demo app
PiperOrigin-RevId: 273706425
2019-10-10 14:44:20 +01:00
Oliver Woodman
4026c8a01e Merge pull request #6502 from caiiiyua:bug_default_dash_chunk_source_wrong_segmentnumshift
PiperOrigin-RevId: 273549830
2019-10-08 20:55:25 +01:00
andrewlewis
fab2a0d55e Fix VideoDecoderOutputBuffer supplemental data
The limit of this.supplementalData was not reset.

PiperOrigin-RevId: 273515718
2019-10-08 20:55:15 +01:00
andrewlewis
a7db26c352 Delete the IMA demo
This doesn't offer anything on top of the functionality in the main demo app.
There's less code but we have a blog post and presentations that walk through
how to use the extension, so it seems fine to delete the code so we don't need
to maintain it. This also avoids potential confusion about what the demo app
means on IMA-related GitHub issues.

PiperOrigin-RevId: 273501720
2019-10-08 20:55:07 +01:00
ibaker
711a16c88a Remove the content_not_playing issue template
PiperOrigin-RevId: 273475232
2019-10-08 20:54:59 +01:00
Cai Yuanqing
d2b221b95b Issue: #6501 Wrong segmentNumShift was calculated in copyWithNewRepresentation
When newIndex overlaps oldIndex with newstarttime < oldstarttime, according to the segNum of endtime
in newIndex and oldIndexLastSegnum to calculate the segmentNumShift.
2019-10-08 09:07:27 +13:00
olly
b052ea9bed Parse Label elements for adaptation sets
Issue: #6297
PiperOrigin-RevId: 273297284
2019-10-07 16:32:50 +01:00
andrewlewis
48bfb37e93 Fix surfacedemo nullness issues
PiperOrigin-RevId: 273296545
2019-10-07 16:32:42 +01:00
andrewlewis
fed89d76ca Migrate surfacedemo to new DRM APIs
PiperOrigin-RevId: 273296461
2019-10-07 16:32:34 +01:00
andrewlewis
8d7f474fa6 Fix surfacedemo build
PiperOrigin-RevId: 273296236
2019-10-07 16:32:26 +01:00
aquilescanta
dddce4307b Mask playWhenReady state in CastPlayer
When the user calls setPlayWhenReady, the state modifications are
observed as immediate, in spite of being sent to the receiver app
as asynchronous operations.

PiperOrigin-RevId: 273289768
2019-10-07 16:32:19 +01:00
aquilescanta
29eebca5c5 Fix section comments in CastPlayer
PiperOrigin-RevId: 273270892
2019-10-07 16:32:11 +01:00
samrobinson
a8adb97b5d Move AudioFocusManager to different package & made default visibility.
PiperOrigin-RevId: 273263822
2019-10-07 16:32:03 +01:00
olly
c269890259 Define default colors as constants
It's confusing that app:played_color also modifies the colors
that derive from it, but the corresponding setter does not. It
seems generally clearer just to define constants.

PiperOrigin-RevId: 273249557
2019-10-07 16:31:55 +01:00
sofijajvc
fa06f0b4cc Fix video decoder GL rendering
Calculate stride and width ratio per each plane.

PiperOrigin-RevId: 272916423
2019-10-07 16:31:47 +01:00
sofijajvc
8f3a363dd2 Add OpenGL support to av1 extension: Libgav1VideoRenderer
Move reusable code from LibvpxVideoRenderer to SimpleDecoderVideoRenderer.
Pass outputBuffer to renderOutputBuffer method instead of keeping the reference in the renderer.

PiperOrigin-RevId: 272899549
2019-10-07 16:31:39 +01:00
samrobinson
27b90fba0e Make WakeLockManager package private.
PiperOrigin-RevId: 272888174
2019-10-07 16:31:31 +01:00
olly
efe6e6408a Cleanup: Only clamp seek positions for FFWD/RWND
It's confusing that seekTo(player, windowIndex, positionMs) does
clamping, because it only makes sense if windowIndex is the current
window.

Note: This doesn't actually fix anything (other than code clarity).
In cases where we were passing other windowIndices, we always
passed 0 as the position and so the clamping logic wouldn't have
had any effect.
PiperOrigin-RevId: 272857104
2019-10-04 13:33:09 +01:00
Oliver Woodman
6e65a71806 Merge pull request #6379 from wingyippp:flac-seek-map-two-points
PiperOrigin-RevId: 272856747
2019-10-04 13:32:59 +01:00
ibaker
b2900aa560 Exclude .li files in ExoPlayer's .hgignore
These seem to be created by the Android Studio layout inspector

PiperOrigin-RevId: 272856118
2019-10-04 13:32:50 +01:00
olly
8453d07f54 Remove unnecessary DeleteLocalRef usage
Keeping the ones inside loops, because theoretically they
can be useful there (in practice, for this use case, it's
highly unlikely to make any difference).

PiperOrigin-RevId: 272834073
2019-10-04 13:32:42 +01:00
tonihei
4297800f38 Update logic to set isLoading.
We currently set it to shouldContinueLoading, which isn't correct if
shouldContinueLoading is set to false and we still have an ongoing load.

Change it to also be true if the media period is still loading.

PiperOrigin-RevId: 272823473
2019-10-04 13:32:34 +01:00
aquilescanta
69cf7d130e Fix acquisition of placeholder sessions
Issue:#4867
PiperOrigin-RevId: 272698404
2019-10-04 13:32:27 +01:00