7917 Commits

Author SHA1 Message Date
aquilescanta
2df9491383 Avoid throwing an exception for sample default values
Allows playback of content when the default value is
not valid, but not used for any samples.

Issue: #7207
PiperOrigin-RevId: 306631376
2020-05-27 19:12:37 +01:00
olly
bdc0db30fd Don't select trick-play tracks by default
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306504362
2020-05-27 19:10:42 +01:00
olly
d538d6ae37 Fix capabilities check for low frame-rate content
Issue: #6054
Issue: #474
PiperOrigin-RevId: 306437452
2020-05-27 19:09:58 +01:00
Oliver Woodman
7d3f54a375
Merge pull request #7162 from google/dev-v2-r2.11.4
r2.11.4
2020-04-08 22:48:19 +01:00
Oliver Woodman
76374d7822 Clean up playWhenReady 2020-04-08 22:11:33 +01:00
Oliver Woodman
54f3e6a203 Revert release note indentation change 2020-04-08 22:03:06 +01:00
olly
f95a0caec3 Update misc dependencies
PiperOrigin-RevId: 305503804
2020-04-08 21:53:45 +01:00
olly
1f4d37431e Upgrade cast dependency
Issue: #7191
PiperOrigin-RevId: 305502293
2020-04-08 21:52:38 +01:00
Oliver Woodman
55e33e3699 Fix missing subtitle addition 2020-04-07 21:43:09 +01:00
olly
f696a56b56 Audio focus: Restore full volume if focus is abandoned when ducked
If we're in the ducked state and updateAudioFocus is called with a
new state for which focus is no longer required, we should restore
the player back to full volume.

Issue: #7182
PiperOrigin-RevId: 305232155
2020-04-07 14:12:30 +01:00
Oliver Woodman
49858b82f2 Merge pull request #7184 from TiVo:p-subtitle-format-from-codecs
PiperOrigin-RevId: 305137114
2020-04-07 14:12:06 +01:00
olly
cc29798d9b Audio focus: Re-request audio focus if in a transient loss state
This avoids cases where audio focus is never successfully acquired
because another app is holding on to transient audio focus indefinitely.

Issue: #7182
PiperOrigin-RevId: 305108528
2020-04-07 14:02:46 +01:00
tonihei
3c0e617837 Merge AudioFocusManager methods to simplify control flow.
handlePrepare/Stop/SetPlayReady can be merged together as they all
handle changes to the desires state of the player.

Also, simplify parts of the control flow by not mixing code that
determines if audio focus needs to be handled with code that actually
acquires or abandons the focus.

PiperOrigin-RevId: 299824857
2020-04-07 14:01:54 +01:00
andrewlewis
07cbfb65e5 Fix stuck ad playbacks with DRM-protected content
When ClippingMediaPeriod first tried to read a buffer, if its end
position was before the end of the stream and it was buffered to its end
position, it would sometimes erroneously signal end-of-stream for
protected content because the sample queue might be waiting for DRM keys
at this point.

Work around the issue temporarily by signaling this specific case back
to ClippingMediaPeriod via the DecoderInputBuffer.

There will likely be a cleaner fix as a result of adding support for
dynamic clip end points in the future, at which point this can be
reverted.

issue:#7188
PiperOrigin-RevId: 305081757
2020-04-07 13:49:54 +01:00
Oliver Woodman
d4d7907193 Revert "Remove duplicate SCTE-35 format and add sample to TsExtractorTest"
This reverts commit 8591e69b6a40162ffc801a1569549ca826606cc5.
2020-04-07 13:43:28 +01:00
Oliver Woodman
29118f4586 Tweak release note 2020-04-04 00:21:20 +01:00
Oliver Woodman
f14c028078 Fix dump files for release 2020-04-03 22:57:06 +01:00
samrobinson
b8e6e98430 Simplify WakeLockManager and WifiLockManager logic.
Disabling reference counting allows some checks to be removed.

This is a no-op.

