7155 Commits

Author SHA1 Message Date
bachinger
01d4adad6d Reset playback speed when live speed control becomes unused
Issue: #8664
#minor-release
PiperOrigin-RevId: 360877086
2021-04-09 16:06:56 +01:00
Oliver Woodman
d6eb61d6f8 Merge pull request #8546 from TadejZupancic:dev-v2
PiperOrigin-RevId: 360433358
2021-04-09 16:06:22 +01:00
kimvde
1a190ff90e Link to callback in Player getters' Javadoc
PiperOrigin-RevId: 360398175
2021-04-09 16:04:54 +01:00
andrewlewis
bcd0a91ed6 Fall back from DTS HD to DTS
#minor-release

PiperOrigin-RevId: 360384540
2021-04-09 14:10:21 +01:00
olly
8570248079 Fix scrubber not reappearing correctly in some cases
Issue: #8646
PiperOrigin-RevId: 360184586
2021-04-09 14:08:49 +01:00
ibaker
e4d5e07fd3 Make SsaDecoder robust against absent Format items
Suggested in a comment on PR Issue: #8615

PiperOrigin-RevId: 359522217
2021-04-09 14:01:23 +01:00
Ian Baker
4364b9150f Disable flaky test in ExoPlayerTest
targetLiveOffsetInMedia_unknownWindowStartTime_doesNotAdjustLiveOffset
is flaky on the release branch. It's not flaky on the dev-v2 branch
due to recent changes to FakeClock's behaviour which aren't yet present
on release-v2.
2021-02-25 16:29:37 +00:00
bachinger
c96f695af7 Bump version to 2.13.2
PiperOrigin-RevId: 359486817
2021-02-25 11:51:24 +00:00
marcbaechinger
e21b99a671 Merge pull request #8615 from szaboa:dev-v2-8435-ssa-font-size
PiperOrigin-RevId: 359244236
2021-02-24 18:35:59 +00:00
kimvde
3f8f7ba97f Fix conditions to enable UI actions
- Ensure consistency between (Styled)PlayerControlView,
  PlayerNotificationManager, TimelineQueueNavigator and
  DefaultControlDispatcher.
- Handle the case where a live stream has ended when enabling previous
  and next actions (window.isLive() is true and window.isDynamic is
  false in that case)

PiperOrigin-RevId: 359063793
2021-02-24 18:32:11 +00:00
kimvde
90c18e4410 Enable next button if window is live
This behavior is consistent with DefaultControlDispatcher#dispatchNext().

#minor-release

PiperOrigin-RevId: 357145076
2021-02-24 18:14:03 +00:00
marcbaechinger
e890204757 Merge pull request #8539 from larryng:patch-1
PiperOrigin-RevId: 359000734
2021-02-24 18:07:55 +00:00
olly
46995b3c24 Remove unused mocking in CacheWriterTest
#minor-release

PiperOrigin-RevId: 358998449
2021-02-23 13:55:35 +00:00
olly
18a94aa717 SilenceSampleStream.readData: Handle flags-only buffers
The SampleStream.readData contract is that when reading a sample
with a flags-only buffer, the buffer timestamp and flags should
be set and the read position should not be advanced.

#minor-release

PiperOrigin-RevId: 357842130
2021-02-22 15:04:08 +00:00
olly
5be7d4da9e Don't clear audioSessionId when audio disabled
Issue: #8585
PiperOrigin-RevId: 357553237
2021-02-22 14:52:37 +00:00
tonihei
0ab9a219f7 Clarify/correct restrictions of AdsMediaSource.
The source can be used in compositions (in fact, every source is
automatically used in an internal composition when constructing the
playlist), and there is not really a concept of top-level media source
any more since the Player supports playlists.

The actual restriction is that the content media source needs to have
exactly one period to be able to create a SinglePeriodAdTimeline.

#minor-release

PiperOrigin-RevId: 357544191
2021-02-22 14:46:35 +00:00
kimvde
84d7433936 Revert logic to decide whether meta atom is full
The previous logic was changed under the assumption that the first box
inside a meta box was not always an hdlr box, but this is not true.

#minor-release

PiperOrigin-RevId: 357200713
2021-02-22 14:35:54 +00:00
kimvde
75cc5990b0 Add support for MP4/QuickTime non-full meta atoms
PiperOrigin-RevId: 357160215
2021-02-22 14:32:08 +00:00
olly
5807d2e0be Fix RequiresApi annotation
#minor-release

