43 Commits

Author SHA1 Message Date
hschlueter
682a5ca77b Clarify GlProgram parameter name.
PiperOrigin-RevId: 434441008
2022-03-14 12:52:16 +00:00
hschlueter
7507da51a0 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 09:40:51 +00:00
olly
f28de9de60 Rewrite EventLogger to use new track APIs
PiperOrigin-RevId: 425595951
2022-02-01 14:35:06 +00:00
huangdarwin
b7f5b5fac9 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-25 18:20:39 +00:00
huangdarwin
65adbbb745 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-25 18:17:15 +00:00
ibaker
bfce8f5456 Rename StyledPlayerView to PlayerView
This commit leaves some 'styled' references, specifically:
* exo_styled_XXX dimension names
* exo_styled_controls_XXX drawable IDs
* exo_styled_XXX color names
* ExoStyledControls.XXX style names

PiperOrigin-RevId: 421576554
2022-01-25 18:10:42 +00:00
ibaker
691f9c50cf Migrate usages of deprecated MediaSourceFactory methods
PiperOrigin-RevId: 417428182
2022-01-05 10:40:02 +00:00
andrewlewis
5b22b06ec4 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-22 17:21:14 +00:00
ibaker
b82bcdd07b Migrate the GL demo app from PlayerView to StyledPlayerView
PiperOrigin-RevId: 411006397
2021-11-19 15:14:30 +00:00
andrewlewis
d49b39bf37 Fix gldemo
The GL program needs to be used before accessing its attributes.

#minor-release

PiperOrigin-RevId: 410768017
2021-11-19 15:08:07 +00:00
ibaker
fc7b66706f Migrate GL demo from deprecated ExoPlayer.VideoComponent to ExoPlayer
#minor-release

PiperOrigin-RevId: 408304187
2021-11-09 10:10:11 +00:00
huangdarwin
7f64a5a1aa Transformer GL: Simplify GL program handling.
Relanding 9788750ddb, with some changes
applied to improve primarily readability, naming,
and nullness checks.

PiperOrigin-RevId: 406101742
2021-11-08 15:15:02 +00:00
ibaker
9a49a9ccda 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-27 17:48:40 +01:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00
samrobinson
3c19850ed3 Migrate library usages of SimpleExoPlayer to ExoPlayer.
PiperOrigin-RevId: 402853522
2021-10-14 12:03:11 +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
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
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
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
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
andrewlewis
2260678bee Fix texture transformation in gldemo
`SurfaceTexture` provides a transform matrix with each buffer. Previously
gldemo ignored this but it is important to apply it to have the video render
properly.

The transformation matrix from the surface texture includes flipping so this
change removes the hard-coded flipping from `a_texcoord`.

Issue: #8992

#minor-release

PiperOrigin-RevId: 377271389
2021-06-03 19:59:43 +01:00
olly
6d3e9fc251 Include MediaSource deps in all demo apps
This is mainly so that developers can try out RTSP with
the main demo app without having to change the build.gradle
file.

The change also aligns what media can be played across the
different demo apps.

#minor-release

PiperOrigin-RevId: 373591974
2021-05-13 17:26:08 +01:00
krocard
08336e372d Rollforward of Move VideoComponent to ExoPlayer
The original cl has been fixed by not implementing
VideoListener but Player.Listener in
StyledPlayerView.

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 369417682
2021-04-20 14:02:48 +01:00
ibaker
6550ea88ea Rollback of cdebf6c68b
*** Original commit ***

Move VideoComponent in ExoPlayer

VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

***

PiperOrigin-RevId: 369194309
2021-04-20 00:09:45 +01:00
krocard
cdebf6c68b Move VideoComponent in ExoPlayer
VideoFrameMetadataListener and CameraMotionListener are still part
of the Player interface as a good way to break the UI dependency
on them has not yet been finalised.

