231 Commits

Author SHA1 Message Date
olly
eeec2b2e77 Final README updates
PiperOrigin-RevId: 402547071
2021-10-12 19:52:39 +01:00
olly
e4a5c07b5f Mechanical README cleanups 2
PiperOrigin-RevId: 401777730
2021-10-09 18:18:12 +01:00
olly
e7c6ed5e7f Mechanical README cleanups
PiperOrigin-RevId: 401767060
2021-10-09 18:14:36 +01:00
ibaker
e4221c3844 Rollback of ed23b2905b
*** Original commit ***

Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()

An upcoming change will update build() to return Player.

PiperOrigin-RevId: 401468532
2021-10-07 21:53:57 +01:00
ibaker
ed23b2905b Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.

PiperOrigin-RevId: 399382297
2021-09-28 16:38:20 +01:00
ibaker
ad99a44083 Add empty sdk-version node to all AndroidManifest.xml files
PiperOrigin-RevId: 397772916
2021-09-21 14:17:33 +01:00
olly
85142be9a4 DRM refactor / cleanup
PiperOrigin-RevId: 391403236
2021-08-19 10:42:56 +01:00
olly
b689fbd44e Rename DecryptionException to CryptoException
PiperOrigin-RevId: 391272611
2021-08-17 15:49:54 +01:00
olly
a83fe511b5 Move DecryptionException into decoder package
PiperOrigin-RevId: 390582804
2021-08-17 15:30:20 +01:00
kimvde
01613a2e55 Remove usages of deprecated SimpleExoPlayer.Builder
PiperOrigin-RevId: 390130681
2021-08-11 17:34:19 +01:00
olly
7e8ba03147 Deprecate final non-nested Factory classes in upstream
PiperOrigin-RevId: 389661768
2021-08-09 20:07:24 +01:00
ibaker
0df0df9aee Remove @DoNotInstrument from test classes
This isn't needed now we've updated to Robolectric 4.6

PiperOrigin-RevId: 383109343
2021-07-09 08:58:38 +01:00
aquilescanta
fc1d3dd192 Make onPlayerError take a PlaybackException
PiperOrigin-RevId: 380174672
2021-06-21 22:15:01 +01:00
olly
0de6bc861a Format *_jni.cc files
PiperOrigin-RevId: 374830877
2021-05-20 15:40:34 +01:00
bachinger
4c1a294b2e Format Java source files
PiperOrigin-RevId: 372127633
2021-05-06 13:32:25 +01:00
krocard
3dc6cf6bec Deprecate EventListener in favor of Listener
#minor-release

PiperOrigin-RevId: 371348520
2021-04-30 18:56:35 +01:00
bachinger
096395f0c7 Add @DoNotInstrument to Opus extension test
PiperOrigin-RevId: 370740311
2021-04-27 21:43:11 +01:00
ibaker
dafea4e40f Re-format some javadoc
PiperOrigin-RevId: 369642047
2021-04-21 18:46:00 +01:00
andrewlewis
517e590967 Move docs to correct folder for GitHub Pages 2021-04-21 11:00:57 +01:00
andrewlewis
a8cf54e9d0 Move extensions/opus to libraries/decoder_opus
See go/media-apis-codebase-google3.

PiperOrigin-RevId: 369603286
2021-04-21 09:50:20 +01:00
olly
f5a4f3e609 Switch tests to use SimpleExoPlayer
PiperOrigin-RevId: 366033200
2021-04-01 16:05:35 +01:00
kimvde
718c1e773e Update extensions NDK version to latest LTS version
Latest LTS version is better than latest stable version because it will
be supported for longer.

#minor-release
Issue:#8581
PiperOrigin-RevId: 359467482
2021-02-25 09:18:58 +00:00
kimvde
926884d2f2 Upgrade extensions NDK version
#minor-release
Issue:#8581
PiperOrigin-RevId: 357563419
2021-02-19 10:56:02 +00:00
andrewlewis
d2950c2e97 Update opus repository location
The new URL is referenced from https://xiph.org/downloads/. The old
URL currently times out.

