710 Commits

Author SHA1 Message Date
ibaker
0cd1031dcd Rename MediaItem.PlaybackProperties to LocalConfiguration
This aligns with other MediaItem.FooConfiguration class names and also
more clearly represents that this class encapsulates information used
for local playback that is lost when serializing MediaItem between
processes.

The old class and fields are kept (deprecated) for backwards
compatibility.

PiperOrigin-RevId: 398742708
2021-09-24 18:08:51 +01:00
bachinger
4fec4b8f6a Move format specific metadata packages to lib-extractor
PiperOrigin-RevId: 398262695
2021-09-23 15:13:10 +01:00
bachinger
f2a027e068 Move text classes from lib-exoplayer to lib-extractor and lib-common
PiperOrigin-RevId: 398247348
2021-09-23 15:09:07 +01:00
ibaker
59cd783dd4 Add MediaItem.ClippingProperties.Builder
PiperOrigin-RevId: 398232186
2021-09-23 15:05:10 +01:00
ibaker
fefa6cb817 Add MediaItem.Subtitle.Builder
PiperOrigin-RevId: 398200055
2021-09-23 14:55:16 +01:00
ibaker
e0a9540cd3 Mark MediaItem.Subtitle.mimeType as @Nullable
The MIME type is currently required to select a SubtitleDecoder
implementation in the TextRenderer. Future changes might remove this
requirement, so we pre-emptively mark the field as @Nullable.

The change in SingleSampleMediaSource ensures the track still maps to
the TextRenderer, otherwise it shows up as unmapped. Passing null MIME
type to MediaItem.Subtitle constructor now results in this from
EventLogger:

TextRenderer [
  Group:0, adaptive_supported=N/A [
    [ ] Track:0, id=null, mimeType=text/x-unknown, language=en, supported=NO_UNSUPPORTED_TYPE
  ]
]

PiperOrigin-RevId: 398010809
2021-09-23 14:49:15 +01:00
ibaker
dd39513a2e Rename MediaItem.DrmConfiguration.requestHeaders to add license
Both license and provisioning requests could be considered 'DRM
requests', and these headers are only sent on license requests, so
rename them to reflect that.

The old field remains deprecated for backwards compatibility.

PiperOrigin-RevId: 397980021
2021-09-23 14:47:13 +01:00
ibaker
e804df8c1f Rename MediaItem.DrmConfiguration.uuid to scheme
The type is already UUID so there's no need to duplicate that info in
the field name, and 'scheme' is a widely used term throughout both
ExoPlayer and android.os.MediaDrm documentation.

The old field remains deprecated for backwards compatibility.

The MediaItem.DrmConfiguration.Builder#setUuid method is renamed
directly (without deprecation) because it's not yet part of a released
ExoPlayer version.

PiperOrigin-RevId: 397961553
2021-09-21 14:23:21 +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
christosts
276d2e9d0d Bump version to 2.15.1 and tidy release notes
#minor-release

PiperOrigin-RevId: 397758146
2021-09-20 17:39:23 +01:00
andrewlewis
7d524d6d6f Fix incorrect @IntRange
PiperOrigin-RevId: 397753634
2021-09-20 17:37:43 +01:00
ibaker
9666fbdda6 Add MediaItem.LiveConfiguration.Builder
PiperOrigin-RevId: 397748657
2021-09-20 17:35:59 +01:00
ibaker
47b82cdc45 Add MediaItem.AdsConfiguration.Builder
PiperOrigin-RevId: 397718885
2021-09-20 13:04:31 +01:00
kimvde
46d97bdd39 Fix DTS_X audio mime type
Issue: #9429

#minor-release

PiperOrigin-RevId: 397717740
2021-09-20 13:02:53 +01:00
tonihei
0f3a86b89d Remove accidental log line.
PiperOrigin-RevId: 397707790
2021-09-20 12:58:48 +01:00
ibaker
8d3cad570e Document MediaItem.DrmConfiguration#buildUpon()
PiperOrigin-RevId: 397697019
2021-09-20 12:57:08 +01:00
krocard
74c6ef9ba0 Move EventListener registration down from Player
The deprecated `Player.addListener(EventListener)`
is moved out of Player into its subclasses
(CastPlayer and ExoPlayer).

