6833 Commits

Author SHA1 Message Date
Oliver Woodman
30f79a4c47 Tweak release notes 2019-11-18 17:17:23 +00:00
Oliver Woodman
ae271c1689 Bump version to 2.10.8 2019-11-17 04:53:48 +00:00
olly
2e0719b555 Parse channel count and sample rate from ALAC initialization data
Also remove the "do we really need to do this" comment for AAC.
Parsing from codec specific data is likely to be more robust, so
I think we should continue to do it for formats where we've seen
this problem.

Issue: #6648
PiperOrigin-RevId: 280575466
2019-11-17 04:39:40 +00:00
Oliver Woodman
1345010e27 Merge pull request #6650 from stanionascu:dev-v2-dv
PiperOrigin-RevId: 280573887
2019-11-17 04:39:31 +00:00
bachinger
c0e633fbe1 use getPeriodByUid when searching for subsequent period of seek timeline
Issue: #6641
PiperOrigin-RevId: 279963739
2019-11-17 04:39:01 +00:00
andrewlewis
4b012a9b6e Don't check channels for E-AC3 JOC passthrough
PiperOrigin-RevId: 279841132
2019-11-17 04:35:41 +00:00
kimvde
a8b65ca8d6 Compute format maxInputSize in FlacReader
Use the maximum frame size as the maximum sample size if provided.

