17426 Commits

Author SHA1 Message Date
kimvde
43aace03cf Make setResolution package private
- Usages in 1P apps have been removed.
- setResolution should be removed when refactoring fallback.

PiperOrigin-RevId: 505043425
2023-02-01 10:20:19 +00:00
kimvde
c3934c532c Move flattenForSlowMotion to EditedMediaItem
PiperOrigin-RevId: 504867150
2023-02-01 10:19:24 +00:00
huangdarwin
697f84161d Test: Rename pixel tests for golden.
producesExpectedOutput -> matchesGoldenFile

PiperOrigin-RevId: 504863604
2023-02-01 10:18:29 +00:00
huangdarwin
76eb2d4f59 Effect: Move FrameProcessorTestRunner to test-utils.
This is necessary in order to move HDR to SDR tone-mapping tests to transformer/mh.

PiperOrigin-RevId: 504858508
2023-02-01 10:17:36 +00:00
huangdarwin
2360f1f5a3 Effect: Reword GlEffectsFrameProcessor javadoc.
PiperOrigin-RevId: 504847212
2023-02-01 10:16:34 +00:00
huangdarwin
b251b8db09 Effect: Clarify FrameProcessingException javadocs.
This is confusing, since the effect is used not only when applying an effect, but also when preparing an effect (ex. in a texture processor's constructor), so we should also mention that case.

PiperOrigin-RevId: 504843598
2023-02-01 10:15:39 +00:00
tofunmi
1a416b17b5 Update max overlays in one OverlayTextureProcessor
Tested adding 3, 15,16 different overlays in a single OverlayTextureProcessor. The program errored out when 16 overlays were added.

PiperOrigin-RevId: 504810157
2023-02-01 10:14:38 +00:00
huangdarwin
a5d43b2194 Effect: Clarify that padding is added in ScaleToFitTransformation.
PiperOrigin-RevId: 504796380
2023-02-01 10:13:45 +00:00
claincly
0874c1e795 Make sure first frame has effects applied.
`FrameProcessorManager` now reports it's not ready when the output surface is set but not the output resolution. `FrameProcessorManager` allows playback without an output surface, like with ExoPlayer.

PiperOrigin-RevId: 504626088
2023-02-01 10:12:50 +00:00
samrobinson
a5a59df44c Move audio buffer/array test utility methods to TestUtil.
PiperOrigin-RevId: 504611069
2023-02-01 10:11:54 +00:00
huangdarwin
86b629fff8 Effect: Decouple GlEffectsFrameProcessorTestRunner from GLEffects.
This is necessary in order to move HDR to SDR tone-mapping tests to transformer/mh,
and to move the test runner to androidx.media3.test-utils, which should not have to
include androidx.media3.effects.

PiperOrigin-RevId: 504607929
2023-02-01 10:10:57 +00:00
lemondoglol
b65baf7d72 make merged segment size configurable 2023-01-30 13:15:10 -05:00
samrobinson
728619018b Move audio buffer/array test utility methods to TestUtil.
PiperOrigin-RevId: 504611069
2023-01-25 20:37:34 +00:00
huangdarwin
a2521bff07 Effect: Decouple GlEffectsFrameProcessorTestRunner from GLEffects.
This is necessary in order to move HDR to SDR tone-mapping tests to transformer/mh,
and to move the test runner to androidx.media3.test-utils, which should not have to
include androidx.media3.effects.

PiperOrigin-RevId: 504607929
2023-01-25 20:33:24 +00:00
tonihei
2d7ddccebb Add missing command checks in UI module
The commands are partly checked already before enabling
features or calling player methods, but the checks were
still missing in many places.

#minor-release

PiperOrigin-RevId: 504589888
2023-01-25 20:29:23 +00:00
kimvde
5ed72efbe0 Move removeAudio/Video to EditedMediaItem
Also add a Builder to EditedMediaItem to avoid having a constructor with
many optional parameters, or a chain of constructors.

PiperOrigin-RevId: 504588544
2023-01-25 20:25:23 +00:00
huangdarwin
5d04d38d35 Test: Rename FrameProcessor Pixel Tests.
Rename tests using the action state expectation pattern.

PiperOrigin-RevId: 504546583
2023-01-25 20:21:27 +00:00
ibaker
f083ff264d Document two limitations with subtitle sideloading
#minor-release

PiperOrigin-RevId: 504517946
2023-01-25 20:17:17 +00:00
huangdarwin
4c9538bd4c Effect: Clarify OpenGL configuration.
This information may be needed for applications to create their own OpenGL contexts
and textures passed into or interacting with Effects.

PiperOrigin-RevId: 504342258
2023-01-25 20:13:10 +00:00
christosts
f86948f01c Suppress warnings in ImaUtil
ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden,
which causes lint errors with gradle.

#minor-release

PiperOrigin-RevId: 504306210
2023-01-25 20:09:04 +00:00
christosts
4c1be4c7a1 Minor fix in transforming-media.md
#minor-release

PiperOrigin-RevId: 504281747
2023-01-25 20:04:53 +00:00
huangdarwin
b2d9354951 Effect: Clarify GlEffect javadoc exception cause.
PiperOrigin-RevId: 504273335
2023-01-25 20:00:48 +00:00
samrobinson
7abbd6aa1f Use EMPTY_BUFFER in SpeedChangingAudioProcessorTest.
PiperOrigin-RevId: 504264862
2023-01-25 19:56:51 +00:00
tofunmi
fb074e1823 correct comments in fragment_shader.
PiperOrigin-RevId: 504259419
2023-01-25 19:53:00 +00:00
samrobinson
a010ebf7b6 Consolidate TransformationResult.transformationException test usage.
PiperOrigin-RevId: 504257627
2023-01-25 19:48:31 +00:00
andrewlewis
1f9a33279e Add a way to specify default buffer size
Based on experimentation, when CameraX is producing input for frame processor the buffer size is not being set to match the camera capture resolution, so the output has lower resolution than expected. Expose the default buffer size setter on `SurfaceTexture` to allow apps to process frames at full resolution for use cases like this one where the producer doesn't override the default buffer size.

PiperOrigin-RevId: 504022107
2023-01-25 19:44:29 +00:00
tonihei
e2ece2f5bc Add missing command checks in UI module
The commands are partly checked already before enabling
features or calling player methods, but the checks were
still missing in many places.

#minor-release

PiperOrigin-RevId: 504589888
2023-01-25 18:48:15 +00:00
kimvde
e8ffc7b6f8 Move removeAudio/Video to EditedMediaItem
Also add a Builder to EditedMediaItem to avoid having a constructor with
many optional parameters, or a chain of constructors.

PiperOrigin-RevId: 504588544
2023-01-25 18:47:18 +00:00
ibaker
50beec56f4 Add missing } to publish.gradle
This was missed in 47349b8c4b

