578 Commits

Author SHA1 Message Date
ibaker
c235087c11 Remove deprecated ActionFile and ActionFileUpgradeUtil
#minor-release

PiperOrigin-RevId: 426868933
2022-02-08 10:26:35 +00:00
hschlueter
6c061894b0 Make GlProgram an outer class.
This change makes GlUtil.Program an outer class named GlProgram,
and also moves private static helpers as well as the inner classes
Attribute and Uniform which were only used by GlUtil.Program to
GlProgram. Other static utility methods remain in GlUtil.

No functional changes intended.

PiperOrigin-RevId: 426119299
2022-02-04 10:23:39 +00:00
huangdarwin
ead64f5406 Transformer Demo: Remove unneeded external storage permission
Tested by confirming transformations still work and write to a output file in a
scoped-storage directory on a:
* Nexus 6P API 23 emulator
* Google Pixel 4 API 31 physical device

PiperOrigin-RevId: 425644266
2022-02-02 10:44:00 +00:00
hschlueter
4c5e266829 Make transformer demo configuration options scrollable.
On devices with a smaller screen / low resolution not all
options fit, so scrolling is needed.

PiperOrigin-RevId: 425635224
2022-02-02 10:40:13 +00:00
olly
29a6280b1b Rewrite EventLogger to use new track APIs
PiperOrigin-RevId: 425595951
2022-02-02 10:22:05 +00:00
andrewlewis
7c8f6d5d69 Add support for experimenting with HDR
- Add a checkbox in the demo app to enable experimental HDR editing.
- Add an `experimental_` method to `TransformationRequest` to enable HDR editing.
- Add fragment/vertex shaders for the experimental HDR pipeline. The main difference compared to the existing shaders is that we sample from the decoder in YUV rather than RGB (because the YUV -> RGB conversion in the graphics driver is not precisely defined, so we need to do this to get consistent results), which requires the use of ES 3, and then do a crude YUV -> RGB conversion in the shader (ignoring the input color primaries for now).
- When HDR editing is enabled, we force using `FrameEditor` (no passthrough) to avoid the need to select another edit operation, and use the new shaders. The `EGLContext` and `EGLSurface` also need to be set up differently for this path.

PiperOrigin-RevId: 425570639
2022-02-02 10:04:32 +00:00
andrewlewis
3023385574 Switch from valueOf to parse methods
This fixes some warnings that show up in Android Studio (due to using methods
that autobox unnecessarily).

PiperOrigin-RevId: 424892352
2022-02-01 14:15:21 +00:00
andrewlewis
b81568f836 Publish the transformer demo app
PiperOrigin-RevId: 424850283
2022-01-28 14:37:15 +00:00
olly
5d7641c6f1 Fix some lint warnings
PiperOrigin-RevId: 424383900
2022-01-28 09:37:06 +00:00
olly
aceacb05ca Fix spurious unsupported tracks toast in demo apps
PiperOrigin-RevId: 424062588
2022-01-25 20:05:06 +00:00
huangdarwin
308eaf55c6 GL: Update BitmapOverlayVideoProcessor naming conventions.
To be more readable and consistent with Transformer GL.

Tested by running gl-demo with no crash.

PiperOrigin-RevId: 421815519
2022-01-17 13:56:12 +00:00
huangdarwin
f216fa2042 Transformer GL: Clarify variables and comments.
Simplifying and clarifying variables, and adding comments.

Tested by confirming demo-gl and demo-transformer both
correctly display videos

PiperOrigin-RevId: 421792079
2022-01-14 15:34:09 +00:00
ibaker
f673676c6d Specify the video ID used in the Widevine DASH samples in the demo app
This value is the default used by widevine_test at
proxy.uat.widevine.com, but it's not easy to find that info so it's
clearer to document it explicitly here for consistency with the "policy
tests" section below where all the URLs contain a video_id parameter.

