964 Commits

Author SHA1 Message Date
olly
a225e887fa Move @MonotonicNonNull annotations to their correct positions
PiperOrigin-RevId: 289823804
2020-01-16 13:51:09 +00:00
olly
ccce9948a9 Align media2 extension tests with other tests
PiperOrigin-RevId: 289494365
2020-01-16 13:50:36 +00:00
olly
d24188f663 Add tests to validate FLAC decoder output
PiperOrigin-RevId: 289091494
2020-01-10 15:57:23 +00:00
olly
1a9b301f52 Fix extension FLAC decoder to correctly handle non-16-bit depths
PiperOrigin-RevId: 288860159
2020-01-10 15:55:49 +00:00
kimvde
ee091e6a45 Use FlacLibrary.isAvailable in FlacExtractor selection
PiperOrigin-RevId: 288667790
2020-01-08 15:58:12 +00:00
olly
70fe6b4590 Upgrade OkHttp library to fix HTTP2 issue
Issue: #4078
PiperOrigin-RevId: 288651166
2020-01-08 15:58:04 +00:00
kimvde
35fbb7f7ca Add comment explaining FlacBinarySearchSeeker output
PiperOrigin-RevId: 288464154
2020-01-08 15:57:14 +00:00
olly
f1f0ff3a65 Use MIME types rather than PCM encodings for ALAW and MLAW
PiperOrigin-RevId: 287999703
2020-01-06 14:55:01 +00:00
andrewlewis
fefb1a17a0 Fix typos
PiperOrigin-RevId: 287810018
2020-01-02 19:23:42 +00:00
andrewlewis
a0044257b4 Add troubleshooting instructions for decoding extensions
PiperOrigin-RevId: 286585978
2019-12-20 16:59:07 +00:00
bachinger
36fa9d5a43 add top-level playlist API
Design doc: https://docs.google.com/document/d/11h0S91KI5TB3NNZUtsCzg0S7r6nyTnF_tDZZAtmY93g/edit

Issue: #6161, #5155
PiperOrigin-RevId: 286020313
2019-12-18 18:52:51 +00:00
tonihei
021291b38f Add server-client time offset to Window.
This offset allows to improve the calculated live offset because it
can take known client-server time offsets into account.

PiperOrigin-RevId: 285970738
2019-12-18 18:52:11 +00:00
olly
8bafd6ff7d Fix FLAC seeking when the last seek point is a placeholder
PiperOrigin-RevId: 285449865
2019-12-18 18:49:48 +00:00
andrewlewis
4c72ab94b0 Inline ENABLE_PRELOADING
ImaAdsLoader relies on preloading being enabled (it doesn't
work without it) so we may as well remove the constant to
avoid potential confusion.

PiperOrigin-RevId: 284951356
2019-12-11 13:45:59 +00:00
kimvde
a95c28a929 Implement binary search seeking for FLAC extractor
PiperOrigin-RevId: 284814594
2019-12-11 13:45:43 +00:00
ibaker
9ec524a7e2 Rollback of 355ed11a3c
*** Original commit ***

Suppress warnings emitted by Checker Framework version 2.11.1

More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:278915274:BASE:278884711:1573074344615:a6701677

***

PiperOrigin-RevId: 284741721
2019-12-10 12:37:42 +00:00
ibaker
4c4cabdfac (partial) Rollback of 880b879e8c
*** Original commit ***

Suppress warnings emitted by Checker Framework version 2.11.1

More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP train for global presubmit queue
    http://test/OCL:278152710:BASE:278144052:1572760370662:22459c12

***

PiperOrigin-RevId: 284738438
2019-12-10 12:37:26 +00:00
kimvde
d0508b2bde Make metadata field nullable in FlacStreamMetadata
This makes the format metadata null (instead of an empty Metadata
object) when it is not provided, and is therefore consistent with the
other extractors behavior.

PiperOrigin-RevId: 284171148
2019-12-06 19:21:16 +00:00
bachinger
f25bcedf72 Playlist API: submit ahead some files of the playlist API CL
PiperOrigin-RevId: 283988536
2019-12-06 19:20:13 +00:00
andrewlewis
cbdf45aa5f Verify metadata in extractor tests
PiperOrigin-RevId: 283960017
2019-12-06 19:19:50 +00:00
olly
cb873dd1ee Use play and pause convenience methods
PiperOrigin-RevId: 283949259
2019-12-06 19:19:18 +00:00
tonihei
72d5b425d3 Add IntDefs for renderer capabilities.
This simplifies documentation and adds compiler checks that the correct values
are used.

PiperOrigin-RevId: 283754163
2019-12-05 10:20:15 +00:00
bachinger
6c10c94f94 MediaSessionConnector: Support ACTION_SET_CAPTIONING_ENABLED
PiperOrigin-RevId: 283546707
2019-12-04 10:00:04 +00:00
kimvde
23b54a95d2 Allow no output frame holder BinarySearchSeeker
PiperOrigin-RevId: 283544187
2019-12-04 09:59:57 +00:00
tonihei
65c4a58825 Use Util method to create Handler instead of using deprecated method.
Calls to new Handler() without arguments are deprecated as of the latest Android
version. Replace them by a Util.createHandler call similar to the ones we
already have.