This is unlikely to break users because:
 - the method has been deprecated in the last major version
 - the method is still present in the major implementations

If an users is affected, they can either:
 - use ExoPlayer instead of Player
 - (recommended) switch to Player.Listener.

Additionally update the threading guarantees that did not
reflect the current implementation.

PiperOrigin-RevId: 397272144
2021-09-17 11:58:31 +01:00
krocard
a75f902c81 Add track type disabling to Track selection parameters
This will allow to disable video/audio... through the player
interface.

PiperOrigin-RevId: 397183548
2021-09-17 11:55:51 +01:00
bachinger
f7abce6aea Move FlacConstant to lib-extractor
PiperOrigin-RevId: 397156268
2021-09-16 22:39:14 +01:00
bachinger
c21d5c7f33 Remove fully qualified link tag
PiperOrigin-RevId: 397141742
2021-09-16 22:37:20 +01:00
krocard
4455554e9e Use Android 12's AudioManager.getPlaybackOffloadSupport
Previously gapless offload support was hardcoded to Pixel
only.

PiperOrigin-RevId: 397070378
2021-09-16 16:57:02 +01:00
bachinger
f8dde8ed5f Move classes from util package in lib-exoplayer
PiperOrigin-RevId: 397066804
2021-09-16 16:54:59 +01:00
samrobinson
e5e8d9dc17 Make StubExoPlayer take a context in constructor.
This is a pre-requisite step for merging SimpleExoPlayer into
ExoPlayer, because when StubExoPlayer extends ExoPlayer, it needs
a matching constructor.

PiperOrigin-RevId: 397065374
2021-09-16 16:52:52 +01:00
olly
f5498ec4bf Rename ExoDatabaseProvider to StandaloneDatabaseProvider
PiperOrigin-RevId: 396959703
2021-09-16 12:12:49 +01:00
olly
5a2fd983a9 Move database package to common module
PiperOrigin-RevId: 396936785
2021-09-16 12:09:16 +01:00
andrewlewis
8540b7266c Add open @IntDef for track selection type
#exofixit

PiperOrigin-RevId: 396780460
2021-09-16 11:59:57 +01:00
ibaker
aa8fe5df86 Add a test for MediaItem equality when using whole-object setters
Follow-up to 9f3c2fb5e1

PiperOrigin-RevId: 396776798
2021-09-16 11:58:05 +01:00
andrewlewis
469c0e756a Use @C.TrackType more widely
Also add `TYPE_USE` target on the @IntDef (and fix @Targets for other
@IntDefs).

#exofixit

PiperOrigin-RevId: 396333212
2021-09-14 12:04:11 +01:00
kimvde
040a45f310 Remove deprecated getDefaultRequestProperties from HttpDataSource
#exo-fixit

PiperOrigin-RevId: 396329591
2021-09-14 12:02:18 +01:00
andrewlewis
71a4b6337c Fix javadoc consistency
#exofixit

PiperOrigin-RevId: 396304941
2021-09-14 11:56:45 +01:00
Marcus Wichelmann
45db77dc6d
Fixed some spaces 2021-09-13 12:34:44 +02:00
Marcus Wichelmann
dbc7088716
Keep the existing parseSpsNalUnit (and similar) methods to avoid breaking changes 2021-09-13 12:30:21 +02:00
Marcus Wichelmann
296074fbea
Extend SPS parsing when building the initial MP4 HevcConfig and include the PAR for propagating it into the Format 2021-09-13 10:27:55 +02:00
olly
68ee587e25 Constrain resolved period positions to be within the period
This is a candidate fix for #8906. As mentioned in that issue,
negative positions within windows might be (kind of) valid in
live streaming scenarios, where the window starts at some
non-zero position within the period. However, negative positions
within periods are definitely not valid. Neither are positions
that exceed the period duration.

