12342 Commits

Author SHA1 Message Date
bachinger
3d67400a8a Bump androidx.core version to 1.6.0
PiperOrigin-RevId: 401743951
2021-10-09 17:50:58 +01:00
olly
3b77816001 Remove stray reference to ExoPlayer
PiperOrigin-RevId: 401741416
2021-10-09 17:47:32 +01:00
olly
b03ebbeb89 Stop setting custom user agent in demo app
PiperOrigin-RevId: 401741202
2021-10-09 17:39:03 +01:00
bachinger
e66f9fafe1 Clean up ExoPlayerLibraryInfo
PiperOrigin-RevId: 401729859
2021-10-08 12:18:27 +01:00
olly
b6bddc5000 Remove play-services-ads-identifier from IMA extension dependencies.
This is no longer needed since IMA depends on play-services-ads-identifier directly; see [article](https://ads-developers.googleblog.com/2019/12/the-interactive-media-ads-ima-sdk-for.html).

PiperOrigin-RevId: 401550793
2021-10-07 22:09:59 +01:00
samrobinson
96a2c03f59 Add public SimpleExoPlayer methods to ExoPlayer.
PiperOrigin-RevId: 401535981
2021-10-07 22:04:05 +01:00
ibaker
fc25798af6 Add public.xml to UI module with an empty <public /> node
This is the recommended way to mark all resources as private:
https://developer.android.com/studio/projects/android-library#PrivateResources

PiperOrigin-RevId: 401470108
2021-10-07 21:57:50 +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
f3fb03e663 Rollback of ce0cf23a7f
*** Original commit ***

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

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

***

PiperOrigin-RevId: 401453039
2021-10-07 21:50:01 +01:00
ibaker
f440aed4e9 Make ExoPlayer.Builder#build return SimpleExoPlayer
In a future change it will be updated to return ExoPlayer

We no longer need separate methods to build Player and ExoPlayer, so
buildExoPlayer will be removed shortly.

PiperOrigin-RevId: 401441016
2021-10-07 21:41:37 +01:00
ibaker
ee71c8387c Migrate usages of deprecated Player COMMAND_ constants
PiperOrigin-RevId: 401292817
2021-10-06 21:19:37 +01:00
tonihei
d5f71a5dbd Move misplaced parenthesis.
PiperOrigin-RevId: 401245843
2021-10-06 21:08:29 +01:00
ibaker
96cfd0b415 Rename Player methods to refer to MediaItem instead of Window
PiperOrigin-RevId: 401222863
2021-10-06 21:05:14 +01:00
bachinger
670bc2f875 Update hls package in PlaybackOutput
PiperOrigin-RevId: 401099169
2021-10-06 20:58:22 +01:00
olly
585b0bddcc DASH: Set MIME, width and height for image adaptation sets
Issue: #9500
PiperOrigin-RevId: 401091261
2021-10-06 20:55:10 +01:00
huangdarwin
03ff5b6618 Transformer: Add TranscodingTransformer.
Temporary file copy of Transformer, which uses
TransformerTranscodingVideoRenderer instead of
TransformerMuxingVideoRenderer to transform files. This allows devs to test
transcoding more easily using the Transformer demo, while external engineers
continue to see the completely working Muxing-based transformer.

In the future, this will replace the Transformer class.

PiperOrigin-RevId: 401020893
2021-10-05 23:33:55 +01:00
ibaker
ea210e35fe Remove IntRange annotations from index-based Player methods
It can be assumed that indexes are always >=0.

PiperOrigin-RevId: 400990569
2021-10-05 23:30:53 +01:00
ibaker
6d9b050a38 Add range annotations to Player volume and percentage methods
These are the most likely to cause developer confusion due to potential
ambiguity.

PiperOrigin-RevId: 400990454
2021-10-05 23:27:47 +01:00
claincly
3eda590c87 Rollback of 9788750ddb
*** Original commit ***

Simplify GL program handling.

***

PiperOrigin-RevId: 400970170
2021-10-05 23:24:48 +01:00
olly
80d365163d Rollback of 912c47ff6f
*** Original commit ***

Rollback of 8ed6c9fcf5

*** Original commit ***

Fix capitalization of language in track selector

Issue: #9452

***

***

PiperOrigin-RevId: 400942287
2021-10-05 23:18:25 +01:00
krocard
ac881be2fc Add TracksInfo to the Player API
TracksInfo is very similar to
`MappingTrackSelector.MappedTracksInfo` with some
fields removed to simplify the Player API,
notably it doesn't expose the renderer concept.

A significant difference is the addition of a `selected` boolean
field which avoids having a separate `getCurrentTrackSelection`
API.

This cl is a part of the bigger track selection change,
splitted for ease of review.

In particular, the MediaSession implementation and UI usage
have been slitted in child cls.

Find all cls with the tag:
#player-track-selection

PiperOrigin-RevId: 400937124
2021-10-05 23:15:16 +01:00
bachinger
47573d4575 Remove inlined, fully qualified class name
PiperOrigin-RevId: 400742025
2021-10-05 11:22:10 +01:00
christosts
7a2c7c3297 Make asynchronous queueing non-experimental
This change makes asynchronous queueing non-experimental, it enables the
feature by default on devices with API level >= 31 (Android 12+) and
exposes APIs for apps to either fully opt-in or opt-out from the
feature.

The choice to use or not asynchronous queueing is moved out of
MediaCodecRenderer to a new MediaCodecAdapter factory, the
DefaultMediaCodecAdapterFactory. This is because, at the moment,
if an app passes a custom adapter factory to a MediaCodecRenderer and
then enables asynchronous queueing on it, the custom
adapter factory is not used but this is not visible to the user.

The default behavior of DefaultMediaCodecAdapterFactory is to create
asynchronous MediaCodec adapters for devices with API level >= 31
(Android 12+), and synchronous MediaCodec adapters on devices with older
API versions.

DefaultMediaCodecAdapterFactory exposes methods to force enable or force
disable the use of asynchronous adapters so that applications can enable
asynchronous queueing on devices with API versions before 31 (but not
before 23), or fully disable the feature. For applications that build
MediaCodecRenderers directly, they will need to create a
DefaultMediaCodecAdapterFactory and pass it to the renderer constructor.
For applications that rely on the DefaultRenderersFactory, additional
methods have been added on the DefaultRenderersFactory to control
enabling/disabling asynchronous queueing.

Issue: #6348
PiperOrigin-RevId: 400733506
2021-10-05 11:22:01 +01:00
kimvde
84881739ee Map TS stream type 0x80 to H262
Issue: #9472
PiperOrigin-RevId: 400715255
2021-10-04 15:43:47 +01:00
olly
912c47ff6f Rollback of 8ed6c9fcf5
*** Original commit ***

Fix capitalization of language in track selector

Issue: #9452

***

PiperOrigin-RevId: 400706984
2021-10-04 15:40:47 +01:00
olly
ac4a7e919a Remove ExoPlayer link from UI module
PiperOrigin-RevId: 400706800
2021-10-04 15:37:48 +01:00
claincly
9788750ddb Simplify GL program handling.
PiperOrigin-RevId: 400697945
2021-10-04 15:34:43 +01:00
bachinger
7383bf7696 Fix dev-v2 build
PiperOrigin-RevId: 400681582
2021-10-04 12:16:50 +01:00
olly
8ed6c9fcf5 Fix capitalization of language in track selector
Issue: #9452
PiperOrigin-RevId: 400680794
2021-10-04 12:13:49 +01:00
ibaker
d4b9fe33b4 Remove subtitle types allow-list from DefaultMediaSourceFactory
Removes subtitle allow-list by using SubtitleDecoderFactory.DEFAULT.
When the format is unsupported, the extractor registers one track and
sends the format with the Format#sampleMimeType set to TEXT_UNKNOWN and
Format#codecs field set to the actual subtitle MIME type.
The TextRenderer will recognize this MIME Type as not supported which is
gonna be visible in the event log.

PiperOrigin-RevId: 400679058
2021-10-04 12:10:32 +01:00
krocard
68b17d3391 Extract TrackSelection override & disabling in a method
This avoid break and continue after affecting the definition
array.

PiperOrigin-RevId: 400671927
2021-10-04 11:59:48 +01:00
bachinger
168d0cc9a6 Merge pull request #9525 from talklittle:fix-initial-position
PiperOrigin-RevId: 400666736
2021-10-04 11:56:36 +01:00
bachinger
014ee8f5d8 Remove fully qualified class names in link tags
PiperOrigin-RevId: 400224459
2021-10-04 11:53:39 +01:00
samrobinson
a26caae4ca Remove BasePlayer stop as a final method.
It calls through to a deprecated method, which is unusual for a
convenience method, and the deprecated method has various
implementations. This allows for a smoother removal of stop(boolean)
and removes an obstacle for the ExoPlayer-SimpleExoPlayer merge.

Adds missing @Deprecated tags to some Players.

PiperOrigin-RevId: 400213422
2021-10-04 11:49:44 +01:00
claincly
c810309775 Validate input format.
The format should have the following fields set (as specified in the javadoc):

- width
- height
- frame rate, and
- averageBitrate.

PiperOrigin-RevId: 400204510
2021-10-04 11:46:23 +01:00
ibaker
f94148c478 Add microseconds suffix to Timeline#getPeriodPosition
The old methods are deprecated and left in place for backwards
compatibility.

PiperOrigin-RevId: 400188084
2021-10-04 11:40:20 +01:00
Andrew Shu
e883c04006 Fix setting initial 0 position in PlayerControlView 2021-10-03 15:58:05 -07:00
ibaker
b192465bba Migrate usages of MediaItem.Subtitle to SubtitleConfiguration
Usages of the (already deprecated) Subtitle constructors were not
migrated, as it would require migrating to the Builder which is a more
involved change.

PiperOrigin-RevId: 400153139
2021-10-01 11:27:30 +01:00
claincly
d4343ed858 Allow configuring encoder.
PiperOrigin-RevId: 400151886
2021-10-01 11:23:17 +01:00
ibaker
7a3dedce07 Rename MediaItem.Subtitle to SubtitleConfiguration
This is more consistent with the other MediaItem inner classes which are
all Configurations.

The old class and fields are left deprecated for backwards
compatibility.

The deprecated Subtitle constructors are not moved to
SubtitleConfiguration.

PiperOrigin-RevId: 400144640
2021-10-01 11:19:53 +01:00
ibaker
4e9e38f3a7 Update ExoPlayer.Builder#build() to return Player
If callers need an ExoPlayer instance they should use buildExoPlayer().

Also remove the @InlineMe annotation now these methods are no longer
equivalent.

PiperOrigin-RevId: 400143239
2021-10-01 11:16:20 +01:00
Oliver Woodman
9926a8f6e3 Merge pull request #9498 from DolbyLaboratories:dev-v2-direct-automotive
PiperOrigin-RevId: 400134426
2021-10-01 11:12:56 +01:00
ibaker
ce0cf23a7f Migrate callers of ExoPlayer.Builder#build() to buildExoPlayer()
An upcoming change will update build() to return Player.

PiperOrigin-RevId: 399981901
2021-09-30 21:36:14 +01:00
krocard
d5ef11aaf3 Add track selection override to the player API
This moves `SelectionOverride` from `DefaultTrackSelector`
to `TrackSelectionParameters`.

It is then use to allow track selection override per
track selection array.

Note that contrary to
`DefaultTrackSelector.Parameters.selectionOverride`, the renderer
concept is not exposed.

This cl is a part of the bigger track selection change,
splitted for ease of review.
Find all cls with the tag:
#player-track-selection

PiperOrigin-RevId: 399933612
2021-09-30 21:29:53 +01:00
bachinger
ece0cfc9f2 Move some tests to facilitate package renaming
PiperOrigin-RevId: 399923140
2021-09-30 21:27:03 +01:00
samrobinson
e335022e0b Fix mediaMetadata being reset when media is repeated.
Issue: #9458
PiperOrigin-RevId: 399901865
2021-09-30 21:24:10 +01:00
glass
d6bc49cc54 Add Dolby TrueHD extraction test for MP4 files.
Signed-off-by: glass <glass@dolby.com>
2021-09-30 16:17:57 +02:00
glass
13f4c832da Add MP4 extraction of Dolby TrueHD samples
Extract 16 access units per readSample call to align
with what's done in MKV extraction.

Signed-off-by: glass <glass@dolby.com>
2021-09-30 16:17:56 +02:00
olly
410ddf458c Add link to annual media developer survey.
This will be removed after the survey has closed in ~1 month.

PiperOrigin-RevId: 399890121
2021-09-30 11:31:44 +01:00
gyumin
b105412a41 Rename BundleableUtils to BundleableUtil for consistency
All utility classes in the common module has the same naming convention.

PiperOrigin-RevId: 399831748
2021-09-30 11:28:59 +01:00