7878 Commits

Author SHA1 Message Date
Oliver Woodman
9d9a2a6818 Remove stray release note 2019-11-27 22:41:01 +00:00
andrewlewis
d30b0285a3 Fix audio processor draining for reconfiguration
When transitioning to a new stream in a different format, the audio
processors are reconfigured. After this, they are drained and then
flushed so that they are ready to handle data in updated formats for the
new stream.

Before this change, some audio processors made the assumption that after
reconfiguration no more input would be queued in their old input format,
but this assumption is not correct: during draining more input may be
queued. Fix this behavior so that the new configuration is not referred
to while draining and only becomes active once flushed.

Issue: #6601
PiperOrigin-RevId: 282515359
2019-11-27 22:40:13 +00:00
andrewlewis
b9f79b40f8 Remove redundant flush() calls from AudioProcessors
flush() is guaranteed to be called in all these cases anyway.

Also clarify documentation for AudioProcessor-specific methods that can
change the 'active' flag.

Issue: #6601
PiperOrigin-RevId: 282515255
2019-11-27 22:34:17 +00:00
andrewlewis
07b3cbc361 Add AudioProcessor.AudioFormat
Issue: #6601
PiperOrigin-RevId: 282515179
2019-11-27 22:34:12 +00:00
andrewlewis
a2b3ad863d Always drain/flush AudioProcessors after configuration
This simplifies the contract of configure and is in preparation for
fixing a bug where more input can't be queued when draining audio
processors for a configuration change.

Issue: #6601
PiperOrigin-RevId: 282514367
2019-11-27 22:34:05 +00:00
andrewlewis
a81149d962 Fix audio processor draining for reconfiguration
When transitioning to a new stream in a different format, the audio
processors are reconfigured. After this, they are drained and then
flushed so that they are ready to handle data in updated formats for the
new stream.

Before this change, some audio processors made the assumption that after
reconfiguration no more input would be queued in their old input format,
but this assumption is not correct: during draining more input may be
queued. Fix this behavior so that the new configuration is not referred
to while draining and only becomes active once flushed.

Issue: #6601
PiperOrigin-RevId: 282515359
2019-11-27 22:29:07 +00:00
andrewlewis
4799993d3b Remove redundant flush() calls from AudioProcessors
flush() is guaranteed to be called in all these cases anyway.

Also clarify documentation for AudioProcessor-specific methods that can
change the 'active' flag.

Issue: #6601
PiperOrigin-RevId: 282515255
2019-11-27 22:28:59 +00:00
andrewlewis
10f142b3ff Add AudioProcessor.AudioFormat
Issue: #6601
PiperOrigin-RevId: 282515179
2019-11-27 22:28:51 +00:00
andrewlewis
b7000e64e9 Always drain/flush AudioProcessors after configuration
This simplifies the contract of configure and is in preparation for
fixing a bug where more input can't be queued when draining audio
processors for a configuration change.

Issue: #6601
PiperOrigin-RevId: 282514367
2019-11-27 22:28:43 +00:00
Pierre-Hugues Husson
299487c175 Accept setting null override to setSelectionOverride
In-code documentation say this is allowed, and is the expected way to
disable renderer.
2019-11-26 17:21:33 +01:00
olly
e899e0ea81 Clean up 2.11.0 release notes
PiperOrigin-RevId: 282227866
2019-11-24 16:04:31 +00:00
olly
64569a3e5a Fix and clean up 2.11.0 release notes
PiperOrigin-RevId: 282227866
2019-11-24 16:02:26 +00:00
olly
bd0fbd0c89 Fix incorrect Javadoc
PiperOrigin-RevId: 281976465
2019-11-22 16:59:36 +00:00
andrewlewis
25b6a02026 Fix check for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 281972403
2019-11-22 16:59:31 +00:00
olly
f630ed1ab5 Fix incorrect Javadoc
PiperOrigin-RevId: 281976465
2019-11-22 16:58:42 +00:00
andrewlewis
abe3c8ce1d Fix check for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 281972403
2019-11-22 16:58:33 +00:00
olly
ff19262a5e Make placeholder sessions report their true state
Note that the renderer changes will all disappear when we remove
legacy injection of DrmSessionManager into renderers.