PiperOrigin-RevId: 299829600
2020-04-03 22:52:40 +01:00
samrobinson
83c2ca5902 Add WifiLock management to SimpleExoPlayer.
Issue:#6914
PiperOrigin-RevId: 297598910
2020-04-03 22:52:35 +01:00
samrobinson
e4e56fac09 Clean WakeLockManager.updateWakeLock logic.
PiperOrigin-RevId: 284552723
2020-04-03 22:49:03 +01:00
olly
a5420a0b65 Fix release notes
PiperOrigin-RevId: 304196424
2020-04-01 23:04:58 +01:00
kimvde
d921491e7d Remove thread checks in player constructor
SimpleExoPlayer instances don't have to be created from the application
thread.

PiperOrigin-RevId: 304190901
2020-04-01 23:04:51 +01:00
olly
38f282800c Fix ADTS extraction with mid-stream ID3
PiperOrigin-RevId: 304184650
2020-04-01 23:04:36 +01:00
ibaker
d466b8c5d5 Make javadoc links point to Android docs for java.* classes
Before:
https://docs.oracle.com/javase/7/docs/api/index.html?java/lang/String.html

After:
https://developer.android.com/reference/java/lang/String.html
PiperOrigin-RevId: 304137011
2020-04-01 22:58:56 +01:00
ibaker
a9c4d2f9cf Ensure javadoc fix applies to Android links with anchors
This means is-external=true is removed and target=_top is
set on the <a> tag.

Without this, javadoc links to framework docs with anchors are
currently broken when viewed in the "frame view" on
exoplayer.dev/doc/reference/

Before this change:
https://developer.android.com/reference/android/media/MediaDrm.html?is-external=true#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap-

With this change:
https://developer.android.com/reference/android/media/MediaDrm.html#getKeyRequest-byte:A-byte:A-java.lang.String-int-java.util.HashMap-

PiperOrigin-RevId: 304136858
2020-04-01 22:58:48 +01:00
Oliver Woodman
c75f3f77ff Merge pull request #7099 from matamegger:feature/fix_pssh_v1_on_firetv
PiperOrigin-RevId: 303937576
2020-04-01 22:58:03 +01:00
olly
1f44a4db4b Bump version to 2.11.4
PiperOrigin-RevId: 303776645
2020-03-30 19:27:23 +01:00
andrewlewis
fea0acd41a Fix PlaybackStatsListener behavior when not keeping history
issue:#7160
PiperOrigin-RevId: 303747338
2020-03-30 18:36:10 +01:00
jaewan
94ca84ff29 Allow developers to specify CharSequence for Notification strings
CharSequence is used by Notification builders and allows to set Spannable text.
It's the base interface of the String class, so apps wouldn't be break after
the update.

PiperOrigin-RevId: 303731890
2020-03-30 18:36:10 +01:00
olly
f0e734d33e Workaround C2 AAC decoder flush problem on Android 10
Issue: #6671
PiperOrigin-RevId: 303364788
2020-03-30 18:36:07 +01:00
olly
69ca534935 Parse opus gain correctly as a signed value
Issue: #7046
PiperOrigin-RevId: 303354941
2020-03-30 18:31:24 +01:00
olly
a9cbbf91c3 Skip aliases of other codecs
- They are always listed with their canonical names
- Considering aliases means that blacklisting a decoder can end up
  not actually blacklisting it, since it may still be accessible
  via an alias. It also means that our decoder fallback logic can
  end up falling back to a decoder that we've already tried!

PiperOrigin-RevId: 303348297
2020-03-30 18:31:24 +01:00
olly
0a5a3cbf46 Handle orientation changes in GL demo
Issue: #7141
PiperOrigin-RevId: 303334072
2020-03-30 18:31:24 +01:00
olly
3fd7d214cd Consistency fixes for FFmpeg extension instructions
PiperOrigin-RevId: 303316976
2020-03-30 18:31:24 +01:00
ibaker
c9f28086db Make milliseconds optional in SubRip (SRT) subtitles
issue:#7122
PiperOrigin-RevId: 303154493
2020-03-30 18:31:24 +01:00
olly
a038346ecc Resample float audio to 16-bit by default to enable audio processing
This is less confusing than having audio processing functionality (e.g., playback
speed adjustment) just "not work" for some pieces of media.

