6799 Commits

Author SHA1 Message Date
olly
383c0adcca Remove more low hanging fruit from nullness blacklist
PiperOrigin-RevId: 256573352
2019-07-26 16:50:57 +01:00
olly
a2a1414623 Remove FlacExtractor from nullness blacklist
PiperOrigin-RevId: 256526365
2019-07-26 16:50:39 +01:00
olly
008efd10a4 Make FlacExtractor output methods static
This gives a caller greater confidence that the methods have no
side effects, and remove any nullness issues with these methods
accessing @Nullable member variables.

PiperOrigin-RevId: 256525739
2019-07-26 16:50:32 +01:00
olly
98714235ad Simplify FlacExtractor (step toward enabling nullness checking)
- Inline some unnecessarily split out helper methods
- Clear ExtractorInput from FlacDecoderJni data after usage
- Clean up exception handling for StreamInfo decode failures

PiperOrigin-RevId: 256524955
2019-07-26 16:50:10 +01:00
olly
67ad84f121 Remove more classes from nullness blacklist
PiperOrigin-RevId: 256202135
2019-07-26 16:48:00 +01:00
Oliver Woodman
f045bb2d07 Merge pull request #5617 from loki666:workmanager
PiperOrigin-RevId: 248533906
2019-07-26 16:41:57 +01:00
Oliver Woodman
51acd8150c
Merge pull request #6150 from google/dev-v2-r2.10.3
r2.10.3
2019-07-14 18:01:01 +01:00
olly
1275217bca Add missing file header
PiperOrigin-RevId: 257630168
2019-07-14 16:35:48 +01:00
bachinger
f314be583a fix typo in release notes
PiperOrigin-RevId: 257185017
2019-07-09 16:19:56 +01:00
aquilescanta
1273f18e80 Fix syntax error in publish.gradle
PiperOrigin-RevId: 257184313
2019-07-09 16:19:51 +01:00
olly
fdef76c843 Bump version to 2.10.3
PiperOrigin-RevId: 257161518
2019-07-09 11:58:15 +01:00
olly
be9fea89a6 Fix race condition in DownloadHelper
Sending MESSAGE_PREPARE_SOURCE should happen last in the constructor.
It was previously happening before initialization finished (and in
particular before pendingMediaPeriods was instantiated).

Issue: #6146
PiperOrigin-RevId: 257158275
2019-07-09 11:48:54 +01:00
tonihei
dbabb7c9a3 Apply playback parameters in a consistent way.
Currently, we sometimes apply new playback parameters directly and sometimes
through the list of playbackParameterCheckpoints. Only when using the checkpoints,
we also reset the offset and corresponding position for speedup position
calculation. However, these offsets need to be changed in all cases to prevent
calculation errors during speedup calculation[1].

This change channels all playback parameters changes through the checkpoints to
ensure the offsets get updated accordingly. This fixes an issue introduced in
31911ca54a.

[1] - The speed up is calculated using the ratio of input and output bytes in
SonicAudioProcessor.scaleDurationForSpeedUp. Whenever we set new playback
parameters to the audio processor these two counts are reset. If we don't reset
the offsets too, the scaled timestamp can be a large value compared to the input
and output bytes causing massive inaccuracies (like the +20 seconds in the
linked issue).

Issue:#6117
PiperOrigin-RevId: 256533780
2019-07-09 11:40:39 +01:00
andrewlewis
1d766c4603 Play out remaining data on reconfiguration
Before this change we'd release the audio track and create a new one as soon
as audio processors had drained when reconfiguring.

Fix this behavior by stop()ing the AudioTrack to play out all written data.

Issue: #2446
PiperOrigin-RevId: 244812402
2019-07-09 11:39:36 +01:00
Oliver Woodman
b3495dfe66 Update release notes 2019-07-09 11:36:42 +01:00
Oliver Woodman
6fd235f95a Merge pull request #5732 from ToxicBakery:feature/add-license-to-pom
PiperOrigin-RevId: 257138448
2019-07-09 11:33:31 +01:00
tonihei
d035f24e87 CEA608: Fix repeated Special North American chars.
We currently handle most the control code logic after handling special
characters. This includes filtering out repeated control codes and checking
for the correct channel. As the special character sets are control codes as well,
these checks should happen before parsing the characters.