Issue: google/ExoPlayer#9852
PiperOrigin-RevId: 421781663
2022-01-14 15:30:21 +00:00
ibaker
5e8d1eb7f3 Add MediaSource.Factory and deprecate MediaSourceFactory
This more closely matches the pattern we have for all implementations
except DefaultMediaSourceFactory (e.g. ProgressiveMediaSource.Factory)
and other factory interfaces like (Http)DataSource.Factory.

PiperOrigin-RevId: 417826803
2022-01-04 12:51:47 +00:00
tonihei
65c444538b Rename HLS master playlist to multivariant playlist
The spec renamed this type of playlist in the latest revision
to use a more inclusive technical term (see
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-10)

PiperOrigin-RevId: 417560274
2021-12-21 17:14:42 +00:00
ibaker
e3548f267c Migrate usages of deprecated MediaSourceFactory methods
PiperOrigin-RevId: 417428182
2021-12-21 17:10:54 +00:00
ibaker
3f5304b891 Fix StyledPlayerControlView reference in demo app's PlayerActivity
PiperOrigin-RevId: 416809105
2021-12-20 12:51:22 +00:00
andrewlewis
cd6ba0680f Encapsulate attributes and uniforms within Program
Document that apps should retain `GlUtil.Program` while the program is in use,
and keep a reference to attributes/uniforms within the program to make sure
they don't get GC'd causing any allocated buffers passed to GL to become
invalid.

Tested manually by running gldemo and transformer.

PiperOrigin-RevId: 411516894
2021-11-26 14:54:33 +00:00
ibaker
b0cfe910a9 Fix javadoc reference to StyledPlayerView in cast demo app
This should have been done in
098c3a010e

PiperOrigin-RevId: 411073049
2021-11-26 14:51:21 +00:00
ibaker
674d70e8f3 Migrate the GL demo app from PlayerView to StyledPlayerView
PiperOrigin-RevId: 411006397
2021-11-19 14:25:57 +00:00
andrewlewis
fc0e6a075e Fix gldemo
The GL program needs to be used before accessing its attributes.

#minor-release

PiperOrigin-RevId: 410768017
2021-11-18 14:09:16 +00:00
ibaker
f6f0386681 Migrate the cast demo app from PlayerView to StyledPlayerView
StyledPlayerControlView can't really be used on its own (like
PlayerControlView was used here), so we instead use the same
StyledPlayerView instance for both local and casted playback,
replacing the content with a cast icon while casting.

PiperOrigin-RevId: 410764338
2021-11-18 14:00:24 +00:00
ibaker
364239ac8c Remove usages of ParserException from the demo app
PiperOrigin-RevId: 408311942
2021-11-08 14:36:53 +00:00
ibaker
b3b4645e69 Migrate GL demo from deprecated ExoPlayer.VideoComponent to ExoPlayer
#minor-release

PiperOrigin-RevId: 408304187
2021-11-08 14:27:05 +00:00
ibaker
ed63fee21c Migrate the demo app to use non-deprecated MediaItem Builders
#minor-release

PiperOrigin-RevId: 407843859
2021-11-08 09:43:55 +00:00
ibaker
028bb2341a Update the demo app to use the stable ExoPlayer.Builder constructor
The ExoPlayer.Builder constructor overloads are only needed for apps
trying to ensure certain classes are removed by R8/proguard, which isn't
relevant for the demo app.

PiperOrigin-RevId: 407819694
2021-11-08 09:38:57 +00:00
ibaker
7de079493c Migrate usages of Window-based Player methods
Where this introduced an inconsistency (e.g. assigning to something
called `windowIndex`), I generally renamed the transitive closure of
identifiers to maintain consistency (meaning this change is quite
large). The exception is code that interacts with Timeline and Window
directly, where sometimes I kept the 'window' nomenclature.

#minor-release

PiperOrigin-RevId: 407040052
2021-11-02 12:08:18 +00:00
huangdarwin
dcdcb919f4 Transformer GL: Simplify GL program handling.
Relanding 9788750ddb, with some changes
applied to improve primarily readability, naming,
and nullness checks.