#minor-release

PiperOrigin-RevId: 351991077
2021-01-17 21:50:55 +00:00
andrewlewis
48dd20ce3a Follow symlinks in opus build
This is not necessary when following the README.md but it is required if
libopus is under a symlink (and won't do any harm if it's not symlinked).

PiperOrigin-RevId: 351985185
2021-01-17 21:50:46 +00:00
krocard
538445572d Move FormatSupport in common
#player-to-common

PiperOrigin-RevId: 344558028
2020-11-30 09:33:11 +00:00
tonihei
87cd644d00 Add remaining proguard config tests.
This ensures we have full test coverage for proguard configs now.
The only configs not covered by tests are:
 - IMA and OkHttp which copy recommended configs from the respective
   library. I couldn't reproduce failures by removing them (and thus
   couldn't write a test that ensures they are correct).
 - Some dontwarn lines that just suppress warnings.

In addition, this change fixes a couple of related issues:
 - Moved AV1 proguard config to correct module.
 - Removed mentioning of deprecated ExtractorMediaSource from README
 - Suppressed warning from IMA code that prevent proguarding under
   strict rules
 - Fixed wrong proguard exclusion in VP9 module.
 - Moved FLAC exclusion (DefaultExtractorsFactory) to correct module.
 - Added AlertDialog suppression for de-jetified code.
 - Removed unusued dependency from UI module that causes large APK
   size increase.

#exofixit
#minor-release

PiperOrigin-RevId: 344427532
2020-11-27 11:08:34 +00:00
tonihei
f13ffb4390 Rollback of 5d9c2d7b6a
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

***

PiperOrigin-RevId: 343086403
2020-11-18 18:40:30 +00:00
olly
3c91ba14b3 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 343003559
2020-11-18 18:40:17 +00:00
olly
b2b08ade99 Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:41:51 +01:00
olly
3110587fbe Fix extension renderer test names + add FfmpegVideo case
PiperOrigin-RevId: 330409635
2020-09-09 09:41:32 +01:00
ibaker
f0ae8afd80 Separate the dump files from the test assets
This allows us to more easily create different dumps derived from the
same assets.

This moves media/source files from `assets/` to `assets/media/` and
dump files from `assets/` to `assets/extractordumps/` and
`assets/audiosinkdumps/` as appropriate. I intend to add
`assets/playbackdumps/` in a future CL.

PiperOrigin-RevId: 326986283
2020-08-17 16:13:53 +01:00
olly
5de56cd618 Opus: Add utility for handling header and initialization data
PiperOrigin-RevId: 325202386
2020-08-07 19:02:14 +01:00
olly
4d03d30890 Audio extension decoders: Pass decoder to getOutputFormat
It seems generally useful to have access to the decoder in
getOutputFormat. We're currently working around lack of access
by using member variables in the concrete audio extension
renderers. In the case of the Ffmpeg extension, holding a
reference to the decoder is preventing it from being garbage
collected when the decoder is released by the base class.

PiperOrigin-RevId: 324799670
2020-08-07 19:00:18 +01:00
claincly
ea01489c8b Added float output mode for Opus extension
The working of libOpus is different from ffmpeg. With ffmpeg, the decoder can
be configured to output floating point PCM. While in libOpus, floating samples
are acquired by calling a different function. This is the reason the new JNI
functions and the logic in OpusDecoder/LibopusAudioRenderer is added to
support float output.

PiperOrigin-RevId: 324661603
2020-08-07 18:59:50 +01:00
aquilescanta
684994fe61 Remove Renderer references to Format.drmInitData
PiperOrigin-RevId: 323392470
2020-07-28 00:00:27 +01:00
olly
363a2a3b45 DefaultRenderersFactory: Add setting to enable float output
This also renders https://github.com/google/ExoPlayer/pull/7625 redundant.

