4711 Commits

Author SHA1 Message Date
ibaker
3b9a9c9b7e Enable ID3-in-EMSG for HLS streams
This supports both chunkless & traditional preparation

PiperOrigin-RevId: 273938344
2019-10-13 12:37:08 +01:00
olly
6934c6fb33 Fix bogus reporting of audio focus loss
Playback cannot be suppressed if playWhenReady=false

PiperOrigin-RevId: 273726084
2019-10-13 12:33:56 +01:00
Oliver Woodman
6046e92920 Merge pull request #6502 from caiiiyua:bug_default_dash_chunk_source_wrong_segmentnumshift
PiperOrigin-RevId: 273549830
2019-10-13 12:29:27 +01:00
olly
0249058c1b Parse Label elements for adaptation sets
Issue: #6297
PiperOrigin-RevId: 273297284
2019-10-13 12:29:18 +01:00
olly
904e3f8d47 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-13 12:19:04 +01:00
olly
97cfcb57e6 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-13 12:18:23 +01:00
andrewlewis
495b418fb1 Add missing player null check
PiperOrigin-RevId: 272654378
2019-10-13 12:17:10 +01:00
sofijajvc
722722d8df Fix GL error logging
Log only if an error occured.

PiperOrigin-RevId: 272618322
2019-10-13 12:16:50 +01:00
olly
32afc33313 Make factories return specific types
PiperOrigin-RevId: 272614917
2019-10-13 12:16:38 +01:00
olly
2d0d4c7862 Clean up DashManifestParserTest
Also improve some tests by asserting the parser is left in
the correct position (assertNextTag).

PiperOrigin-RevId: 272614768
2019-10-13 12:16:25 +01:00
olly
e34685601c Minor upstream cleanup
PiperOrigin-RevId: 272614610
2019-10-13 12:16:08 +01:00
ibaker
e0c8cbe21e Pass the raw ICY metadata through IcyInfo
The ICY 'spec' isn't really clear/tight enough to do anything more
specific than this I think.

Issue:#6476
PiperOrigin-RevId: 272405322
2019-10-13 12:13:28 +01:00
ibaker
a09960b8f4 Move HLS mapped track picking into a separate method
This helps reduce the amount of nesting in HlsSampleStreamWrapper.track()

PiperOrigin-RevId: 271983779
2019-10-13 12:08:24 +01:00
ibaker
d9b60edabf Remove duplicated tracksEnded check in HlsSampleStreamWrapper
PiperOrigin-RevId: 271364512
2019-10-13 12:04:28 +01:00
ibaker
87138ceede Reshuffle {audio,video}SampleQueue{Index,MappingDone} into fields mapped by type
PiperOrigin-RevId: 271364200
2019-10-13 12:04:12 +01:00
tonihei
ad59304f77 Forward isPlaying/playbackSuppressionReason changes to analytics listeners.
PiperOrigin-RevId: 271347407
2019-10-13 12:03:39 +01:00
tonihei
7e46d34788 Add EventListener.onPlaybackSuppressionReasonChanged
Adding this callback makes sense for completeness (we have similar callbacks
for all other playback state properties), and also to detect audio focus loss
while buffering which would currently trigger no callback because isPlaying
is still false.

Issue:#6203
PiperOrigin-RevId: 271347351
2019-10-13 12:03:18 +01:00
olly
a3667decf9 Try initializing ADAPTATION_WORKAROUND_BUFFER as a byte[]
PiperOrigin-RevId: 270999947
2019-10-13 12:01:34 +01:00
tonihei
76a1dd3da2 Use Player.isPlaying in appropriate places.
This method should be used where we previously checked for active playback
by state==READY and playWhenReady=true. Using the new method ensures we take
audio focus into account for these usages.

Also update some method naming to avoid confusion with the isPlaying method.

Issue:#6203
PiperOrigin-RevId: 270910982
2019-10-13 12:01:04 +01:00
tonihei
fec8275331 Change default bandwidth fraction in AdaptiveTrackSelection.
A reduced fraction of 0.7 was shown to better balance the rebuffer/quality
trade-off.

PiperOrigin-RevId: 270670465
2019-10-13 11:58:39 +01:00
aquilescanta
c9fc0da745 When the HLS container format is not packed audio, reset timestmap offset
Issue:#6444
PiperOrigin-RevId: 270252126
2019-09-20 12:33:13 -07:00
tonihei
f8d81d05a4 Add Player.isPlaying and Player.getPlaybackSuppressionReason
The player may suppress playback when waiting for audio focus even if the
state==Player.READY. There is currently no getter or callback to obtain this
piece of information for UI updates or analytics.

Also, it's a important derived state to know whether the playback position is
advancing. Add isPlaying and the corresponding callback to allow retrieving
this information more easily.

Issue:#6203
PiperOrigin-RevId: 268921721
2019-09-20 10:07:10 -07:00
aquilescanta
556a9954a8 Avoid retrying fatal errors
Also clear fatal errors on seek operations