PiperOrigin-RevId: 283532891
2019-12-04 09:59:44 +00:00
andrewlewis
9b28e53238 Remove row VP9 multi-threading option
PiperOrigin-RevId: 283319944
2019-12-04 09:58:40 +00:00
olly
f14f0ce8ee Remove LibvpxVideoRenderer from nullness blacklist
PiperOrigin-RevId: 283310946
2019-12-04 09:58:33 +00:00
olly
3065d51310 Provide instructions for building extensions using Windows PowerShell
PiperOrigin-RevId: 283296427
2019-12-04 09:58:13 +00:00
andrewlewis
a0736cfbf5 Remove AdsManager listeners on release
Issue: #6687
PiperOrigin-RevId: 283023548
2019-12-04 09:58:07 +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
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
andrewlewis
731b002e13 Add AV1 to supported formats
PiperOrigin-RevId: 281724630
2019-11-22 15:09:39 +00:00
kimvde
b18650fdcf Expose metadata in FLAC extractor
PiperOrigin-RevId: 281538423
2019-11-22 15:09:17 +00:00
aquilescanta
699dd3d27c Deprecate public renderer constructors that take a DrmSessionManager
PiperOrigin-RevId: 281086336
2019-11-18 17:55:43 +00:00
kimvde
9b2917a9ae Add Java FLAC extractor
Seeking, live streams support and exposure of vorbis and ID3 data
are not part of this commit.

Issue: #6406
PiperOrigin-RevId: 281083332
2019-11-18 17:55:28 +00:00
andrewlewis
3b26ecf6fe Remove option to disable loop filter for VP9
PiperOrigin-RevId: 281039634
2019-11-18 17:54:24 +00:00
bachinger
734b4ad9c8 document media button handling prior to API level 21
ISSUE: #6545
PiperOrigin-RevId: 281032120
2019-11-18 17:54:07 +00:00
olly
6df92fdd3f Update VP9 extension README to ref NDK r20
PiperOrigin-RevId: 279899984
2019-11-15 05:14:19 +00:00
aquilescanta
53283ecb52 Add CastPlayer tests for repeatMode masking
PiperOrigin-RevId: 279091742
2019-11-15 05:12:42 +00:00
kimvde
d1da3d925b Fix FLAC bit rate computation
PiperOrigin-RevId: 279088193
2019-11-15 05:12:34 +00:00
kimvde
a226bd0d69 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-15 05:12:25 +00:00
olly
355ed11a3c Suppress warnings emitted by Checker Framework version 2.11.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP --sample ran all affected tests and none failed
    http://test/OCL:278915274:BASE:278884711:1573074344615:a6701677
PiperOrigin-RevId: 279080514
2019-11-15 05:12:17 +00:00
kimvde
29d110b7eb Fix FLAC extension tests
- Add @Test annotations.
- Fix seeking to ignore potential placeholders
  (see https://xiph.org/flac/format.html#metadata_block_seektable).

PiperOrigin-RevId: 279074092
2019-11-15 05:12:09 +00:00
kimvde
c8170e18d0 Update AndroidX Test versions to latest
Split the version of the sublibraries because their latest version
number is different. See
https://developer.android.com/jetpack/androidx/releases/test#1.2.0.

PiperOrigin-RevId: 278585090
2019-11-05 16:18:38 +00:00
olly
46d58b5eda Add missing IntDef case in switch
PiperOrigin-RevId: 278332276
2019-11-05 16:17:54 +00:00
olly
880b879e8c Suppress warnings emitted by Checker Framework version 2.11.1
More information:
https://docs.google.com/document/d/16tpK6aXqN68PvTyvt4siM-m7f0NXi_8xEeitLDzr8xY/edit?usp=sharing

Tested:
    TAP train for global presubmit queue
    http://test/OCL:278152710:BASE:278144052:1572760370662:22459c12
PiperOrigin-RevId: 278241536
2019-11-05 16:17:39 +00:00
olly
c5c50078d7 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 16:16:45 +00:00
andrewlewis
a4e7274cca Update audio extension build configurations
- Fix FLAC extension build (currently broken due to use of std::array,
  but fixed by migrating to NDK r20).
- Move opus and ffmpeg extensions to NDK r20. For ffmpeg, upgrade to
  release 4.2 which requires using libswresample and updates to the
  build script.

Issue: #6601
PiperOrigin-RevId: 277924119
2019-11-05 16:16:38 +00:00
andrewlewis
656556b828 Clean up naming for GLSurfaceViews
PiperOrigin-RevId: 277896757
2019-11-05 16:15:29 +00:00