There was already logic in ExoPlayerImplInternal to prevent a
resolved seek position from exceeding the period duration. This
fix adds the equivalent constraint for the start of the period.
It also moves the application of the constraints into Timeline.
This has the advantage that the constraints are applied as part
of state masking in ExoPlayerImpl.seekTo, removing any UI flicker
where the invalid seek position is temporarily visible.

Issue: #8906
PiperOrigin-RevId: 395917413
2021-09-10 15:11:52 +01:00
ibaker
9f3c2fb5e1 Add MediaItem.DrmConfiguration.Builder and use it in MediaItem.Builder
PiperOrigin-RevId: 395896034
2021-09-10 15:07:48 +01:00
andrewlewis
0c4bb23dd3 Rename audioVolume parameter to volume
The new name is consistent with the corresponding parameters to `onVolumeChanged`, `setDeviceVolume` and `onDeviceVolumeChanged`.

PiperOrigin-RevId: 395705288
2021-09-09 18:17:40 +01:00
olly
1bef1a2b38 Fix STATE_IDLE Javadoc
Since playlist support was added, it's possible for the player to "have media"
and be in STATE_IDLE. The STATE_IDLE documentation therefore became incorrect.

Issue: #8946
#exofixit
#minor-release
PiperOrigin-RevId: 395653716
2021-09-09 18:15:24 +01:00
ibaker
87d2054b67 Update value of C.TRACK_TYPE_NONE to -2 to allow for future 'real'
track types.

PiperOrigin-RevId: 395460563
2021-09-08 17:14:34 +01:00
olly
c2e6d2028b Fix poor documentation and variable name choice in StreamKey
Issue #9284

PiperOrigin-RevId: 395443015
2021-09-08 17:08:56 +01:00
olly
e53e59388f ID3: Fix end-of-string detection for UTF-16
The current detection logic checks that the two byte terminator starts
at an even position in the ID3 data, where-as it should check that it
starts at an even position relative to the start of the string.

#minor-release
#exofixit
Issue: #9087
PiperOrigin-RevId: 395274934
2021-09-07 20:26:35 +01:00
ibaker
9949424da4 Deprecate all methods on C and move them to Util
C should only hold constants.

Also resolve the TODO in getErrorCodeForMediaDrmErrorCode(), and
annotate the deprecated methods with Error Prone's @InlineMe to
facilitate automated refactoring of callers.

PiperOrigin-RevId: 395244855
2021-09-07 17:56:41 +01:00
samrobinson
5183eaaf1e Add open @IntDef for track selection reasons.
#exofixit

PiperOrigin-RevId: 395217458
2021-09-07 17:42:30 +01:00
andrewlewis
d05c15dee0 Add open @IntDef for track types
Also add handling of `C.TRACK_TYPE_IMAGE` in a couple of places where it was
missing.

#exofixit

PiperOrigin-RevId: 395078312
2021-09-06 15:04:47 +01:00
gyumin
00dda049ea Fix FlagSet.equals on API levels below 24
#minor-release

PiperOrigin-RevId: 395004645
2021-09-06 15:00:29 +01:00
kimvde
9991f14643 Add Open GL step to Transformer
PiperOrigin-RevId: 394708737
2021-09-06 14:58:25 +01:00
kimvde
373db56a52 Add method to compile program from shader paths in GlUtil
This method will be useful for adding Open GL to the Transformer.

PiperOrigin-RevId: 394420744
2021-09-02 14:53:20 +01:00
olly
68eff51d96 Remove max API level for reading TV resolution from system properties
PiperOrigin-RevId: 394415421
2021-09-02 14:49:28 +01:00
samrobinson
0d4986f806 Remove deprecated static metadata methods.
PiperOrigin-RevId: 394196332
2021-09-02 09:44:04 +01:00
kimvde
75a6908206 Add methods needed by Transformer to GlUtil
This is to add a step to the Transformer transcoding video pipeline to
copy from a surface to another using OpenGL.

PiperOrigin-RevId: 393391005
2021-09-02 09:32:57 +01:00
bachinger
a9913e5410 Add the media item to PositionInfo
PiperOrigin-RevId: 392914515
2021-08-26 11:03:40 +01:00