PiperOrigin-RevId: 269780886
2019-09-18 15:28:19 -07:00
olly
73e35abf27 Bump version to 2.10.5
PiperOrigin-RevId: 269582832
2019-09-18 15:26:44 -07:00
olly
2fca01b925 Make flags contiguous: There's no reason for the gap :)
PiperOrigin-RevId: 269514872
2019-09-17 09:08:12 -07:00
olly
57370b37ce Update translations
PiperOrigin-RevId: 269521864
2019-09-17 09:07:55 -07:00
bachinger
32a8625fb7 allowing 36 characters for shuffle mode off
PiperOrigin-RevId: 268478545
2019-09-17 09:06:50 -07:00
bachinger
cf3cfa1d69 allow 33 characters for strings of shuffle on/off
PiperOrigin-RevId: 268238764
2019-09-17 09:06:43 -07:00
bachinger
b2aa0ae087 provide content description for shuffle on/off button
PiperOrigin-RevId: 266884166
2019-09-17 09:06:13 -07:00
aquilescanta
66ba8d7793 Fix propagation of HlsMetadataEntry's in HLS chunkless preparation
PiperOrigin-RevId: 263356275
2019-09-17 08:34:37 -07:00
aquilescanta
47e405ee11 Add a metadata argument to Format factory methods used in HLS
Required for propagation of HlsMetadataEntry's in chunkless preparation.

PiperOrigin-RevId: 263324345
2019-09-17 08:34:13 -07:00
christosts
1a4b1e1ea1 Revert "Add HTTP request parameters (headers) to DataSpec."
This reverts commit c3d6be3afdd7c0ca68dba15e443bc64aa3f61073.
2019-09-16 17:53:40 -07:00
Oliver Woodman
26e293070e Merge pull request #6158 from xirac:dev-v2
PiperOrigin-RevId: 268240722
2019-09-16 17:51:50 -07:00
tonihei
560c8c8760 Simplify and improve text selection logic.
This changes the logic in the following ways:
 - If no preferred language is matched, prefer better scores for the selected
   audio language.
 - If a preferred language is matched, always prefer the better match
   irrespective of default or forced flags.
 - If a preferred language score and the isForced flag is the same, prefer
   tracks with a better selected audio language match.

PiperOrigin-RevId: 259707430
2019-09-16 17:33:38 -07:00
Toni
9bc4497749 Merge pull request #6178 from xirac:feature/text-track-score
PiperOrigin-RevId: 259707359
2019-09-16 17:31:27 -07:00
olly
23ddfaa80a Add fLaC prefix to FLAC initialization data
The fLaC prefix is included in the initialization data output
from the MKV extractor, so this is highly likely ot be the
right thing to do.

Issue: #6397
PiperOrigin-RevId: 268244365
2019-09-16 17:08:39 -07:00
andrewlewis
b9ffea6831 Fix decoder selection for E-AC3 JOC streams
Issue: #6398
PiperOrigin-RevId: 267563795
2019-09-16 17:08:06 -07:00
tonihei
72aa150f02 Handle potential timeline updates that switch from content to ad.
We currently don't test if an ad needs to be played in case we are already
playing content.

This is to prevent recreating the current content period when
an ad is marked as skipped. We prefer playing until the designated ad group
position and appending another piece of content. This is less likely to cause
visible discontinuities in case the ad group position is at a key frame
boundary.

However, this means we currently miss updates that require us to play an ad
after a timeline update.

PiperOrigin-RevId: 267553459
2019-09-16 17:04:32 -07:00
andrewlewis
5a516baa78 Fix init data handling for FLAC in MP4
Issue: #6396
PiperOrigin-RevId: 267536336
2019-09-16 17:04:24 -07:00
bachinger
332afc9f79 move transparency values of buttons to resources to make it accessible for customization
PiperOrigin-RevId: 266880069
2019-09-16 16:57:53 -07:00
aquilescanta
c3f3b1bfa4 Clarify LoadErrorHandlingPolicy's loadDurationMs javadocs
PiperOrigin-RevId: 266797383
2019-09-16 16:57:21 -07:00
bachinger
c879bbf64c move transparency of shuffle mode off button to bitmap
PiperOrigin-RevId: 266795413
2019-09-16 16:56:55 -07:00
Oliver Woodman
525d0320a7 Fix exception message
PiperOrigin-RevId: 266790267
2019-09-16 16:56:32 -07:00
bachinger
4712bcfd53 use isPlaying to determine which notification action to display in compact view
PiperOrigin-RevId: 266782250
2019-09-16 16:54:18 -07:00
kimvde
284a672bb3 Bypass sniffing for single extractor
Sniffing is performed in ProgressiveMediaPeriod even if a single
extractor is provided. Skip it in that case to improve performances.

Issue:#6325
PiperOrigin-RevId: 266766373
2019-09-16 16:51:07 -07:00
olly
f05d67b7c7 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-02 14:39:02 +01:00
olly
407dbf075e Add HttpDataSource.getResponseCode to provide the status code associated with the most recent HTTP response.
PiperOrigin-RevId: 266218104
2019-09-02 14:38:24 +01:00
olly
ad699b8ff6 seenCacheError should be set for all errors
PiperOrigin-RevId: 265662686
2019-09-02 14:37:40 +01:00
christosts
c3d6be3afd Add HTTP request parameters (headers) to DataSpec.
Adds HTTP request parameters in DataSpec. Keeps DataSpec behavior to be immutable as before.

PiperOrigin-RevId: 265087782
2019-09-02 14:37:24 +01:00
tonihei
46bf710cb3 Do not compare bitrates of audio tracks with different languages.
The last selection criteria is the audio bitrate to prefer higher-quality
streams. We shouldn't apply this criterium though if the languages of the
tracks are different.

Issue:#6335
PiperOrigin-RevId: 265064756
2019-09-02 14:37:12 +01:00