237 Commits

Author SHA1 Message Date
kimvde
8f6b46f570 Transformer: flatten slow mo video at normal speed
Slow motion segments are not taken into account yet.

PiperOrigin-RevId: 339678840
2020-11-02 22:59:43 +00:00
christosts
d5170688b4 MediaItem: document params in method call
PiperOrigin-RevId: 339472160
2020-11-02 22:58:54 +00:00
samrobinson
2c746c6b6b Generalise the SlowMotion Metadata.Entry naming.
PiperOrigin-RevId: 339352447
2020-11-02 22:57:56 +00:00
tonihei
e57193676a Add min/max live offset to MediaItem.LiveConfiguration.
This allows the user and the media to define bounds in which the live offset
can vary.

Issue: #4904
PiperOrigin-RevId: 339214605
2020-11-02 22:57:19 +00:00
ibaker
50566fb8ac Suppress ProGuard warnings related to Guava's compile-only deps
Without these lines, ProGuard fails on the demo app (R8 works).

Also include some more `-dontwarn` lines from
https://github.com/google/guava/wiki/UsingProGuardWithGuava

#minor-release

Issue: #8103
PiperOrigin-RevId: 339050634
2020-11-02 22:56:21 +00:00
kimvde
80a37c7ed1 Rename MotionPhoto to MotionPhotoMetadata
This make it clear that this class does not contain any photo/video
data.

PiperOrigin-RevId: 339045203
2020-11-02 22:56:11 +00:00
samrobinson
1fcfef5cde Add readDelimiterTerminatedString to ParsableByteArray.
PiperOrigin-RevId: 338718776
2020-11-02 22:55:43 +00:00
samrobinson
7ccbf572c7 Add a Metadata Entry class for SEF Slow motion data.
PiperOrigin-RevId: 338695793
2020-11-02 22:55:34 +00:00
aquilescanta
a184924322 Avoid chunkless preparation if the codec mapping is ambiguous
Issue: #7877
PiperOrigin-RevId: 338659937
2020-11-02 22:55:03 +00:00
aquilescanta
4783c329cc Map HLS sample formats to the correct codec string
This change fixes format creation for traditional preparation of streams
where the master playlist contains more than one codec string per track
type.

Issue: #7877
PiperOrigin-RevId: 338538693
2020-10-23 13:54:50 +01:00
aquilescanta
ccf78f99c4 Allow multiple codecs with same type in DefaultHlsExtractorFactory
When disabling a TsExtractor track type because of a missing codec
in the master playlist, look through the entire codecs string
instead of checking the first codec with matching type.

Issue: #7877
PiperOrigin-RevId: 338530046
2020-10-23 13:54:40 +01:00
kimvde
175b8eb69e Read Google Photos motion photo metadata
PiperOrigin-RevId: 338436906
2020-10-22 12:37:41 +01:00
olly
563767d5e9 Bump version to 2.12.1
PiperOrigin-RevId: 338261975
2020-10-21 22:26:34 +01:00
kimvde
021d725c0a Add motion photo metadata entry
PiperOrigin-RevId: 337863184
2020-10-20 14:51:09 +01:00
ibaker
2371b024dd Switch to an 'api' dependency on Guava
The 'implementation' dependency causes problems when resolving
ListenableFuture in contexts that also include the
com.google.guava:listenablefuture:1.0 dependency.

Issue: #7905
Issue: #7997
Issue: #7993
PiperOrigin-RevId: 337093024
2020-10-17 01:34:15 +01:00
bachinger
bb7c934812 Add missing properties of MediaItem.Subtitle
Issue: #8044
PiperOrigin-RevId: 336955479
2020-10-17 01:32:59 +01:00
christosts
13f1f3b3eb Add live configuration to MediaItem
Issue: #4904
PiperOrigin-RevId: 336839370
2020-10-13 16:28:44 +01:00
christosts
ed873322d3 Parse ServiceDescription from DASH manifest
Issue: #4904
PiperOrigin-RevId: 336838559
2020-10-13 16:28:35 +01:00
andrewlewis
39277ebe95 Pass ad tags via AdsMediaSource
This is in preparation for supporting playlists of ads media sources using
ImaAdsLoader.

