6659 Commits

Author SHA1 Message Date
aquilescanta
54abdfc85b Fix syntax error in publish.gradle
PiperOrigin-RevId: 257184313
2019-07-09 16:15:33 +01:00
olly
65d9c11027 Bump version to 2.10.3
PiperOrigin-RevId: 257161518
2019-07-09 11:54:39 +01:00
olly
b3d258b6cf 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:41:54 +01:00
tonihei
92fb654ab6 Update Robolectric to stable version 4.3.
We currently use an alpha version which allowed us to access new threading
features. The stable version of this has been released now and we can
switch back.

PiperOrigin-RevId: 257149681
2019-07-09 11:41:33 +01:00
Oliver Woodman
3ac8b6acee Merge pull request #5732 from ToxicBakery:feature/add-license-to-pom
PiperOrigin-RevId: 257138448
2019-07-09 08:50:01 +01:00
tonihei
e3af045adb 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-08 19:42:09 +01:00
olly
ecd88c71d2 Remove some UI classes from nullness blacklist
PiperOrigin-RevId: 256751627
2019-07-08 19:41:47 +01:00
olly
e852ff1dfa Add Nullable annotations to CastPlayer
PiperOrigin-RevId: 256680382
2019-07-05 17:33:47 +01:00
tonihei
d66f0c51a4 CEA608: no-op readability clean-up
PiperOrigin-RevId: 256676196
2019-07-05 17:33:30 +01:00
olly
fbb76243bd Clean up DRM post requests
- Explicitly specify HTTP_METHOD_POST (previously this was
  implicit as a result of the body data being non-null)
- Use null when there's no body data (it's converted to
  null inside of the DataSpec constructor anyway)

PiperOrigin-RevId: 256573384
2019-07-05 17:33:13 +01:00
olly
924cfac966 Remove more low hanging fruit from nullness blacklist
PiperOrigin-RevId: 256573352
2019-07-05 17:32:55 +01:00
andrewlewis
b1790f9dcc Fix IMA test build issue
PiperOrigin-RevId: 256545951
2019-07-05 17:32:38 +01:00
tonihei
81e7b31be1 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-05 17:32:21 +01:00
olly
0f364dfffc Remove FlacExtractor from nullness blacklist
PiperOrigin-RevId: 256526365
2019-07-05 17:32:03 +01:00
olly
948d69b774 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-05 17:31:46 +01:00
olly
1060c767fc 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-05 17:31:28 +01:00
tonihei
0145edb60d Move MediaSource masking code into separate class.
The masking logic for unprepared MediaSources is currently part of
ConcatanatingMediaSource. Moving it to its own class nicely separates the
code responsibilities and allows reuse.

PiperOrigin-RevId: 256360904
2019-07-05 17:31:11 +01:00
tonihei
d8c29e8211 Remove unnecessary warning suppression.
PiperOrigin-RevId: 256320563
2019-07-05 17:30:54 +01:00
olly
4c2f211e28 Remove Flac and Opus renderers from nullness blacklist
PiperOrigin-RevId: 256213895
2019-07-05 17:30:36 +01:00
olly
7964e51e0e Remove more classes from nullness blacklist
PiperOrigin-RevId: 256202135
2019-07-05 17:30:19 +01:00
aquilescanta
7408b4355a Add DRM format support checks for MediaSource provided DRM
PiperOrigin-RevId: 256161522
2019-07-02 17:50:06 +01:00
Oliver Woodman
16bf7f9106 Merge pull request #5908 from sr1990:dev-v2
PiperOrigin-RevId: 256147805
2019-07-02 17:49:45 +01:00
olly
6febc88dce 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-02 17:49:24 +01:00
Oliver Woodman
47bc70d480 Merge pull request #6119 from eneim:patch-1
PiperOrigin-RevId: 256147742
2019-07-02 17:49:05 +01:00
bachinger
259bea1652 MediaSessionConnector: Document how to provide metadata asynchronously
Issue: #6047
PiperOrigin-RevId: 255992898
2019-07-02 17:48:41 +01:00
olly
7798c07f64 Remove ExoCast
PiperOrigin-RevId: 255964199
2019-07-02 17:48:22 +01:00
tonihei
04959ec648 Remove unnecessary variables from ConcatenatingMediaSource.
The total window and period count, as well as the period offset for each holder
are not actually needed and can be removed.