PiperOrigin-RevId: 357273184
2021-02-12 22:55:02 +00:00
olly
26371ae40f Bump version to 2.13.1
PiperOrigin-RevId: 357219132
2021-02-12 20:01:59 +00:00
tonihei
01f57c3c0b Fix available end time calculation for multi-period DASH live streams
The available end time was accidentally substracted by the start time
of the last period.

To avoid similar time reference confusion in the future, also renaming
many variables and methods to clearly reflect the time reference point.
And to avoid constant conversion, the processManifest method also
attempts to converge to time relative to the start of the window as
quickly as possible.

Issue: #8537
PiperOrigin-RevId: 357001624
2021-02-12 17:19:37 +00:00
ibaker
295e8bacb3 Check if keepalive is enabled before releasing sessions in DDSM.release
If keepalive is disabled the existing code over-eagerly releases
DrmSession instances. This is arguably OK since a (Default)DrmSession
should be released before its (Default)Manager is released
(since the underlying MediaDrm instance might be released when the
manager is released). And if all sessions are released before the
manager is released then `sessions` is empty, so the loop is a no-op.

Issue: #8576
PiperOrigin-RevId: 356955308
2021-02-12 17:19:19 +00:00
ibaker
d48d59bda1 Propagate DRM config when creating ad media sources
The `DrmConfiguration.sessionForClearTypes` property is often used
to ensure a secure decoder is used for clear ads played in encrypted
content. This is because some devices show black frames when switching
decoders.

