6800 Commits

Author SHA1 Message Date
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
ibaker
b4a2f27cdd Expand FakeSampleStream to allow specifying a single sample
I removed the buffer.flip() call because it seems incompatible with the way MetadataRenderer deals with the Stream - it calls flip() itself on line 126. Tests fail with flip() here, and pass without it...

PiperOrigin-RevId: 263381799
2019-09-16 18:41:32 -07:00
Oliver Woodman
70731fe8b1 Further tweaking of release notes 2019-09-16 18:24:54 -07:00
Oliver Woodman
772b13999a Tweak release notes 2019-09-16 18:09:09 -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
Oliver Woodman
06a374e74b Clean up release notes 2019-09-16 17:25:53 -07:00
olly
480f73748d Upgrade to OkHttp 3.12.5
Issue: #4078
PiperOrigin-RevId: 268887744
2019-09-16 17:11:05 -07:00
bachinger
4eda96dd66 disable seekbar in media style notification for live stream
ISSUE: #6416
PiperOrigin-RevId: 268673895
2019-09-16 17:09:02 -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
Oliver Woodman
fe422dbde4 Merge pull request #6303 from ittiam-systems:rtmp-3.1.0
PiperOrigin-RevId: 266407058
2019-09-02 14:43:00 +01: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
andrewlewis
0085a7e761 Defer adsManager.init until the timeline has loaded
If the app seeks after we get an ads manager but before the player exposes the
timeline with ads, we would end up expecting to play a preroll even after the
seek request arrived. This caused the player to get stuck.

Wait until a non-empty timeline has been exposed via onTimelineChanged before
initializing IMA (at which point it can start polling the player position). Seek
requests are not handled while an ad is playing.

PiperOrigin-RevId: 265058325
2019-09-02 14:36:21 +01:00
olly
7cefb56eda Update comment to indicate correct int value of "FLAG_ALLOW_CACHE_FRAGMENTATION" in ExoPlayer2 upstream DataSpec
Currently the value of FLAG_ALLOW_CACHE_FRAGMENTATION is defined as "1 << 4" but commented as "8". Either the value of FLAG_ALLOW_CACHE_FRAGMENTATION should be "1 << 3", or the comment should be 16. Here I am modifying the comment since it does not affect any current behavior.

PiperOrigin-RevId: 265011839
2019-09-02 14:36:05 +01:00
andrewlewis
886fe910a8 Avoid potential ArrayStoreException with audio processors
The app is able to pass a more specialized array type, so the Arrays.copyOf call
produces an array into which it's not valid to store arbitrary AudioProcessors.

Create a new array and copy into it to avoid this problem.

PiperOrigin-RevId: 264779164
2019-09-02 14:35:52 +01:00
tonihei
9e3bee89e1 Prevent NPE in ImaAdsLoader onPositionDiscontinuity.
Any seek before the first timeline becomes available will result in a NPE.
Change it to handle that case gracefully.

Issue:#5831
PiperOrigin-RevId: 264603061
2019-09-02 14:35:33 +01:00
andrewlewis
5b2b21da86 Fix handling of delayed AdsLoader.start
AdsMediaSource posts AdsLoader.start to the main thread during preparation, but
the app may call AdsLoader.setPlayer(null) before it actually runs (e.g., if
initializing then quickly backgrounding the player).

This is valid usage of the API so handle this case instead of asserting. Because
not calling setPlayer at all is a pitfall of the API, track whether setPlayer
has been called and still assert that in AdsLoader.start.

PiperOrigin-RevId: 264329632
2019-09-02 14:35:14 +01:00
ibaker
c60b355f9c Add support for the AOM scheme_id for ID3-in-EMSG
https://developer.apple.com/documentation/http_live_streaming/about_the_common_media_application_format_with_http_live_streaming

PiperOrigin-RevId: 264126140
2019-09-02 14:35:00 +01:00
ibaker
47e0580d80 Unwrap SCTE-35 messages in emsg boxes
PiperOrigin-RevId: 263768428
2019-09-02 14:34:35 +01:00
ibaker
d3d192e36e Extend EventMessage.toString to include durationMs
This field is used in .equals(), so it makes sense to include it in toString() too.

PiperOrigin-RevId: 263768329
2019-09-02 14:34:30 +01:00
ibaker
9ec346a2e1 Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)
This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

PiperOrigin-RevId: 263767144
2019-09-02 14:34:19 +01:00
Venkatarama NG. Avadhani
08bb42ddc5 Upgrade librtmp-client to 3.1.0 2019-09-02 14:33:51 +01:00
ibaker
5100e67c83 Support unwrapping nested Metadata messages in MetadataRenderer
Initially this supports ID3-in-EMSG, but can also be used to support SCTE35-in-EMSG too.

PiperOrigin-RevId: 263535925
2019-09-02 14:33:45 +01:00
ibaker
2de1a204e2 Add Metadata.toString that prints the contents of entries
entries are used in .equals(), so it's good to have them printed in toString() too (for test failures) and it makes logging easier too.

PiperOrigin-RevId: 263335503
2019-09-02 14:33:26 +01:00
ibaker
dcac4aa67f Add description to TextInformationFrame.toString() output
This field is used in .equals(), we should print it in toString() too

PiperOrigin-RevId: 263335432
2019-09-02 14:33:21 +01:00
tonihei
90b62c67fb Change default video buffer size to 32MB.
The current max video buffer is 13MB which is too small for high quality
streams and doesn't allow the DefaultLoadControl to buffer up to its default
max buffer time of 50 seconds.

Also move util method and constants only used by DefaultLoadControl into this
class.

PiperOrigin-RevId: 263328088
2019-09-02 14:33:14 +01:00
tonihei
a381cbf536 Make reset on network change the default.
PiperOrigin-RevId: 262886490
2019-09-02 14:32:54 +01:00
andrewlewis
4656196dae Upgrade IMA dependency version
PiperOrigin-RevId: 262511088
2019-09-02 14:32:46 +01:00
olly
921ff02c90 Only read from FormatHolder when a format has been read
I think we need to start clearing the holder as part of the
DRM rework. When we do this, it'll only be valid to read
from the holder immediately after it's been populated.

PiperOrigin-RevId: 262362725
2019-09-02 14:32:40 +01:00
ibaker
a08b537e8e Simplify EventMessageEncoder/Decoder serialization
We're no longer tied to the emsg spec, so we can skip unused fields
and assume ms for duration.

Also remove @Nullable annotation from EventMessageEncoder#encode, it
seems the current implementation never returns null

PiperOrigin-RevId: 262135009
2019-09-02 14:32:33 +01:00
ibaker
bb6b0e1a5a Expose a method on EventMessageDecoder that returns EventMessage directly
PiperOrigin-RevId: 262121134
2019-09-02 14:32:27 +01:00