PiperOrigin-RevId: 281952601
2019-11-22 15:39:15 +00:00
olly
de641380df Improve WakeLock/AudioBecomingNoisy Javadoc
PiperOrigin-RevId: 281764207
2019-11-22 15:39:10 +00:00
olly
d82da93ec4 Simplify checking whether a sample can be read
PiperOrigin-RevId: 281763672
2019-11-22 15:39:05 +00:00
olly
cc520a670e Simplify playback of clear samples without keys
- Move property to DrmSession; it feels like a more natural place
  for it to go (and provides greater flexibility).
- Change flags to a boolean.

PiperOrigin-RevId: 281758729
2019-11-22 15:39:00 +00:00
andrewlewis
9be09b35e2 Add AV1 to supported formats
PiperOrigin-RevId: 281724630
2019-11-22 15:38:53 +00:00
olly
b0eea31391 Fix broken Enc/Clear playlist in media.exolist.json
- DRM properties need to be on individual playlist items.

PiperOrigin-RevId: 281718153
2019-11-22 15:38:48 +00:00
tonihei
8becf02c30 Replace all database.beginTransaction with beginTransactionNonExclusive
This ensures other database readers can continue reading while we do our
write transaction.

PiperOrigin-RevId: 281520758
2019-11-22 15:38:16 +00:00
olly
704bd8af09 Remove stray word in logging
PiperOrigin-RevId: 281510703
2019-11-22 15:38:10 +00:00
tonihei
febfeca2c6 Mark all methods accessing SQLite databases as potentially blocking.
They are all marked with a JavaDoc comment and the @WorkerThread annotation
which is useful if apps are using threading annotations. All other public
methods in the same classes are marked with @AnyThread to avoid the impression
we forgot to annotate them.

PiperOrigin-RevId: 281490301
2019-11-22 15:38:05 +00:00
ibaker
fc0aa08d79 Add testutils as test dep of library-core module
The current workaround seems to cause compilation errors inside the
testutils module in Android Studio. This seems to fix them.

This doesn't introduce a circular dependency because it's only
the tests in library-core depending on testutils.

PiperOrigin-RevId: 281318192
2019-11-22 15:37:59 +00:00
andrewlewis
1730b6bb51 Reconfigure audio sink when PCM encoding changes
Note:
- Fixing this uncovers another bug in how audio processor draining
  works, so the test playlist still doesn't play correctly after this
  change.
- Once we reconfigure the audio sink based on the ExoPlayer Format
  rather than the codec MediaFormat in a later change, this change can
  be reverted.

Issue: #6601
PiperOrigin-RevId: 281264149
2019-11-22 15:37:51 +00:00
Oliver Woodman
3023bb4d91 Remove future release notes 2019-11-22 15:35:20 +00:00
olly
66c206c71a Make placeholder sessions report their true state
Note that the renderer changes will all disappear when we remove
legacy injection of DrmSessionManager into renderers.

PiperOrigin-RevId: 281952601
2019-11-22 15:10:32 +00:00
ibaker
35237e658f Add SSA test file to the demo app
I wrote this myself

PiperOrigin-RevId: 281942685
2019-11-22 15:10:24 +00:00
olly
f3185d077f Improve WakeLock/AudioBecomingNoisy Javadoc
PiperOrigin-RevId: 281764207
2019-11-22 15:10:16 +00:00
olly
7c24ba0934 Simplify checking whether a sample can be read
PiperOrigin-RevId: 281763672
2019-11-22 15:10:09 +00:00
olly
ab8816214e Simplify playback of clear samples without keys
- Move property to DrmSession; it feels like a more natural place
  for it to go (and provides greater flexibility).
- Change flags to a boolean.

PiperOrigin-RevId: 281758729
2019-11-22 15:10:02 +00:00
kimvde
a7d962bf27 Downgrade targetSdkVersion back to 28
- The upgrade to version 29 made Robolectric version 4.3 fail.
- Upgrading Robolectric to 4.3.1 requires Java 9, which requires manual
  configuration in Android Studio.

