6707 Commits

Author SHA1 Message Date
aquilescanta
ccf78f99c4 Allow multiple codecs with same type in DefaultHlsExtractorFactory
When disabling a TsExtractor track type because of a missing codec
in the master playlist, look through the entire codecs string
instead of checking the first codec with matching type.

Issue: #7877
PiperOrigin-RevId: 338530046
2020-10-23 13:54:40 +01:00
kimvde
521a220728 Avoid throwing for still photo metadata retrieval
PiperOrigin-RevId: 338497163
2020-10-23 13:54:31 +01:00
samrobinson
1191820429 Allow additional entries in MetadataUtil.setFormatMetadata.
The primary use of this currently will be for appending SEF metadata.

PiperOrigin-RevId: 338475948
2020-10-23 13:54:21 +01:00
ibaker
18c6b16f91 Switch playback tests to single-parameter parameterized syntax
This is simpler than instantiating a single-element string array for
every parameter.

PiperOrigin-RevId: 338469324
2020-10-23 13:54:11 +01:00
kimvde
175b8eb69e Read Google Photos motion photo metadata
PiperOrigin-RevId: 338436906
2020-10-22 12:37:41 +01:00
olly
563767d5e9 Bump version to 2.12.1
PiperOrigin-RevId: 338261975
2020-10-21 22:26:34 +01:00
christosts
a21eb772b1 HlsMediaSourceTest: rename dashMediaItem to hlsMediaItem
Issue: #4904
PiperOrigin-RevId: 338249499
2020-10-21 22:26:25 +01:00
tonihei
057771aeec Fix calculation for isSegmentAvailableAtFullNetworkSpeed.
The current caluclation was comparing Unix time with period time.
Fix it by always comparing against period time.

Issue: #4904
PiperOrigin-RevId: 338235754
2020-10-21 22:26:15 +01:00
christosts
e52a044ec5 Parse #EXT-X-SERVER-CONTROL and #EXT-X-PART-INF in HLS media playlists.
PiperOrigin-RevId: 338232910
2020-10-21 22:26:05 +01:00
bachinger
1051580a63 Improve naming of the methods of LivePlaybackSpeedControl
PiperOrigin-RevId: 338232327
2020-10-21 22:25:54 +01:00
tonihei
54506b506b Explicitly prevent callbacks after player is released
We currently implicitly rely on the internal playback thread to not send
new updates after the player got released. This may not always be ensured
since we let the release call timeout. For the timeout case, there may
still be a pending operation returning much later when it unstuck itself.

Fix this and potential other edge cases by explicitly removing all listeners
and preventing new listeners from being added after the release.

PiperOrigin-RevId: 338217220
2020-10-21 10:24:24 +01:00
insun
6abee66504 Fix bottom area to have even paddings and make seekbar slimmer.
Also removed unused thumb resources.

PiperOrigin-RevId: 338184661
2020-10-21 10:24:14 +01:00
olly
0ad33116b6 Simplify artwork selection in PlayerView
PiperOrigin-RevId: 338056357
2020-10-21 10:24:04 +01:00
Oliver Woodman
f1c3928bc9 Merge pull request #7867 from GeneticGenesis:pc/update-expected-http-statuses-for-failover
PiperOrigin-RevId: 338051017
2020-10-20 14:52:14 +01:00
Oliver Woodman
3abaef5593 Merge pull request #8088 from xufuji456:dev-v2
PiperOrigin-RevId: 338024866
2020-10-20 14:52:01 +01:00
ibaker
7ea1201bc2 Add playback tests for existing MP4 assets
Skip assets with >2 audio channels - this isn't
currently supported by ShadowAudioSystem. I'll add these when support is
available.

Also skip sample_ac4_protected.mp4 because DRM isn't supported in this
test environment either.

PiperOrigin-RevId: 338023738
2020-10-20 14:51:50 +01:00
ibaker
57e884b671 Add support for AC-3, AC-4, E-AC-3 and E-AC-3-JOC to playback tests
I added the TS playback tests for these assets without adding support
for the relevant MIME types to ShadowMediaCodec.

Also remove test assets with more than 2 audio channels - this isn't
currently supported by ShadowAudioSystem. I'll re-add these when support
is available.