PiperOrigin-RevId: 368863829
2021-04-20 00:08:08 +01:00
olly
3ab344c218 Fix 1 ErrorProneStyle finding:
* The Google Java Style Guide requires that each switch statement includes a default statement group, even if it contains no code. (This requirement is lifted for any switch statement that covers all values of an enum.)
  (see http://go/bugpattern/MissingDefault)

This CL looks good? Just LGTM and Approve it!
This CL doesn’t look good? This is what you can do:
* Suggest a fix on the CL (go/how-to-suggest-fix).
* Revert this CL, by replying "REVERT: <provide reason>"
* File a bug under go/error-prone-bug for category ErrorProneStyle if the change looks generally problematic.
* Revert this CL and not get a CL that cleans up these paths in the future by
replying "BLOCKLIST: <provide reason>". This is not reversible! We recommend to
opt out the respective paths in your CL Robot configuration instead:
go/clrobot-opt-out.

This CL was generated by CL Robot - a tool that cleans up code findings
(go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/exoplayer/METADATA.
Anything wrong with the signup? File a bug at go/clrobot-bug.

#codehealth

PiperOrigin-RevId: 368586454
2021-04-15 10:53:47 +01:00
aquilescanta
1c40c75433 Use a debug signature config for demo apps' release variant
PiperOrigin-RevId: 359724874
2021-03-02 17:02:55 +00:00
olly
a1f06987eb Replace non-inclusively named constant
Issue: #7565
PiperOrigin-RevId: 353649187
2021-01-25 17:38:26 +00:00
tonihei
d4e1904604 Rollback of 483a350e84
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:342788973:BASE:342817196:1605636478036:6c558c0c

***

PiperOrigin-RevId: 343895651
2020-11-24 16:02:45 +00:00
olly
483a350e84 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 342999390
2020-11-18 18:40:06 +00:00
olly
b2b08ade99 Make User-Agent optional
PiperOrigin-RevId: 330593247
2020-09-09 09:41:51 +01:00
ibaker
2f19b63ca0 Add package-info files to packages that only exist in tests
This doesn't affect the nullness checker or Kotlin, but it does make
weird warnings appear in Android Studio. It seems mildly preferable to
have the same spurious warnings in these files that we have in other
tests, rather than different spurious warnings.

PiperOrigin-RevId: 321173760
2020-07-24 10:34:12 +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
5be6eaa88c Make GL demo easier to understand
PiperOrigin-RevId: 319007693
2020-07-03 09:00:28 +01:00
tonihei
1836f1df36 Update Checkerframework.
The compat dependency is no longer maintained and we need to keep
it at its old version.

PiperOrigin-RevId: 317658349
2020-06-23 11:07:34 +01:00
olly
f38a1015ae Adding instructions on how to build and run ExoPlayer demo apps
Issue:#7338
PiperOrigin-RevId: 312470913
2020-05-21 17:08:53 +01:00
olly
e90fdf36fb Handle orientation changes in GL demo
Issue: #7141
PiperOrigin-RevId: 303334072
2020-03-27 23:32:58 +00:00
aquilescanta
aa9eb5abc9 Remove generics from DRM components
PiperOrigin-RevId: 301798563
2020-03-20 12:48:50 +00:00
olly
7e6a1418e3 Demo apps: Annotate @NonNull where necessary
Because we now annotate not-null by default in ExoPlayer
library modules, we're seeing warnings in the demo apps where
we override a method and don't explicitly specify an equivalent
@NotNull annotation.

It's probably confusing to use not-null by default for the
demo apps, so this change uses @NonNull where necessary to fix
the warnings.

PiperOrigin-RevId: 296000044
2020-02-25 21:21:54 +00:00
olly
54283746be Fix lint errors
PiperOrigin-RevId: 295953956
2020-02-25 21:21:29 +00:00
andrewlewis
0dd8e6a7c1 Add GL demo app
Demonstrates rendering to a GLSurfaceView while applying a GL shader.

Issue: #6920
PiperOrigin-RevId: 293551724
2020-02-11 17:08:53 +00:00