PiperOrigin-RevId: 321544195
2020-07-24 10:37:05 +01:00
ibaker
f83d478cc3 Migrate uses of prepare(MediaSource) to setMediaSource() & prepare()
PiperOrigin-RevId: 321147910
2020-07-24 10:31:57 +01:00
ibaker
e9a8335381 Migrate callers to pass MediaItem to createMediaSource()
createMediaSource(Uri) is deprecated.

PiperOrigin-RevId: 321121383
2020-07-24 10:31:22 +01:00
olly
e8596428c0 Pass correct formats to AudioSink
The renderers are currently constructing formats that consist of their
input format with added PCM encoding. Such formats are not self-consistent,
and this only works because DefaultAudioSink ignores the rest of the
format if the format has a PCM encoding. It would not work if the sink
implementation checked the MIME type, for example, which wouldn't be a
strange or incorrect thing for it to do.

The more correct approach is to construct a new format that properly
represents the PCM that will be provided to the sink.

This change also renames supportsOutput to supportsFormat, because
AudioSink itself has both an input and an output side, and this method
is actually evaluating support on the input side of the sink.

PiperOrigin-RevId: 320396089
2020-07-10 09:09:02 +01:00
tonihei
e4e743a35f Fix remaining common module nullness issues.
PiperOrigin-RevId: 319183621
2020-07-03 09:01:20 +01:00
krocard
78825a41dc Store encodings in Format instead of just pcm encodings
Previously only pcm encoding were stored in Format,
this was an issue as for audio passthrough and offload
lots of code needs to pass complex format informations
(encoding, sample rate, channel count, gapless metadata)
but could not use Format and each function was taking
each as different parameter.

By allowing Format to contain any encoding, and not only
pcmEncoding, it allows to pass a Format everywhere in ExoPlayer
code that needs a Format.

This patch does not have any functional change. It is only an internal refactor.

PiperOrigin-RevId: 318789444
2020-06-29 13:33:09 +01:00
krocard
1c018e71d4 Propagate format in supportsOutput
*** Reason for rollforward ***

Fixed dependent cl was rolled forward

*** Original change description ***

Rollback of 2aac0717d7

*** Original commit ***

Propagate format in supportsOutput

It is needed to know if gapless is needed,
as gapless offload might not be supported.

***

***

PiperOrigin-RevId: 318429321
2020-06-26 11:23:19 +01:00
tonihei
4138e28d62 Move common gradle setup to a setting file.
This removes a lot of duplication from the module configuration,
avoids divergence, and makes sure that only the important differences
to the default are visible in each module file.

PiperOrigin-RevId: 318024823
2020-06-26 11:13:25 +01:00
andrewlewis
fc0e0d4cb8 Rollback of 2aac0717d7
*** Original commit ***

Propagate format in supportsOutput

It is needed to know if gapless is needed,
as gapless offload might not be supported.

***

PiperOrigin-RevId: 315947888
2020-06-12 00:26:26 +01:00
krocard
2aac0717d7 Propagate format in supportsOutput
It is needed to know if gapless is needed,
as gapless offload might not be supported.

PiperOrigin-RevId: 315877127
2020-06-12 00:25:33 +01:00
krocard
151ea531b1 Make constants more readable with _ separator
Add an `_` in long constants.
Eg: 10000 => 10_000.

I'm proposing this change because I have had multiple
missread due to confusing the number of 0 in a long number.

More specifically, added an underscore to all number matching:
`final.*\ [0-9]{2,}000;`

PiperOrigin-RevId: 313186920
2020-05-27 19:00:36 +01:00
krocard
efff7a9d22 Propagate sample rate and format deeper
#exo-offload

PiperOrigin-RevId: 310150780
2020-05-06 20:57:44 +01:00
olly
db61af23b9 Parse opus gain correctly as a signed value
Issue: #7046
PiperOrigin-RevId: 303354941
2020-03-27 23:33:15 +00:00
olly
2209947acb Add decoder instantiation tracing
This is just for consistency with our other renderers

PiperOrigin-RevId: 303317443
2020-03-27 23:32:37 +00:00