606 Commits

Author SHA1 Message Date
hschlueter
cf85d1bdc8 Only allow HEVC output MIME selection in demo for API>=24.
The muxer doesn't support HEVC below API 24. The is documented in
the TransformationRequest javadoc and the Transformer.Builder will
throw if HEVC is requested below API 24 so the option should not
be part of the demo for those devices.

#mse-bug-week

PiperOrigin-RevId: 429343805
2022-02-18 14:56:25 +00:00
Ian Baker
38717ce969 Reformat some javadoc 2022-02-18 14:54:02 +00:00
samrobinson
061aac7ab2 Add new public 4k60 portrait video to the demo application.
#mse-bug-week

PiperOrigin-RevId: 429323642
2022-02-18 14:52:48 +00:00
olly
f22025cc5e Simplify TracksInfo API
isTypeSupportedOrEmpty is very specific and a little hard to
understand unless you know the one thing it's useful for. This
commit replaces it with isTypeSupported, which can be used in
conjunction with the recently added containsType method.

PiperOrigin-RevId: 429312712
2022-02-17 16:15:14 +00:00
hschlueter
61354497e3 Add enable fallback option to transformer demo.
Also invert disableFallback parameter in DefaultEncoderFactory
to enableFallback. Fallback is still enabled by default.

PiperOrigin-RevId: 429253266
2022-02-17 14:59:32 +00:00
bachinger
5ee9c48244 Integrate IMA SSAI samples in main demo app
PiperOrigin-RevId: 429059793
2022-02-17 11:52:24 +00:00
kimvde
f8d8bfb664 Handle player release timing out in transformer
- The resources were released twice before, which is not necessary since
  the MSG_RELEASE message is already in the internal player queue.
- The demo app was failing because the stop watch was stopped in
  onTransformationError after being reset.

#minor-release
#mse-bug-week

PiperOrigin-RevId: 428794426
2022-02-17 11:52:23 +00:00
huangdarwin
78b461f94c Transformer GL: Update TODOs.
Document some suboptimal things, and remove TODOs that were
fixed already or no longer relevant. Comment-only change.

PiperOrigin-RevId: 428749344
2022-02-17 11:52:23 +00:00
andrewlewis
1afba9676e Fix debug frame showing through player on old devices
PiperOrigin-RevId: 428524300
2022-02-17 10:38:13 +00:00
andrewlewis
6adf2f8c91 Improve transformer activity layout
On Samsung S21 with light theme the debug labels weren't showing up because the player view was visible (with a black background) while the transformation was in progress, matching the debug label text color. Hide the player view until the transformation is complete to fix this.

Also tweak the layout slightly to add space between the card border and the labels.

#mse-bug-week

PiperOrigin-RevId: 428455824
2022-02-17 10:31:56 +00:00
huangdarwin
b5ed01d479 Transformer GL: Implement auto-scaling to preserve input frame.
PiperOrigin-RevId: 427982223
2022-02-17 10:21:59 +00:00
samrobinson
403d92a4d4 Output from the Transformer the average audio & video bitrates.
PiperOrigin-RevId: 426956151
2022-02-08 10:27:15 +00:00
ibaker
4e3d15be87 Remove deprecated ActionFile and ActionFileUpgradeUtil
#minor-release

PiperOrigin-RevId: 426868933
2022-02-07 11:44:22 +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
huangdarwin
ab0cbbea47 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-01 18:23:39 +00:00
hschlueter
aec92606a8 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-01 18:22:27 +00:00
tonihei
c5b7e7b258 Fix session demo gradle build when used with a prefix
#minor-release

PiperOrigin-RevId: 425613253
2022-02-01 18:20:19 +00:00
olly
f28de9de60 Rewrite EventLogger to use new track APIs
PiperOrigin-RevId: 425595951
2022-02-01 14:35:06 +00:00
andrewlewis
dd83eca7d4 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-01 14:30:16 +00:00
andrewlewis
195d05dabd 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:08:57 +00:00
andrewlewis
ce4a028829 Publish the transformer demo app
PiperOrigin-RevId: 424850283
2022-01-28 16:48:06 +00:00
olly
d2cc14a98b Fix some lint warnings
PiperOrigin-RevId: 424383900
2022-01-28 08:46:46 +00:00
olly
47fd32f1d4 Fix spurious unsupported tracks toast in demo apps
PiperOrigin-RevId: 424062588
2022-01-25 19:22:30 +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
b1533980a8 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-25 18:15:53 +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
christosts
63a32e85c5 Session demo: update playlist add/remove icons
PiperOrigin-RevId: 421256149
2022-01-25 17:53:42 +00:00
christosts
152e986c09 Fix typo
PiperOrigin-RevId: 421036800
2022-01-25 17:48:24 +00:00
bachinger
f06c79e441 Merge pull request #24 from PaulWoitaschek:patch-1
PiperOrigin-RevId: 419827570
2022-01-11 13:22:37 +00:00
ibaker
34a1f884dc 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-05 10:51:41 +00:00
tonihei
40d9838315 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
2022-01-05 10:41:06 +00:00
ibaker
691f9c50cf Migrate usages of deprecated MediaSourceFactory methods
PiperOrigin-RevId: 417428182
2022-01-05 10:40:02 +00:00
ibaker
9dae5fd2c0 Rename PlayerView to LegacyPlayerView in media3
The old name is kept in exoplayer2.

PiperOrigin-RevId: 417378759
2022-01-05 10:38:50 +00:00
ibaker
a24ffbd21b Fix StyledPlayerControlView reference in demo app's PlayerActivity
PiperOrigin-RevId: 416809105
2022-01-05 10:31:28 +00:00
ibaker
35bd0f46a4 Update the session demo app to refer to exo_styled drawables
This app uses the StyledPlayerView, so it should use the styled_
drawables.

PiperOrigin-RevId: 416315889
2022-01-05 10:14:25 +00:00
Paul Woitaschek
b28f5ca413
Refactor unintuitive lateinit usage 2021-12-28 22:54:19 +01:00
olly
6cc7d058a8 Remove stray test stream
PiperOrigin-RevId: 415516400
2021-12-10 16:03:49 +00:00
tonihei
422a003a03 Add some correctness checks to min/max live latency values.
For DASH manifests, we merge min/max live latency values from various
sources and they may not be consistent with each other. To ensure we
use a sensible configuration in all cases, we can add more correctness
checks:
 1. Limit the min/max values to fall into the available live window.
 2. Ensure that maxLatency >= minLatency in all cases.

Issue: google/ExoPlayer#9750
PiperOrigin-RevId: 415282938
2021-12-10 11:22:02 +00:00
Ian Baker
1a1d27aee6 Merge pull request #6 from dturner:add-artwork-images
PiperOrigin-RevId: 411524337
2021-11-22 17:21:14 +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
67a0e6d11c Fix javadoc reference to StyledPlayerView in cast demo app
This should have been done in
21e659ef8e

PiperOrigin-RevId: 411073049
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
21e659ef8e 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-19 15:05:55 +00:00
olly
3b11822fa1 Add backwards compatibility with MediaBrowserService
PiperOrigin-RevId: 409290492
2021-11-19 14:43:22 +00:00
olly
fea552e709 Update dependency versions
Note: Updating androidxTestTruthVersion is required tot
arget API level 31.
PiperOrigin-RevId: 409167744
2021-11-19 14:42:25 +00:00
Don Turner
05a4526e61 Display album artwork in media notifications 2021-11-17 20:12:10 +00:00
ibaker
a06eb54b50 Remove usages of ParserException from the demo app
PiperOrigin-RevId: 408311942
2021-11-09 10:10:11 +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