216 Commits

Author SHA1 Message Date
aquilescanta
5c3c803460 Remove DRM management from Renderers
PiperOrigin-RevId: 295569075
2020-02-17 17:40:30 +00:00
kimvde
f5025bfce4 Share seek tests between FLAC extractors
PiperOrigin-RevId: 294893303
2020-02-13 15:46:05 +00:00
kimvde
bdfd24290f Share FLAC extractor tests between both extractors
PiperOrigin-RevId: 294614958
2020-02-13 15:44:29 +00:00
olly
1cbe3f72e6 DataSpec: Deprecate most constructors
Keeping (Uri) and (Uri, position, length) to avoid needing
Builder for the trivial case.

PiperOrigin-RevId: 294530226
2020-02-13 15:43:54 +00:00
kimvde
79a3bad4c3 Move assets from FLAC extension to testdata
PiperOrigin-RevId: 293553412
2020-02-11 17:09:08 +00:00
kimvde
a9507a0064 Make FakeExtractorOutput dump additional seek points
PiperOrigin-RevId: 293337032
2020-02-11 17:08:00 +00:00
kimvde
792d9b39e0 Flac extension: disable BinarySearchSeeker if totalSamples is unknown
The ceilingTimePosition is based on the total number of samples. Binary
search seeking is not possible if this value is unknown.

PiperOrigin-RevId: 292921177
2020-02-11 17:07:26 +00:00
bachinger
4bb6036cf6 add playback state changed listener
This change deprecates Player.onPlayerStateChanged(boolean pwr, int state). It removes deprecation for trivial cases. I'll remove other deprecated usages (mostly in ui module) in follow-up CLs to not bloat this CL.

PiperOrigin-RevId: 292917872
2020-02-11 17:07:03 +00:00
kimvde
1a0afacfe1 FLAC extension: remove sample rate check
This check is not needed because the FLAC specification does not
restrict the sample rate value and because the extension reads files
with other sample rates properly.

PiperOrigin-RevId: 292909391
2020-02-11 17:06:32 +00:00
andrewlewis
7b63afb212 Move FlacSteamMetadata to extractor package
It could either live in .util or .extractor, but since it's not needed
outside the extractor package in core (and the FLAC extension), and
FlacStreamMetadataTest uses a FLAC asset, it seems preferable to move it
into the extractor package.

PiperOrigin-RevId: 291372032
2020-01-24 18:15:11 +00:00
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
kimvde
35fbb7f7ca Add comment explaining FlacBinarySearchSeeker output
PiperOrigin-RevId: 288464154
2020-01-08 15:57:14 +00:00
andrewlewis
a0044257b4 Add troubleshooting instructions for decoding extensions
PiperOrigin-RevId: 286585978
2019-12-20 16:59:07 +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
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
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
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
kimvde
23b54a95d2 Allow no output frame holder BinarySearchSeeker
PiperOrigin-RevId: 283544187
2019-12-04 09:59:57 +00:00
olly
3065d51310 Provide instructions for building extensions using Windows PowerShell
PiperOrigin-RevId: 283296427
2019-12-04 09:58:13 +00:00
kimvde
b18650fdcf Expose metadata in FLAC extractor
PiperOrigin-RevId: 281538423
2019-11-22 15:09:17 +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
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
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
olly
47423b3100 Fix code triggering [-Werror, -Wreorder].
Otherwise, it will be a build error once we turn on the error.
Sponge: https://sponge.corp.google.com/target?id=8e88bd90-a716-40f7-9599-b70e9193b297&target=//third_party/java_src/android_libs/exoplayer/v2/extensions/flac/src/main:binary.
PiperOrigin-RevId: 276461029
2019-10-30 08:49:17 +00:00
Oliver Woodman
6e65a71806 Merge pull request #6379 from wingyippp:flac-seek-map-two-points
PiperOrigin-RevId: 272856747
2019-10-04 13:32:59 +01:00
olly
8453d07f54 Remove unnecessary DeleteLocalRef usage
Keeping the ones inside loops, because theoretically they
can be useful there (in practice, for this use case, it's
highly unlikely to make any difference).

PiperOrigin-RevId: 272834073
2019-10-04 13:32:42 +01:00
wingyippp
8ce8e351e1 new int64_t[4] after check mSeekTable supported 2019-10-03 14:40:39 +08:00
wingyippp
03ba1c9a2f return null if Seek Table is not supported. proguard in flac-extension 2019-10-03 13:50:17 +08:00
wingyippp
070aab7225 return SeekPoints directly for flacGetSeekPoints JNI method. update the proguard-rules.txt 2019-09-10 20:19:51 +08:00
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
wingyippp
d9529479fa get 2 SeekPoints from the getSeekPosition() in flac_parser 2019-09-04 00:32:16 +08:00
olly
d720d2c3f6 Simplify androidTest manifests & fix links to use https
PiperOrigin-RevId: 266396506
2019-09-01 22:02:17 +01:00
tonihei
cd4571161a Add builders for SimpleExoPlayer and ExoPlayer.
The current ExoPlayerFactory is growing too big and usage becomes increasingly
complicated because it's not possible to set individual components without
specifying many other defaults.

Adding new builder classes makes building easier and more future-proof.

PiperOrigin-RevId: 263339078
2019-08-15 14:41:51 +01:00
tonihei
0e33123938 Turn on non-null-by-default for some core library packages.
And add missing some missing annotations to the publicly visible API of these
packages.

PiperOrigin-RevId: 263134804
2019-08-15 14:41:51 +01:00
tonihei
389eca6e07 Merge robolectric_testutils into testutils.
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.

PiperOrigin-RevId: 262363201
2019-08-09 18:36:32 +01:00
tonihei
a9b93d7ec2 Fix some remaining extension API nullability issues.
PiperOrigin-RevId: 261910303
2019-08-06 15:54:08 +01:00
tonihei
346f8e670a Turn on non-null-by-default for most extensions.
PiperOrigin-RevId: 261700729
2019-08-05 20:27:43 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
Oliver Woodman
b57aa34b66 Merge pull request #6239 from ittiam-systems:vorbis-picture-parse
PiperOrigin-RevId: 261087432
2019-08-01 20:37:21 +01:00