#minor-release

PiperOrigin-RevId: 504548659
2023-01-25 18:46:26 +00:00
huangdarwin
ea629bec83 Test: Rename FrameProcessor Pixel Tests.
Rename tests using the action state expectation pattern.

PiperOrigin-RevId: 504546583
2023-01-25 18:45:31 +00:00
ibaker
47349b8c4b Publish gradle attributes for AndroidX compatibility
These attributes are required when importing our artifacts into
androidx-main in order to generate reference documentation (JavaDoc and
KDoc).

#minor-release

PiperOrigin-RevId: 504502555
2023-01-25 18:44:39 +00:00
huangdarwin
b359502a13 Effect: Clarify OpenGL configuration.
This information may be needed for applications to create their own OpenGL contexts
and textures passed into or interacting with Effects.

PiperOrigin-RevId: 504342258
2023-01-25 18:43:44 +00:00
tonihei
067340cb0a Filter available commands based on PlaybackStateCompat actions
This allows a MediaController to understand which methods calls
are available on a legacy session.

PiperOrigin-RevId: 504306806
2023-01-25 18:42:51 +00:00
christosts
5f6e172c8f Suppress warnings in ImaUtil
ImaUtil calls VideoProgressUpdate.equals() which is annotated as hidden,
which causes lint errors with gradle.

#minor-release