PiperOrigin-RevId: 279722820
2019-11-17 04:35:31 +00:00
andrewlewis
2b1c2171e7 Handle new signaling for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 279666771
2019-11-17 04:35:26 +00:00
kimvde
ed6eb3aa58 Fix FLAC bit rate computation
PiperOrigin-RevId: 279088193
2019-11-17 04:34:01 +00:00
kimvde
3f9e3107ec Fix extractor sniffing in FLAC extension
Assuming that a flac stream starts with bytes
['f', 'L', 'a', 'C', 0, 0, 0, 0x22] is not always correct as it could
also start with ['f', 'L', 'a', 'C', 0x80, 0, 0, 0x22]
(see https://xiph.org/flac/format.html#metadata_block_streaminfo).

PiperOrigin-RevId: 279080562
2019-11-17 04:33:52 +00:00
Oliver Woodman
d73d64bc6f
Merge pull request #6619 from google/dev-v2-r2.10.7
r2.10.7
2019-11-06 13:06:22 +00:00
olly
e30f4f20f0 Bump version to 2.10.7
PiperOrigin-RevId: 278658259
2019-11-05 18:37:56 +00:00
kimvde
9ac13f91b6 Fix inverted arguments in FlacReader format creation
PiperOrigin-RevId: 278332587
2019-11-05 17:41:29 +00:00
kimvde
1ea878a0b0 Add parameter names to Format creation
PiperOrigin-RevId: 277963928
2019-11-05 17:41:04 +00:00
aquilescanta
6c7fbe8b52 Add shuffle and repeat modes to media session playback state invalidation
Which ensures both get updated when the MediaSessionConnector player
changes.

Issue:#6582
PiperOrigin-RevId: 277254889
2019-11-05 17:40:35 +00:00
olly
accb31e489 Reset MediaSession shuffle/repeat modes if player is null
- This is for consistency with PlayerControlView.

- Also update PlayerNotificationManager notification if shuffle
  mode changes. This is for consistency with what happens when
  the repeat mode changes. By default the notification will be
  unchanged, but custom implementations can extend and then
  override createNotification, and given these modes change
  infrequently it feels like we can just do this. The alternative
  for achieving consistency would be to remove handling of repeat
  mode changes.

Issue: #6582
PiperOrigin-RevId: 277925094
2019-11-05 17:39:01 +00:00
kimvde
cc94ae7bfb Fix typo in WavHeader class
PiperOrigin-RevId: 277910360
2019-11-05 17:38:24 +00:00
andrewlewis
7ada1a848f Fix detection of Dolby Atmos in HLS
E-AC3 with JOC is signaled using the CHANNELS attribute for HLS:
https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices/hls_authoring_specification_for_apple_devices_appendices

PiperOrigin-RevId: 277680300
2019-11-05 17:37:41 +00:00
andrewlewis
f4b9042bf0 Recreate Opus decoder for stream change
The framework opus decoder discards some samples after a call to
flush(). Because we flush a decoder that is being retained across an
input format change, this means that the start of audio gets truncated
when transitioning to a new opus stream. See also
https://android.googlesource.com/platform/frameworks/av/+/refs/heads/android10-release/media/libstagefright/codecs/opus/dec/SoftOpus.cpp.

Avoid this by recreating opus decoders instead of flushing them. It
seems fine to do this for all opus decoders as reinitialization should
be cheap, OEM-provided implementations may also discard samples and
playback shouldn't be interrupted on reinitialization due to the
downstream AudioTrack buffer.

PiperOrigin-RevId: 277458759
2019-11-05 17:37:12 +00:00
olly
acb84396d5 Fix incorrect anamorphic handling in Leanback extension
The leanback library doesn't know about non-square pixels. So if
we're playing content that uses non-square pixels, we need to adjust
the video dimensions that we provide to leanback such that it
renders the video with the correct aspect ratio.

PiperOrigin-RevId: 277042560
2019-11-05 17:35:34 +00:00
ibaker
6788a830da Use -Float.MAX_VALUE for Cue#DIMEN_UNSET
Float.MIN_VALUE is very close to zero:

PiperOrigin-RevId: 276674142
2019-11-05 17:33:50 +00:00
aquilescanta
6aa792aad5 Document error handling in the Extractor interface
PiperOrigin-RevId: 276660235
2019-11-05 17:33:24 +00:00
ibaker
2c721130b1 Update parseStbl to handle edit lists & gapless info
Without this, a subtitle track empty edit list used to offset the start of
subtitles is ignored.

Also the current code seems to depend on the order in which
we parse the tracks (audio first means we have gapless info when we parse
video track, while video first we wouldn't).

It's not clear why we can't handle both edit lists & gapless info

PiperOrigin-RevId: 276029744
2019-11-05 17:32:13 +00:00
tonihei
2dbc5755f6 Fix NPE in FakeAdaptiveMediaPeriod.
The compositeSequenableLoader was causing NPEs in isLoading. Initializing it
upfront prevents this problem and is in line with what we do in all real
MediaPeriods.

PiperOrigin-RevId: 275491511
2019-11-05 17:30:17 +00:00
Oliver Woodman
41b3fc1101
Merge pull request #6542 from google/dev-v2-r2.10.6
r2.10.6
2019-10-18 21:32:24 +01:00
samrobinson
2671ff0c53 Added an ICY header workaround for unseekable MP3 streams.
Issue:#6537
PiperOrigin-RevId: 275477266
2019-10-18 18:15:07 +01:00
olly
b0d0914ce5 Round impossible H264 resolutions up to valid values for capabilities check
If an odd resolution is impossible in the specification itself, then we know
that the caller is passing invalid data. Round up on the assumption it's a
rounding error so that playback can proceed.

Issue: #6551
PiperOrigin-RevId: 275226813
2019-10-17 13:21:27 +01:00
tonihei
40dbe10b12 Align PlaybackSuppressionReason java doc with method doc.
Same change as done in c49388aca2.

PiperOrigin-RevId: 274894288
2019-10-15 23:10:47 +01:00
Oliver Woodman
79da5219e5 Fix release notes. Toggle publish to false. 2019-10-14 17:16:28 +01:00
Oliver Woodman
55ff555188 Fix DashManifestParserTest in release branch 2019-10-14 17:14:41 +01:00
olly
a9a1cb7791 Fix diverged root build.gradle files
PiperOrigin-RevId: 274568961
2019-10-14 14:58:15 +01:00
aquilescanta
6457a4ab80 Register cast module
PiperOrigin-RevId: 274568660
2019-10-14 14:58:08 +01:00
olly
657b47cd04 Fix broken Javadoc
PiperOrigin-RevId: 274564800
2019-10-14 14:19:52 +01:00
olly
32b0474d57 Clean up playback suppression
PiperOrigin-RevId: 274561876
2019-10-14 14:11:31 +01:00
olly
0cda57aa5a Bump version to 2.10.6
PiperOrigin-RevId: 274534626
2019-10-14 14:10:28 +01:00
andrewlewis
c02f3dd4ff Handle legacy DASH audio channel configuration
Issue: #6523
PiperOrigin-RevId: 274160232
2019-10-13 12:44:29 +01:00
olly
5a6fdaad72 Don't set a playback suppression reason for permanent audio focus loss
It's documented to be for temporary loss only (i.e. the case where
externally reported playWhenReady is still true)

PiperOrigin-RevId: 274129922
2019-10-13 12:42:52 +01:00
krocard
0425264b8f Update Gradle version
PiperOrigin-RevId: 273971120
2019-10-13 12:37:48 +01:00
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
Oliver Woodman
02c344999c Merge pull request #6379 from wingyippp:flac-seek-map-two-points
PiperOrigin-RevId: 272856747
2019-10-13 12:18:12 +01:00
ibaker
fabdb84136 Exclude .li files in ExoPlayer's .hgignore
These seem to be created by the Android Studio layout inspector

PiperOrigin-RevId: 272856118
2019-10-13 12:18:00 +01:00
olly
5e090d81b4 Remove unnecessary DeleteLocalRef usage
Keeping the ones inside loops, because theoretically they
can be useful there (in practice, for this use case, it's
highly unlikely to make any difference).

PiperOrigin-RevId: 272834073
2019-10-13 12:17:45 +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