10943 Commits

Author SHA1 Message Date
aquilescanta
4783c329cc Map HLS sample formats to the correct codec string
This change fixes format creation for traditional preparation of streams
where the master playlist contains more than one codec string per track
type.

Issue: #7877
PiperOrigin-RevId: 338538693
2020-10-23 13:54:50 +01:00
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
Oliver Woodman
59b34ede61 Fix release notes 2020-10-23 13:47:53 +01:00
Oliver Woodman
6134f96127 Add missing release note 2020-10-23 13:44:51 +01:00
Oliver Woodman
be13805ce4
Merge pull request #8102 from google/dev-v2-r2.12.1
r2.12.1
2020-10-22 20:14:02 +01:00
olly
269ea4ea2b Add missing release note
PiperOrigin-RevId: 338446775
2020-10-22 12:39:25 +01:00
olly
09b4a473ff Add missing release note
PiperOrigin-RevId: 338446775
2020-10-22 12:37:51 +01:00
kimvde
175b8eb69e Read Google Photos motion photo metadata
PiperOrigin-RevId: 338436906
2020-10-22 12:37:41 +01:00
olly
d7e8238b88 Bump version to 2.12.1
PiperOrigin-RevId: 338261975
2020-10-21 22:36:32 +01:00
olly
9bde5d0351 [nullness] The nullness checking fixes of the media related files
We rolled back the previous <unknown commit> because some of the nullness checking fixes broke the exoplayer2 tests. We submit this CL into the TAP Global Presubmit train (https://test.corp.google.com/OCL:337620582:BASE:338201100:1603283151742:36afd5a5) and make sure that this CL wouldn't break any other tests on google3.

PiperOrigin-RevId: 338267548
2020-10-21 22:26:48 +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
insun
de2b58e7e1 Fix bottom area to have even paddings and make seekbar slimmer.
Also removed unused thumb resources.

PiperOrigin-RevId: 338184661
2020-10-21 10:27:24 +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
kimvde
efaa2961ee Read until the track formats are available in TestUtil.extractSeekMap()
Otherwise, some extractor tests are seeking without making sure that the
extractor has retrieved the formats.

This is needed for PR Issue: #7378.

PiperOrigin-RevId: 335934326
2020-10-20 22:26:18 +01:00
Oliver Woodman
452f68fb6c Merge pull request #7867 from GeneticGenesis:pc/update-expected-http-statuses-for-failover
PiperOrigin-RevId: 338051017
2020-10-20 22:16:12 +01:00
Oliver Woodman
d2fb9dda82 Merge pull request #8088 from xufuji456:dev-v2
PiperOrigin-RevId: 338024866
2020-10-20 22:16:12 +01:00
krocard
e72082710c 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 22:16:12 +01:00
Oliver Woodman
7303005873 Merge pull request #8030 from yqritc:add-output-surface-workaround
PiperOrigin-RevId: 338016707
2020-10-20 22:16:12 +01:00
andrewlewis
c3643ec682 Allow enabling IMA ext debug mode programmatically
PiperOrigin-RevId: 337824945
2020-10-20 22:16:12 +01:00
aquilescanta
e446f02eb9 Remove references to the default Cast receiver
The ExoPlayer receiver app id is a thin wrapper around the default receiver, so
there are no reasons for users not to depend on it. By having ExoPlayer users
refer to the ExoPlayer app id we can collect usage metrics.

PiperOrigin-RevId: 337516767
2020-10-20 22:16:12 +01:00
andrewlewis
fac3515016 Move DataSource reading methods into Util
This will be used to read ads responses out of data: URLs in a subsequent
change.

PiperOrigin-RevId: 334778780
2020-10-20 22:16:12 +01:00
kim-vde
fe7daa9de9 Merge pull request #7950 from friederbluemle:update-gradle-plugin
PiperOrigin-RevId: 333036751
2020-10-20 22:16:12 +01:00
andrewlewis
e0c9165270 Upgrade IMA SDK dependency to 3.20.1
This brings in a fix for companion ads rendering when targeting API 29.

Issue: #6432
PiperOrigin-RevId: 337279054
2020-10-20 22:16:12 +01:00
krocard
0de938c4aa 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-20 22:16:12 +01:00
krocard
ec96e0c495 Add MiTV devices requiring the output surface workaround
Issue: #8014
PiperOrigin-RevId: 337142176
2020-10-20 22:16:12 +01:00
bachinger
2b6a9a346a Use Math.round(double) to avoid result being limited to Integer.MAX_INT
Issue: #8067
PiperOrigin-RevId: 337122011
2020-10-20 22:16:12 +01:00
ibaker
a635bdd4ba 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-20 22:16:12 +01:00
Oliver Woodman
6611ac48c5 Add a way to override ad media MIME types
Issue: #7961
PiperOrigin-RevId: 337069152
2020-10-20 22:16:12 +01:00
andrewlewis
5cc6dac77c Encapsulate ImaAdsLoader configuration in a class
This will reduce the amount of boilerplate required to pass the configuration
values around (especially in a planned future change when logic is factored out
of ImaAdsLoader).

PiperOrigin-RevId: 337058355
2020-10-20 22:16:12 +01:00
andrewlewis
53c4a393f3 Pass ad tags via AdsMediaSource
This is in preparation for supporting playlists of ads media sources using
ImaAdsLoader.

Existing ways of passing ad tags should still function but are deprecated (and
won't be supported with playlists).

Issue: #3750
PiperOrigin-RevId: 335618364
2020-10-20 22:16:12 +01:00
kimvde
947b637441 Small fix in IndexSeekMap
This change was meant to be in 2e5f2f12ad but
was not added my mistake.

PiperOrigin-RevId: 337041686
2020-10-20 22:16:12 +01:00
bachinger
36c2fe1053 Add missing properties of MediaItem.Subtitle
Issue: #8044
PiperOrigin-RevId: 336955479
2020-10-20 22:16:12 +01:00
kim-vde
8f04968fb1 Merge pull request #7378 from shenwill:dev-v2
PiperOrigin-RevId: 336875300
2020-10-20 22:16:12 +01:00
olly
3149dd0ffc 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-20 22:16:10 +01:00
andrewlewis
8dc6b7e8c5 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-20 22:11:34 +01:00
ibaker
907d10705a 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-20 22:11:34 +01:00
ibaker
d4a0dfda77 Ensure ParsableByteArray is large enough when appending in VorbisReader
PiperOrigin-RevId: 336643621
2020-10-20 22:11:34 +01:00
insun
1e315e47d6 Expand bottom button's height and extend greyed background area to seekbar
Adjusted the bottom layout of StyledPlayerControlView :
- Enlarged bottom button's height to make tapping easier.
- Extended greyed background area to upper edge of seekbar.
- Gave padding between bottom edge of the overall layout and bottom buttons.
- Reduced horizontal margins between bottom buttons.

PiperOrigin-RevId: 336041160
2020-10-20 22:11:34 +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