PiperOrigin-RevId: 281753915
2019-11-22 15:09:54 +00:00
kimvde
922c0af152 Rollback of ca5b094916
*** Original commit ***

Upgrade Robolectric version

This fixes the issue reported in
https://github.com/robolectric/robolectric/issues/5207.

***

PiperOrigin-RevId: 281747261
2019-11-22 15:09:47 +00:00
andrewlewis
731b002e13 Add AV1 to supported formats
PiperOrigin-RevId: 281724630
2019-11-22 15:09:39 +00:00
kimvde
ca5b094916 Upgrade Robolectric version
This fixes the issue reported in
https://github.com/robolectric/robolectric/issues/5207.

PiperOrigin-RevId: 281720030
2019-11-22 15:09:32 +00:00
olly
5abb4ff8c1 Fix broken Enc/Clear playlist in media.exolist.json
- DRM properties need to be on individual playlist items.

PiperOrigin-RevId: 281718153
2019-11-22 15:09:24 +00:00
kimvde
b18650fdcf Expose metadata in FLAC extractor
PiperOrigin-RevId: 281538423
2019-11-22 15:09:17 +00:00
olly
f6853e4751 Bump targetSdkVersion to 29
- Enabling legacy storage for our demo app so that playing
  slideloaded media is still easy.
- Apps are still free to specify a lower targetSdkVersion

PiperOrigin-RevId: 281537041
2019-11-22 15:09:09 +00:00
tonihei
f937fe9e2a Replace all database.beginTransaction with beginTransactionNonExclusive
This ensures other database readers can continue reading while we do our
write transaction.

PiperOrigin-RevId: 281520758
2019-11-22 15:09:01 +00:00
olly
d8dcd2930c Remove stray word in logging
PiperOrigin-RevId: 281510703
2019-11-22 15:08:53 +00:00
tonihei
809234bc4f Mark all methods accessing SQLite databases as potentially blocking.
They are all marked with a JavaDoc comment and the @WorkerThread annotation
which is useful if apps are using threading annotations. All other public
methods in the same classes are marked with @AnyThread to avoid the impression
we forgot to annotate them.

PiperOrigin-RevId: 281490301
2019-11-22 15:08:46 +00:00
christosts
ca849a0679 Fix incorrent javadoc syntax
PiperOrigin-RevId: 281480582
2019-11-22 15:08:38 +00:00
christosts
f921d0d3e5 Ability to set timeout on release() and setSurface()
Add experimental APIs to set a timeout Player#release() and
PlayerMessage#blockUntilDeliver().

PiperOrigin-RevId: 281479146
2019-11-22 15:08:31 +00:00
aquilescanta
f6afbe6cb0 Make MediaLoadData a top level class
In order to reuse it in LoadErrorHandlingPolicy.

PiperOrigin-RevId: 281333287
2019-11-22 15:08:16 +00:00
ibaker
c8e5144494 Add testutils as test dep of library-core module
The current workaround seems to cause compilation errors inside the
testutils module in Android Studio. This seems to fix them.

This doesn't introduce a circular dependency because it's only
the tests in library-core depending on testutils.

PiperOrigin-RevId: 281318192
2019-11-22 15:08:08 +00:00
samrobinson
e26a61b903 Improve Format propagation within the MediaCodecRenderer.
For example, fix handling of pixel aspect ratio changes in
playlists where video resolution does not change.

Issue:#6646
PiperOrigin-RevId: 281276023
2019-11-22 15:08:00 +00:00
andrewlewis
dbd7e055e5 Reconfigure audio sink when PCM encoding changes
Note:
- Fixing this uncovers another bug in how audio processor draining
  works, so the test playlist still doesn't play correctly after this
  change.
- Once we reconfigure the audio sink based on the ExoPlayer Format
  rather than the codec MediaFormat in a later change, this change can
  be reverted.

Issue: #6601
PiperOrigin-RevId: 281264149
2019-11-22 15:07:52 +00:00
kimvde
774ccafa93 Remove TODO around optimizing sample data outputs in FlacExtractor
Preliminary measurement showed that the results were similar to the non-optimized
version.

PiperOrigin-RevId: 281255476
2019-11-22 15:07:44 +00:00