Also added a TODO to remove two other variables if possible.

PiperOrigin-RevId: 255945584
2019-07-02 17:48:04 +01:00
tonihei
71de1d37ac Don't consume touch events if no controller is attached.
Issue:#6109
PiperOrigin-RevId: 255933121
2019-07-02 17:47:45 +01:00
andrewlewis
6fe70ca43d Use the floor of the frame rate for capability checks
PiperOrigin-RevId: 255584000
2019-07-02 17:47:26 +01:00
bachinger
ae0aeb046b call setPlayWhenReady in any case
ISSUE: #6093
PiperOrigin-RevId: 255471282
2019-07-02 17:47:07 +01:00
andrewlewis
244c202c56 Fix hidden API warnings from Metalava
PiperOrigin-RevId: 255442455
2019-07-02 17:46:49 +01:00
tonihei
2a765f6b5a Visibility clean-up: Don't extend visibility of protected methods in overrides.
PiperOrigin-RevId: 255412493
2019-07-02 17:46:30 +01:00
tonihei
1bd73eb70e Cleanup: Remove DynamicConcatenatingMediaSource
PiperOrigin-RevId: 255410268
2019-07-02 17:46:10 +01:00
olly
cf68d4eb47 Cleanup: Remove deprecated text and metadata output interfaces
PiperOrigin-RevId: 255380951
2019-07-02 17:45:51 +01:00
olly
1d36edc214 Remove unnecessary FileDescriptor sync
PiperOrigin-RevId: 255380796
2019-07-02 17:45:32 +01:00
olly
2a366e76b7 Cleanup: Remove deprecated message sending functionality
PiperOrigin-RevId: 255379393
2019-07-02 17:45:13 +01:00
olly
c974f74b1f Cleanup: Remove deprecated DataSpec.postBody
PiperOrigin-RevId: 255378274
2019-07-02 17:44:55 +01:00
olly
3c2afb16e6 Cleanup: Remove deprecated ChunkSampleStream constructor
PiperOrigin-RevId: 255377347
2019-07-02 17:44:36 +01:00
tonihei
8faac0344b Fix checkerframework 2.8.2 warnings.
The updated version issues more warnings than before.
Most of the changes are related to annotation placement.

PiperOrigin-RevId: 255371743
2019-07-02 17:44:17 +01:00
olly
40d44c48e5 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-02 17:43:58 +01:00
tonihei
4e504bc485 Rename DeferredMediaPeriod to MaskingMediaPeriod.
This better reflects its usage and fits into our general naming pattern.

PiperOrigin-RevId: 255157159
2019-07-02 17:43:38 +01:00
olly
883b3c8783 Update isMediaCodecException to return true for generic ISE on API 21+ if the
stack trace contains MediaCodec.

PiperOrigin-RevId: 254781909
2019-07-02 17:43:19 +01:00
aquilescanta
0ddd3c2bd0 Implement DecryptableSampleQueueReader.isReady
PiperOrigin-RevId: 254746146
2019-07-02 17:43:00 +01:00
Nam Nguyen Hoai
a5fd774647
Update TrackSelectionDialog.java
Fix a super tiny typo.
2019-07-02 18:04:08 +09:00
sr1990
ec6604b4f7 [Patch V4] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-26 20:29:37 -07:00
sr1990
5f6a7fc7f1 [Patch V3] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-22 18:56:06 -07:00
andrewlewis
9905432546 Fix ad pod index offset calculation without preroll
Issue: #5928
PiperOrigin-RevId: 254379085
2019-06-21 18:23:57 +01:00
aquilescanta
88f1dfcbc1 Add generic DrmSessionManager.getDummyDrmSessionManager
PiperOrigin-RevId: 254372134
2019-06-21 18:23:39 +01:00
aquilescanta
04aaf25aa2 Add DecryptableSampleQueueReader
Reads from a SampleQueue, associating each read format with a
DrmSession, if needed.

PiperOrigin-RevId: 254192562
2019-06-21 18:23:20 +01:00
aquilescanta
acad64cae8 Rename FormatHolder.decryptionResourceIsProvided to FormatHolder.includesDrmSession
PiperOrigin-RevId: 254187403
2019-06-21 18:23:01 +01:00