PiperOrigin-RevId: 338023290
2020-10-20 14:51:41 +01:00
krocard
f54f763db5 AudioSink: Remove comment about unconfirmed crash
Consensus is that the NoClassDefFoundError does not
causes a crash but only a warning.

PiperOrigin-RevId: 338022354
2020-10-20 14:51:32 +01:00
Oliver Woodman
2f3fdf7c5b Merge pull request #8030 from yqritc:add-output-surface-workaround
PiperOrigin-RevId: 338016707
2020-10-20 14:51:20 +01:00
kimvde
021d725c0a Add motion photo metadata entry
PiperOrigin-RevId: 337863184
2020-10-20 14:51:09 +01:00
tonihei
febf5d2031 Use ListenerSet in AnalyticsCollector.
This ensures recursively sent events arrive in the correct order.

Issue: #8048
PiperOrigin-RevId: 337812882
2020-10-20 14:50:50 +01:00
tonihei
3c682610cf Fix calculation of available duration in DefaultDashChunkSource
The available duration used a "live edge" that was calculated in
the previous iteration and was thus quite old. Also it also used
the end of the last available segment, but the actually available
duration for buffering needs to be clamped to the current live edge
for low-latency streams.

Issue: #4904
PiperOrigin-RevId: 337812621
2020-10-20 14:50:40 +01:00
tonihei
68cbf6ddf3 Move listener handling to common util class.
ExoPlayerImpl and CastPlayer repeat the same logic. Moving the listener
and event handling to a common util class allows to reuse the same code
and add unit tests for this logic.

The change is a functional no-op.

PiperOrigin-RevId: 337812358
2020-10-20 14:50:30 +01:00
xufuji456
af4028f30e Fix MOV with pcm_alaw/pcm_mulaw which is fixedSampleSize 2020-10-19 20:49:29 +08:00
krocard
e589d7238a Add a getter for sleeping for offload
This allows wakelock releases to be state based
instead of transition based.

#exo-offload

PiperOrigin-RevId: 337286501
2020-10-17 01:35:20 +01:00
ibaker
d97dd8d5eb Add playback tests for existing FLAC assets
PiperOrigin-RevId: 337280116
2020-10-17 01:35:11 +01:00
ibaker
74ac915124 Add playback tests for existing MP3 assets
PiperOrigin-RevId: 337279583
2020-10-17 01:35:01 +01:00
krocard
230f4e5bb5 Do not inherit directly from AudioTrack.StreamEventCallback
This was causing issues old devices where the class
inheriting StreamEventCallback was loaded even though
it was not used.

Instead use an anonymous class that seem to be loaded
more lazily.

PiperOrigin-RevId: 337252687
2020-10-17 01:34:43 +01:00
krocard
bb851c99b9 Add MiTV devices requiring the output surface workaround
Issue: #8014
PiperOrigin-RevId: 337142176
2020-10-17 01:34:33 +01:00
ibaker
2371b024dd Switch to an 'api' dependency on Guava
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
2020-10-17 01:34:15 +01:00
kimvde
58ddfe046f Add SVC layer count to MP4 metadata
This is necessary to implement SEF video flattening.

PiperOrigin-RevId: 337048264
2020-10-17 01:33:47 +01:00
christosts
c4b346e49d Integrate playback speed control in ExoPlayerImplInternal
Issue: #4904
PiperOrigin-RevId: 337048010
2020-10-17 01:33:37 +01:00
christosts
41b58d503a Use low latency properties in DashMediaSource
Issue: #4904
PiperOrigin-RevId: 337046645
2020-10-17 01:33:19 +01:00
kimvde
6f66e7d0ba Small fix in IndexSeekMap
This change was meant to be in 2e5f2f12ad but
was not added my mistake.

PiperOrigin-RevId: 337041686
2020-10-17 01:33:09 +01:00
bachinger
bb7c934812 Add missing properties of MediaItem.Subtitle
Issue: #8044
PiperOrigin-RevId: 336955479
2020-10-17 01:32:59 +01:00
kim-vde
2e5f2f12ad Merge pull request #7378 from shenwill:dev-v2
PiperOrigin-RevId: 336875300
2020-10-13 16:30:01 +01:00
ibaker
d700627ec2 Move Robolectric-related test utils methods to robolectricutils module
This moves TestUtil#runMainLooperUntil and
TestUtil#createRobolectricConditionVariable to a new RobolectricUtil
class.