Issue:#6133
PiperOrigin-RevId: 256993672
2019-07-09 11:33:21 +01:00
tonihei
1538e5d966 CEA608: no-op readability clean-up
PiperOrigin-RevId: 256676196
2019-07-09 11:33:15 +01:00
Oliver Woodman
91728d41de Merge pull request #5908 from sr1990:dev-v2
PiperOrigin-RevId: 256147805
2019-07-09 11:32:28 +01:00
olly
3d5d23778a FLV extractor fixes
1. Only output video starting from a keyframe
2. When calculating the timestamp offset to adjust live streams to start
   at t=0, use the timestamp of the first tag from which a sample is actually
   output, rather than just the first audio/video tag. The test streams in
   the referenced GitHub issue start with a video tag whose packet type is
   AVC_PACKET_TYPE_SEQUENCE_HEADER (i.e. does not contain a sample) and whose
   timestamp is set to 0 (i.e. isn't set). The timestamp is set correctly on
   tags that from which a sample is actually output.

Issue: #6111
PiperOrigin-RevId: 256147747
2019-07-09 11:32:05 +01:00
bachinger
c4c7f4bafa MediaSessionConnector: Document how to provide metadata asynchronously
Issue: #6047
PiperOrigin-RevId: 255992898
2019-07-09 11:31:36 +01:00
tonihei
71e0f2e81c Don't consume touch events if no controller is attached.
Issue:#6109
PiperOrigin-RevId: 255933121
2019-07-09 11:31:24 +01:00
andrewlewis
5365272b60 Use the floor of the frame rate for capability checks
PiperOrigin-RevId: 255584000
2019-07-09 11:31:11 +01:00
bachinger
d3e7ea89d9 call setPlayWhenReady in any case
ISSUE: #6093
PiperOrigin-RevId: 255471282
2019-07-09 11:30:59 +01:00
olly
cdf70edf6e Remove unnecessary FileDescriptor sync
PiperOrigin-RevId: 255380796
2019-07-09 11:30:38 +01:00
olly
d57a8587d2 Add threading model note to hello-word page
Also add layer of indirection between code and the guide, to
make moving content easier going forward.

PiperOrigin-RevId: 255182216
2019-07-09 11:30:22 +01:00
Nam Nguyen Hoai
e3f1332b1e Update TrackSelectionDialog.java
Fix a super tiny typo.
2019-07-09 11:29:59 +01:00
tonihei
18f1b06a68 Fix all FIXME comments.
These are mostly nullability issues.

PiperOrigin-RevId: 253537068
2019-07-09 11:29:45 +01:00
tonihei
feefaacb31 Gracefully handle revoked ACCESS_NETWORK_STATE permission.
This permission has normal access right and can't be revoked by the user.
However, an app can choose to revoke it when using ExoPlayer, e.g. if
no network is required and the app doesn't want to list this permission.

Support this use case by gracefully catching the exception in the relevant
places.

Issue:#6019
PiperOrigin-RevId: 253759332
2019-07-09 11:29:18 +01:00
Oliver Woodman
1c7bb2899c Merge pull request #6055 from xirac:dev-v2
PiperOrigin-RevId: 254182080
2019-07-09 11:27:31 +01:00
tonihei
913dcb3e1d Display last frame when seeking to end of stream.
We currently don't display the last frame because the seek time is behind the
last frame's timestamps and it's thus marked as decodeOnly.

This case can be detected by checking whether all data sent to the codec is
marked as decodeOnly at the time we read the end of stream signal. If so, we
can re-enable the last frame. This should work for almost all cases because the
end-of-stream signal is read in the same feedInputBuffer loop as the last
frame and we therefore haven't released the last frame buffer yet.

Issue:#2568
PiperOrigin-RevId: 251425870
2019-07-09 10:54:31 +01:00
Oliver Woodman
1ab402cf27
Create player-accessed-on-wrong-thread.md 2019-06-26 09:59:55 +01:00
Oliver Woodman
f6297f4f51
Merge pull request #5986 from google/dev-v2-r2.10.2
r2.10.2
2019-06-23 16:15:27 +01:00
Oliver Woodman
b9c8861b3e Disable publishEnabled
Issue: #6016
2019-06-21 19:59:39 +01:00
andrewlewis
4703ce1b26 Fix ad pod index offset calculation without preroll
Issue: #5928
PiperOrigin-RevId: 254379085
2019-06-21 18:38:45 +01:00
olly
fbf58425b2 Release notes language tweaks
PiperOrigin-RevId: 254156143
2019-06-21 18:37:57 +01:00
Andrew Lewis
6799097930
Fix decoder fallback for E-AC3 JOC to E-AC3
Issue: #6073
2019-06-21 11:50:12 +01:00
Oliver Woodman
c8955ed5ff Fix build 2019-06-19 18:59:31 +01:00
bachinger
66e1211350 allow multiple style rules in a STYLE block of a webvtt file
PiperOrigin-RevId: 253959976
2019-06-19 18:54:41 +01:00
bachinger
5d544974e9 keep notification when stop(false) is called
ISSUE: #6041
PiperOrigin-RevId: 253958225
2019-06-19 18:53:43 +01:00
olly
0f514a093b Update release notes for 2.10.2 cherrypicks
PiperOrigin-RevId: 253808562
2019-06-19 18:53:36 +01:00
tonihei
8286e1d725 Prevent negative renderer timestamps when seeking back.
We are currently queuing periods in a way such that the new start position
lines up with the end of the previous period (to ensure continuous playback).
However, if the start position of the new period is larger than the total of
all previously played period durations, we may end up with negative renderer
timestamps when seeking back to the beginning of this new period. Negative
timestamps should be avoided as most decoders have problems handling them
correctly.

This change forces a renderer reset if we detect such a seek to a negative
renderer time and also resets the renderer offset to 0 every time all
renderers are disabled, as this is the only time where we can savely change
the offset of an existing media period.

Also, if playback starts with an ad, we choose the content position as
renderer offset to prevent the whole issue from occurring for the seek-behind-
midroll case.

Issue:#6009
Issue:#5323
PiperOrigin-RevId: 253790054
2019-06-19 18:52:56 +01:00
olly
def01f68b9 Let AudioTrack write headers on SDK_INT >= 26
Issue: #6031
PiperOrigin-RevId: 253784986
2019-06-19 18:52:20 +01:00
aquilescanta
d072a5261e Fix application of maxAudioBitrate for adaptive audio track groups
Issue:#6006
PiperOrigin-RevId: 253781533
2019-06-19 18:52:13 +01:00
tonihei
9da2c3305b Prevent negative total buffered duration at the point where it is calculated.
In some edge cases the renderer position may be slightly ahead of the
buffered position and the total buffered duration is thus negative. We already
filter that in ExoPlayerImpl for the publicly accessible value. However, we
forward the unfiltered value to other components like the LoadControl, which
may be confusing.

Issue:#6015
PiperOrigin-RevId: 253780460
2019-06-19 18:51:38 +01:00
aquilescanta
a090f7ecca Remove unused variable
PiperOrigin-RevId: 253762488
2019-06-19 18:51:33 +01:00
tonihei
e1ff3d028f Gracefully handle revoked ACCESS_NETWORK_STATE permission.
This permission has normal access right and can't be revoked by the user.
However, an app can choose to revoke it when using ExoPlayer, e.g. if
no network is required and the app doesn't want to list this permission.

Support this use case by gracefully catching the exception in the relevant
places.

Issue:#6019
PiperOrigin-RevId: 253759332
2019-06-19 18:51:25 +01:00
bachinger
76b9175072 Add bug report section to question and content_not_playing issue templates.
PiperOrigin-RevId: 253593267
2019-06-19 18:50:41 +01:00
Toni
7f435b4787 Merge pull request #6036 from angelrc96:dev-v2
PiperOrigin-RevId: 253228214
2019-06-19 18:50:33 +01:00
arodriguez
692f4152d5 Support for UDP data source 2019-06-19 18:49:41 +01:00