Existing ways of passing ad tags should still function but are deprecated (and
won't be supported with playlists).

Issue: #3750
PiperOrigin-RevId: 335618364
2020-10-06 14:31:50 +01:00
andrewlewis
3e8dacc284 Move DataSource reading methods into Util
This will be used to read ads responses out of data: URLs in a subsequent
change.

PiperOrigin-RevId: 334778780
2020-10-06 14:30:56 +01:00
christosts
cf30ee504e Util.getStringForTime() prefixes negative times
Fix bug to place the negative sign in the beginning
of the returned String.

PiperOrigin-RevId: 333504868
2020-09-25 16:32:37 +01:00
ibaker
f56db87c99 Add SDK_INT mapping from S -> 31
PiperOrigin-RevId: 332211266
2020-09-17 17:50:59 +01:00
ibaker
70ebe12ef9 Suppress Guava-related ProGuard/R8 warnings
I didn't copy-paste the whole of
https://github.com/google/guava/wiki/UsingProGuardWithGuava because
this line seems relevant based on our current usage.

Lots of that file seems to relate to classes that are strongly
discouraged on Android:
https://github.com/google/guava/wiki/Android#specifics

I've only added this to the `common` module, since everyone that uses
ExoPlayer must depend on that. This avoids duplicating this line into
every module that has a Guava dependency.

Also remove some other warning suppressions that are defined in both
`core` and `common`.

Issue: #7904
PiperOrigin-RevId: 332203086
2020-09-17 17:41:34 +01:00
olly
cdcb30ed21 Exclude Guava transitive annotation dependencies
PiperOrigin-RevId: 331148067
2020-09-11 16:01:15 +01:00
olly
b2b08ade99 Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:41:51 +01:00
gyumin
d155416c54 Add Util.postOrRun
To avoid repetition, it adds Util.postOrRun and replaces existing
instances with the util method.

PiperOrigin-RevId: 329472769
2020-09-07 20:40:04 +01:00
olly
e163fe6949 Optimize AAC seeking except for xHE-AAC
In 2.11.2 to 2.11.5, we considered all AAC streams as consisting
only of sync samples. In 2.11.6+, we considered no AAC streams as
consisting of sync samples, because the property is not guaranteed
specifically for xHE-AAC. This will have caused a small regression
is seek speed for some types of media.

This change brings back the optimization for AAC, specifically
excluding only xHE-AAC (and cases where we don't know what type of
AAC we're dealing with).

PiperOrigin-RevId: 328950697
2020-09-07 20:39:27 +01:00
tonihei
e16cd239ea Only report 5G for SDK 29+.
PiperOrigin-RevId: 328524230
2020-08-26 16:40:12 +01:00
kimvde
6960dde8a8 Add nullness annotations to FragmentedMp4Extractor
PiperOrigin-RevId: 327797428
2020-08-26 16:39:07 +01:00
aquilescanta
a673eec845 Make Format's constructor take the Builder as argument
Which saves the large parameter list.

PiperOrigin-RevId: 327619725
2020-08-21 12:51:33 +01:00
ibaker
54c92080bf Fix nullness warnings in testutil package
PiperOrigin-RevId: 327190676
2020-08-21 12:48:29 +01:00
olly
f2d2e6475a Bump release to 2.12.0
PiperOrigin-RevId: 327005645
2020-08-17 16:14:48 +01:00
olly
511a6c729e Increase flexibility of ISM URL handling
PiperOrigin-RevId: 326025335
2020-08-17 16:09:01 +01:00
olly
82b26357c9 Infer ISM content type from URL specified extension
PiperOrigin-RevId: 326012248
2020-08-17 16:08:43 +01:00
ibaker
443468d103 Clarify MediaItem.Builder javadoc
Make it clear that setUri sets PlaybackProperties.uri

Also capitalise all references to DRM, ID, URI and UUID

PiperOrigin-RevId: 326002853
2020-08-17 16:08:34 +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
be88143fcd Remove deprecated parts of demo app IntentUtil
PiperOrigin-RevId: 324604419
2020-08-07 18:59:11 +01:00
gyumin
437275caed Implement device info/volume methods
PiperOrigin-RevId: 323544314
2020-08-01 12:54:23 +01:00
ibaker
fda3b3d8ec Use static imports for methods that make sense without their class name
PiperOrigin-RevId: 323349585
2020-07-27 23:59:52 +01:00
ibaker
7083dbf7b4 Remove zero-args ParsableByteArray#reset() method
It's potentially confusing that this resets both position & limit, so
require callers to pass `limit` explicitly, or call setPosition(0)
if that's actually what they intended.

This makes enforcing the limit in an upcoming change slightly safer.

PiperOrigin-RevId: 323340485
2020-07-27 23:59:43 +01:00
ibaker
ce2e6e2fd6 Hide ParsableByteArray#data behind a getter
This allows us to enforce the limit because the array can only be
reassigned through reset(byte[]) or reset(byte[], int) (which update
the limit)

PiperOrigin-RevId: 323339960
2020-07-27 23:59:34 +01:00
ibaker
478f59fd08 Replace ExoPlayer's functional types with Guava alternatives
This removes Supplier, Function and Predicate. Consumer is kept because
Guava doesn't have an equivalent (Java 8 does, but we can't use that
yet).

#exofixit

PiperOrigin-RevId: 323324392
2020-07-27 23:59:25 +01:00
olly
0ce2632ad1 Clean up some Format documentation
- Fix spurious line break
- Try and cut down on references to other components

PiperOrigin-RevId: 322971988
2020-07-27 23:58:40 +01:00
christosts
9a51681332 Update internal reference
#exofixit

PiperOrigin-RevId: 322791471
2020-07-24 10:48:07 +01:00
olly
6d92eebe51 Revert Format back to only containing audio encoding for PCM
PiperOrigin-RevId: 322683545
2020-07-24 10:46:37 +01:00
olly
92029ed0ad Un-deprecate Format.pcmEncoding and switch tests back to it.
This change precedes one that will remove Format.encoding.

PiperOrigin-RevId: 322619495
2020-07-24 10:46:28 +01:00
christosts
6c837643b9 Fix dependency on common module
PiperOrigin-RevId: 322533712
2020-07-24 10:44:30 +01:00
christosts
3191afe82e Common tests do not depend on testutils
This commit duplicates some code from the testutils module
in common test in order to break the dependency from testutils.

PiperOrigin-RevId: 322366013
2020-07-24 10:44:02 +01:00
ibaker
e0b7263ce4 Remove SpannedSubject dependency from UtilTest
PiperOrigin-RevId: 322341513
2020-07-24 10:43:25 +01:00
christosts
34a887e2d3 Common module tests depend on core
PiperOrigin-RevId: 322325657
2020-07-24 10:43:16 +01:00