If this change is merged, I will update #6749 to also track making DefaultAudioSink
intelligently enable/disable float output depending on how the audio processors are
configured.

Issue: #7134
PiperOrigin-RevId: 302871568
2020-03-30 18:31:24 +01:00
olly
ddc98334e0 DefaultAudioSink: Fix issue if last processor is not active
It's incorrect to use an AudioFormat returned from AudioProcessor.configure
unless the AudioProcessor is active.

Issue: #7134
PiperOrigin-RevId: 302674132
2020-03-30 18:31:24 +01:00
olly
54c608481b Support 32-bit FP to 16-bit Int audio resampling
This is a no-op for DefaultAudioSink for now, because DefaultAudioSink
currently disables processing anyway if the input uses ENCODING_PCM_FLOAT.

Issue: #7134
PiperOrigin-RevId: 302670534
2020-03-30 18:31:24 +01:00
olly
2094c7491b WAV: Don't read past data end position
Issue: #7129
PiperOrigin-RevId: 302660343
2020-03-30 18:31:24 +01:00
olly
1d6bd0de15 MP4 edit lists: Use floor rather than ceil to find first sample
If the start time of the edit falls within a sample, start from that
sample rather than the next one. This ensures playback can start from
the correct point if the sample is a keyframe, rather than having to
start from the next one.

Issue: #7133
PiperOrigin-RevId: 302639115
2020-03-30 18:31:24 +01:00
ibaker
d18292c9c9 Allow missing hours in SubRip (.srt) subtitle timecodes
Add a test for this case, and extend the existing tests to ensure the
hour is parsed when it's present.

issue:#7122
PiperOrigin-RevId: 302472213
2020-03-30 18:31:23 +01:00
krocard
cac36be6eb Conserve ByteOrder when growingDecoderInputBuffer
#exo-offload

PiperOrigin-RevId: 302403507
2020-03-30 18:31:23 +01:00
olly
b67d79d775 Request storage permission if missing
PiperOrigin-RevId: 302345647
2020-03-30 18:31:20 +01:00
olly
a39715d323 Improve logging
- Make sure logging of UnknownHostException indicates the failure reason
- Indent stack traces inside event blocks in EventLogger
- Don't log media URLs

PiperOrigin-RevId: 302007601
2020-03-30 18:27:14 +01:00
Oliver Woodman
dd4a732303 Merge pull request #7098 from matamegger:feature/webvtt_negative_media_timestamp
PiperOrigin-RevId: 301996778
2020-03-30 18:27:14 +01:00
andrewlewis
4750785f5a Add option for sensor rotation in 360 playbacks
Issue: #6761
PiperOrigin-RevId: 300715682
2020-03-30 18:27:07 +01:00
Oliver Woodman
b2849fde3d Merge pull request #7057 from Chimerapps:dash_assetidentifier
PiperOrigin-RevId: 300313753
2020-03-30 14:32:35 +01:00
Oliver Woodman
dca68b2198 Merge pull request #7064 from davibe:enhancement/6907
PiperOrigin-RevId: 300330109
2020-03-30 14:30:33 +01:00
krocard
40d5db0460 Add support for x86_64 for the ffmpeg extension
Requested by https://github.com/google/ExoPlayer/issues/7058.
Additionally move one of the common option in COMMON_OPTIONS.

PiperOrigin-RevId: 299862479
2020-03-30 14:26:33 +01:00
Oliver Woodman
4e6383aeae Merge pull request #7051 from Cizor:dev-v2
PiperOrigin-RevId: 299357049
2020-03-30 14:25:27 +01:00