Before this change the DRM config isn't propagated down when
constructing the ad media source, meaning
`DrmSessionManager.DRM_UNSUPPORTED` is always used, which will
cause playback to switch from secure to clear decoder when transitioning
to an ad break (ignoring the MediaItem `sessionForClearTypes` option.

Issue: #8568

PiperOrigin-RevId: 356951124
2021-02-12 17:19:03 +00:00
andrewlewis
ed3d1c6283 Don't set playback parameters when using tunneling
Issue: #4803

PiperOrigin-RevId: 356923345
2021-02-12 17:18:34 +00:00
ibaker
19ab087c61 Cache the last DrmSessionManager instance inside the default provider
Without this a new manager is instantiated for every item in a playlist,
meaning the impact of caching improvements to DefaultDrmSessionManager
are reduced (since the cache doesn't persist across playlist items).

With this change, playlists of items with identical DRM config will use
the same manager instance (and thus share existing sessions).

Issue: #8523
PiperOrigin-RevId: 356690852
2021-02-12 17:17:58 +00:00
andrewlewis
56feb96fc9 Handle loading the same ad more than once
Also allow the player's prepared ad media period durations array to exceed the
length of the loaded ad URIs array, as it's possible for the player to buffer
an ad media period fully at the point where it's known that an ad is coming up
but its URI is still unknown.

PiperOrigin-RevId: 356249284
2021-02-12 17:17:40 +00:00
tonihei
5211f06dc2 Don't apply speed adjustment if windowStartTime is unknown.
This may happen for HLS live streams without program date time
information.

Issue: #8560

PiperOrigin-RevId: 356227729
2021-02-12 17:17:11 +00:00
kimvde
a08514315f Transformer: remove SpeedProvider interface from Javadoc
#minor-release

PiperOrigin-RevId: 356221487
2021-02-12 17:15:58 +00:00
kimvde
77798e4fef Avoid skipping the first decoder output buffers after speed change
#minor-release

PiperOrigin-RevId: 355652144
2021-02-04 18:16:51 +00:00
kimvde
045048f6f5 Fall back to AVC/HEVC for Dolby Vision levels 10-13
Before, the level was set to null in this case.
MediaCodecUtil.getCodecProfileAndLevel() was therefore returning null
and the fallback to AVC/HEVC was not enabled in MediaCodecVideoRenderer.

Issue:#8530
PiperOrigin-RevId: 355574499
2021-02-04 16:19:46 +00:00
olly
95d9060a30 Suppress SwitchIntDef warning where it makes sense
In both cases it's deliberate that all excluded constants should use
the default branch. Furthermore, there are quite a lot of excluded
constants missing, so it's probably better to suppress the warning
than to include them all.

#minor-release

PiperOrigin-RevId: 355426749
2021-02-04 00:32:03 +00:00
kimvde
b879869a10 Add Transformer "Getting started" page
#minor-release

PiperOrigin-RevId: 355381610
2021-02-04 00:31:46 +00:00
olly
42d3bb42b7 Refine ProGuard config workaround for Function
This is a more targeted workaround, which still allows for the
containing package name to be obfuscated.

#minor-release

PiperOrigin-RevId: 355381201
2021-02-03 15:49:10 +00:00
olly
b419d0ac1d Improve EventLogger static metadata formatting
#minor-release

PiperOrigin-RevId: 355203044
2021-02-03 15:49:04 +00:00
ibaker
b4a9c756b8 Document that DrmSessionManagerProvider doesn't call DSM#prepare()
#minor-release

PiperOrigin-RevId: 355159635
2021-02-03 15:48:53 +00:00
olly
71f585f112 Fix ProGuard configuration for 2.13
Note: We only support pro-guard on a best effort basis,
and developers should use R8 whenever possible.

#minor-release

PiperOrigin-RevId: 355129695
2021-02-02 13:07:39 +00:00
kimvde
451fb5b6de Transformer: set audio decoder max input size
#minor-release

PiperOrigin-RevId: 354949992
2021-02-01 22:56:56 +00:00
kimvde
15472a510a Merge MuxerWrapper stop() and release() methods
#minor-release

PiperOrigin-RevId: 354938190
2021-02-01 22:56:51 +00:00
ibaker
03b9fa303d Log a warning when SingleSampleMediaPeriod turns a load error into EOS
Without this no error is currently logged or propagated to EventLogger.
The propagation doesn't happen because
MergingMediaSource.ForwardingEventListener only propagates events
originating from the "main" source in the merge:
<unknown commit>

#minor-release

PiperOrigin-RevId: 354902467
2021-02-01 22:56:19 +00:00
andrewlewis
17ca191fb5 Simplify output buffer handling in transformer
We can dequeue as part of getting output buffers (or output buffer info) in
`MediaCodecAdapterWrapper`, which simplifies the caller slightly.

Also try to make minor clarifications in method naming in
`TransformerAudioRenderer`.

#minor-release

PiperOrigin-RevId: 354890796
2021-02-01 22:56:14 +00:00
andrewlewis
50344e2703 Simplify feeding codec input in transformer
The caller knows whether it's queued end-of-stream, so we can remove the return
value of the method.

#minor-release

PiperOrigin-RevId: 354888298
2021-02-01 22:56:10 +00:00
olly
6f80181905 Make Cronet extension depend only on common
This also moves DefaultHttpDataSource to common, which seems
sensible, else non-player components that need a DataSource
don't have any useful concrete implementations. We should
think about moving some of the other concrete implementations
to common as well.

PiperOrigin-RevId: 354738925
2021-02-01 22:56:05 +00:00
olly
07a3ba1b7e Fix nullness issues in DefaultHttpDataSource
This is needed to move it to common, since we don't want to start
adding any nullness exemptions for the common module.

PiperOrigin-RevId: 354734715
2021-02-01 22:56:00 +00:00
andrewlewis
84b96fdff7 Improve format propagation in transformer
- Store output format in `MediaCodecAdapterWrapper` when we get a format from
  the codec, instead of creating it on demand.
- Make format building code not audio-specific.
- Remove `MediaCodecAdapterWrapper.getConfigFormat` and instead keep track of
  the input/output formats in the renderer. This will mean that the code still
  works if an audio processor changes the audio format in future.
- Make exceptions thrown during audio rendering use the same (input) renderer
  format.
- Misc other minor cleanup.

#minor-release

PiperOrigin-RevId: 354556619
2021-02-01 22:55:56 +00:00
andrewlewis
d5499ee36f Switch transformer tests to use dump files
Add an interface to muxers to allow tests to pass a dumpable muxer.

#minor-release

PiperOrigin-RevId: 354543388
2021-02-01 22:55:51 +00:00
Oliver Woodman
07e8860084 Merge pull request #8490 from szaboa:dev-2-8435-ssa-color
PiperOrigin-RevId: 354293679
2021-02-01 22:55:38 +00:00
kimvde
56aafd1638 Fix parsing of Vorbis codec private
- Fix comparison between a byte and 0xFF to avoid conversion of 0xFF to
  byte and to int again (due to numeric promotion).
- Fix addition of int and byte with most significant bit set. The byte
  was incorrectly promoted to an int negative value.

Issue:#8496
#minor-release
PiperOrigin-RevId: 353865751
2021-02-01 22:54:38 +00:00
christosts
9b95b46286 BandwidthMeter minor javadoc fix
PiperOrigin-RevId: 353858581
2021-02-01 22:54:20 +00:00
andrewlewis
de5c7a2fee Elaborate method comments in transformer audio renderer
#minor-release

PiperOrigin-RevId: 353856211
2021-02-01 22:54:15 +00:00
Ian Baker
afcd741447 Remove FfmpegVideoRenderer from 2.13.0 release
This component isn't ready to be released yet.
2021-01-26 14:51:09 +00:00