PiperOrigin-RevId: 406101742
2021-10-29 11:24:38 +01:00
ibaker
9c9671a0af Remove all references to @NonNull
Our package-info.java files are annotated with @NonNullApi which results
in everything being non-null by default, so this annotation is never
needed.

#minor-release

PiperOrigin-RevId: 405864737
2021-10-29 11:03:05 +01:00
olly
f605165430 Add database module
PiperOrigin-RevId: 405626096
2021-10-26 14:19:43 +01:00
andrewlewis
0da494c613 Fix main demo gradle task name
PiperOrigin-RevId: 405592960
2021-10-26 14:04:30 +01:00
ibaker
218e0bf885 Demo: Fix NPE when restoring DRM info of a downloaded item
DrmConfiguration.Builder#setLicenseRequestHeaders now rejects null,
since 8fd1381a84

This private method isn't needed at all, it's extracting the headers
from the item that the DrmConfiguration.Builder is already based on.

PiperOrigin-RevId: 403973523
2021-10-18 17:24:36 +01:00
ibaker
422e68b48d Demo: Fix NPE in SampleChooserActivity
This prevents the demo app loading media.exolist.json. The exception
was introduced by
8fd1381a84

PiperOrigin-RevId: 403973062
2021-10-18 17:19:08 +01:00
olly
18cf01cda6 Move DataSource utils into a DataSourceUtil class
PiperOrigin-RevId: 403910535
2021-10-18 15:25:43 +01:00
ibaker
18b1f3d624 Migrate usages of DrmConfiguration.sessionForClearTypes to new field
The new forcedSessionTrackTypes field was introduced in
<unknown commit>.

These usages are migrated in a follow-up change to add confidence that
the deprecated field continued to work correctly.

PiperOrigin-RevId: 403342893
2021-10-18 14:56:46 +01:00
ibaker
61c8f8c27e Rename DrmConfiguration.sessionForClearTypes to forcedSessionTrackTypes
The previous name is quite easy to misread because it sounds like it
splits up like "(session) for (clear types)" when it's meant to be
"(session for clear) (types)".

The old field is left deprecated for backwards compatibility. The
DrmConfiguration.Builder methods are directly renamed without
deprecation because they're not yet present in a released version of
the library.

PiperOrigin-RevId: 403338799
2021-10-15 12:53:50 +01:00
samrobinson
3c19850ed3 Migrate library usages of SimpleExoPlayer to ExoPlayer.
PiperOrigin-RevId: 402853522
2021-10-14 12:03:11 +01:00
krocard
98ee159df1 Use TracksInfo and selection override in users
Update the UI module, the demos and most other users
to make use of the new player TracksInfo and track
selection override APIs.

PiperOrigin-RevId: 402817857
2021-10-14 11:54:45 +01:00
olly
8a9dcadef3 README updates for misc modules
PiperOrigin-RevId: 402292139
2021-10-12 19:40:44 +01:00
olly
e7c6ed5e7f Mechanical README cleanups
PiperOrigin-RevId: 401767060
2021-10-09 18:14:36 +01:00
olly
b03ebbeb89 Stop setting custom user agent in demo app
PiperOrigin-RevId: 401741202
2021-10-09 17:39:03 +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
claincly
3eda590c87 Rollback of 9788750ddb
*** Original commit ***

Simplify GL program handling.

***

PiperOrigin-RevId: 400970170
2021-10-05 23:24:48 +01:00
claincly
9788750ddb Simplify GL program handling.
PiperOrigin-RevId: 400697945
2021-10-04 15:34:43 +01: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
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
ibaker
f39dba0c5b Migrate usages of MediaItem.ClippingProperties to ClippingConfiguration
PiperOrigin-RevId: 399471555
2021-09-29 10:10:13 +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
a04f1d1726 Migrate usages of MediaItem.PlaybackProperties to LocalConfiguration
PiperOrigin-RevId: 399206106
2021-09-28 16:35:31 +01:00