PiperOrigin-RevId: 504306210
2023-01-25 18:41:55 +00:00
huangdarwin
301683a831 Effect: Clarify GlEffect javadoc exception cause.
PiperOrigin-RevId: 504273335
2023-01-25 18:40:54 +00:00
michaelkatz
7fbdbeb6ca Deduplicate onSetMediaItem handler logic
Created unified MediaUtils method to handle various logic for calling Player.setMediaItems from MediaSessionStub and MediaSessionLegacyStub

PiperOrigin-RevId: 504271877
2023-01-25 18:39:56 +00:00
samrobinson
030edb0e4a Use EMPTY_BUFFER in SpeedChangingAudioProcessorTest.
PiperOrigin-RevId: 504264862
2023-01-25 18:39:01 +00:00
tofunmi
7864d327e8 correct comments in fragment_shader.
PiperOrigin-RevId: 504259419
2023-01-25 18:38:04 +00:00
samrobinson
18f8e9115f Consolidate TransformationResult.transformationException test usage.
PiperOrigin-RevId: 504257627
2023-01-25 18:37:02 +00:00
andrewlewis
b85109e700 Add a way to specify default buffer size
Based on experimentation, when CameraX is producing input for frame processor the buffer size is not being set to match the camera capture resolution, so the output has lower resolution than expected. Expose the default buffer size setter on `SurfaceTexture` to allow apps to process frames at full resolution for use cases like this one where the producer doesn't override the default buffer size.

PiperOrigin-RevId: 504022107
2023-01-25 18:36:02 +00:00
christosts
5147011772 Add missing # in release notes
#minor-release

PiperOrigin-RevId: 504013985
2023-01-25 18:35:01 +00:00
kimvde
fdf866617f Undo unreleased changes from transforming-media.md
The "Transforming media" page has been updated with changes that won't
be part of the next release. Undo these changes so that this page is
consistent with the latest release.

PiperOrigin-RevId: 503917637
2023-01-23 13:56:57 +00:00
samrobinson
f440fea738 Move AudioMixer classes from transformer.audio to transformer package.
Transformer convention has been to avoid splitting into packages unless
necessary.

See https://jlbp.dev/JLBP-2: "Prefer fewer packages over more packages
to avoid unnecessarily publicizing internal details, since any
dependency across package boundaries needs to be public.

PiperOrigin-RevId: 503463294
2023-01-23 13:52:28 +00:00
samrobinson
fcc994b825 Rename FloatResamplingAudioProcessor to ToFloatPcmAudioProcessor.
Resampling as a term is overloaded, however it was raised as a
confusing term in a meeting recently, as the 1P team initially thought
this would change the sample rate. The naming of this `AudioProcessor`
now matches `ToInt16PcmAudioProcessor`.

PiperOrigin-RevId: 503441019
2023-01-23 13:48:05 +00:00
huangdarwin
641f04774f HDR: Clarify media3.effect hdrStaticInfo / colorRange support.
Clarify that we always output on full range colors, and don't handle
hdrStaticInfo input yet.

PiperOrigin-RevId: 503224687
2023-01-23 13:43:43 +00:00
kimvde
c09f610847 Rollback of ad51d1ca87
*** Original commit ***

Fix "Transforming media" page

Some information there is not correct anymore.

***

PiperOrigin-RevId: 503196165
2023-01-23 13:39:19 +00:00
samrobinson
3055de94ac Don't use transformationResult with timeout/unexpected exceptions.
PiperOrigin-RevId: 503187291
2023-01-23 13:34:51 +00:00
ibaker
aa23920e14 Explicitly document most Player.Listener methods in terms of getters
This makes it implicitly clear that if the value of a getter changes due
to a change in command availability then the listener will be invoked,
without needing to explicitly document every command on every listener
method.

#minor-release

PiperOrigin-RevId: 503178383
2023-01-23 13:30:32 +00:00
kimvde
ad51d1ca87 Fix "Transforming media" page
Some information there is not correct anymore.

PiperOrigin-RevId: 503141754
2023-01-23 13:26:08 +00:00
kimvde
4f6b83e2c3 Remove usages of deprecated startTransformation
PiperOrigin-RevId: 503138745
2023-01-23 13:21:42 +00:00