Also move testutil classes that use Robolectric-related utils classes
(e.g. TestPlayerRunHelper, TestDownloadManagerListener).

PiperOrigin-RevId: 336864959
2020-10-13 16:29:50 +01:00
samrobinson
9e1c6321ee Adjust static metadata logging to only list non-empty Metadata.
PiperOrigin-RevId: 336864814
2020-10-13 16:29:41 +01:00
christosts
8fdadade7b Add targetLiveOffsetUs parameter to LoadControl.shouldStartPlayback
This allows a LoadControl to start playback earlier if the target
live offset is very low.

Issue: #4904
PiperOrigin-RevId: 336863824
2020-10-13 16:29:31 +01:00
christosts
76b7f76437 Allow speed adjustments close to 1f in SonicAudioProcessor
Issue: #4904
PiperOrigin-RevId: 336841791
2020-10-13 16:29:22 +01:00
christosts
09598580f2 Allow to set live properties on DefaultMediaSourceFactory
Issue: #4904
PiperOrigin-RevId: 336841049
2020-10-13 16:29:13 +01:00
christosts
0756f304d6 Allow to configure custom LivePlaybackSpeedControl in player builders.
Use default implementation otherwise and forward chosen implementation to
internal player.

Issue: #4904
PiperOrigin-RevId: 336840530
2020-10-13 16:29:03 +01:00
christosts
867d27fa72 Add LivePlaybackSpeedControl interface and default implementation.
Issue: #4904
PiperOrigin-RevId: 336839908
2020-10-13 16:28:54 +01:00
christosts
13f1f3b3eb Add live configuration to MediaItem
Issue: #4904
PiperOrigin-RevId: 336839370
2020-10-13 16:28:44 +01:00
christosts
ed873322d3 Parse ServiceDescription from DASH manifest
Issue: #4904
PiperOrigin-RevId: 336838559
2020-10-13 16:28:35 +01:00
olly
d47258381f Remove reflection and call Surface.setFrameRate directly
PiperOrigin-RevId: 336838201
2020-10-13 16:28:26 +01:00
olly
5e1c96ad99 Fix a couple of StyledPlayerControlView bugs
1. The first time the player controls are are made visible,
   there is no animation.
2. The first time the player controls are made visible, the
   "select tracks" button isn't displayed. When tapping to
   subsequently hide the player controls, the button briefly
   becomes visible and then is hidden again. This bug is due
   to state in StyledPlayerControlViewLayoutManager being
   out of sync, resulting in StyledPlayerControlView's
   onVisibilityChange not being called properly.

After this change both of these issues should be resolved.

PiperOrigin-RevId: 336704031
2020-10-13 16:28:17 +01:00
andrewlewis
c21529def3 Update translations for UI module
This should fix gradle errors like: "warn: removing resource
com.google.android.exoplayer2.demo:string/exo_controls_fastforward_by_amount_description
without required default value."

PiperOrigin-RevId: 336670827
2020-10-13 16:28:08 +01:00
ibaker
506e9e951f Use MP4VTT MIME type in DashManifestParser (again)
We stopped using using this MIME type in
74a9d8f680

This broke subtitle decoding in some cases (Issue: #7985), which I
fixed in
7b8895d655.

After some discussion we've decided SubtitleDecoderFactory shouldn't
depend on Format.containerMimeType (since the samples have already been
extracted by this point, so the container shouldn't matter). So this
change fixes DashManifestParser to use MimeTypes.APPLICATION_MP4VTT (and
reverts the no-longer-needed SubtitleDecoderFactory change).

PiperOrigin-RevId: 336668450
2020-10-13 16:27:58 +01:00
ibaker
d2db0bb74a Ensure ParsableByteArray is large enough when appending in VorbisReader
PiperOrigin-RevId: 336643621
2020-10-13 16:27:48 +01:00