Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev v2 #11142

Closed
wants to merge 3,534 commits into from
Closed

Dev v2 #11142

wants to merge 3,534 commits into from

Conversation

Rhenygee
Copy link

Test

tonihei and others added 30 commits April 5, 2023 11:30
And also mention a few restrictions regarding legacy components
in Javadoc.

#minor-release

Issue: androidx/media#293
PiperOrigin-RevId: 522005562
If the duration is reported in MediaMetadataCompat, it should
also be set in the QueueTimeline to match controller.getDuration()

PiperOrigin-RevId: 522022953
PiperOrigin-RevId: 522039856
PiperOrigin-RevId: 522039856
`sed` has a different in-place command line syntax in FreeBsd
than GNU tools. This change makes the `sed` commands work with
FreeBSD `sed` on OSX in bash and zsh shells.

Issue: androidx/media#217
PiperOrigin-RevId: 522043938
`sed` has a different in-place command line syntax in FreeBsd
than GNU tools. This change makes the `sed` commands work with
FreeBSD `sed` on OSX in bash and zsh shells.

Issue: androidx/media#217
PiperOrigin-RevId: 522043938
* Add a new event `onAudioCapabilitiesChanged` in `AudioSink.Listener` interface.
* Add an interface `RendererCapabilities.Listener`, which will listen to `onRendererCapabilitiesChanged` events from the renderer.
* Add `getRendererCapabilitiesReceiver` method for `TrackSelector`, and register/unregister the `TrackSelector` as the `RendererCapabilitiesReceiver` (if implemented) when the `ExoPlayer` is initialized/released.
* Trigger the `AudioSink.Listener.onAudioCapabilitiesChanged` and further `RendererCapabilities.Listener.onRendererCapabilitiesChanged` events when the audio capabilities changes are detected in `DefaultAudioSink`.

PiperOrigin-RevId: 521427567
This ensures that anybody implementing `Player` (which is relatively
unusual) must override at least one `@UnstableApi` method, and therefore
opt-in to the unstable API.

PiperOrigin-RevId: 521769675
Need to use NAL unit util methods in muxer module.

PiperOrigin-RevId: 521772831
PiperOrigin-RevId: 521790733
NPE in toneMap_hlgFrame_matchesGoldenFile and toneMap_pqFrame_matchesGoldenFile was created because a uEnableColorTransfer uniform was being created on the HDR path, when HDR shader files don't have this uniform. (they don't support disable color transfers right now)

Fix: only create the uniform when input is SDR.

manually tested on failing tests

PiperOrigin-RevId: 522002603
The button gets only updated after an onTracksChanged callback but
isn't set to the initial state similar to other changes triggered
by callbacks (e.g. updateRepeatSwitchUI)

PiperOrigin-RevId: 522274800
This change improves `ImaUtil.maybeCorrectPreviouslyUnknownAdDuration` to
handles the case when the timeline moves forward more than a single period
while an ad group with unknown period duration is being played.

PiperOrigin-RevId: 522292612
To set the chroma format and depth information for H265 format,the csd-0 data
needs to be parsed. The previous implementation skipped parsing
csd-0 data and hard coded values based on "profile" field in MediaFormat.

Along with above mention changes, corrected some of the comments
as per spec.

PiperOrigin-RevId: 522335595
There is a race with the ad period preparation having completed
and `onDownstreamFormatChanged` being called when a live stream
is joined in an ad period. In this case the stream event metadata
of the period is immediately emitted and causing an ad media period
being created that is selected in `getMediaPeriodForEvent` before
being prepared (1 out of 4).

Using an `isPrepared` flag makes sure we don't hand out the media
period to early in `getMediaPeriodForEvent`.

PiperOrigin-RevId: 522340046
Before this CL, SurfaceTexture.onFrameAvailable was used to tell whether a frame
was available in the VideoFrameProcessor's output texture. This was incorrect, as
it would rely on having the texture be written to before the
SurfaceTexture.onFrameAvailableListener is invoked, leading to null-pointer-
exceptions on timeouts.

Instead of using DefaultVideoFrameProcessor different interfaces to set that we
want to output to a texture, and get that output texture, use one interface that
sets a listener, and renders to a texture iff that listener is set. As this
listener is executed on the GL thread, this also allows us to no longer need to
expand visibility for the GL task executor and tasks.

PiperOrigin-RevId: 522362101
This javadoc is also clear from the Builder.setEnableColorTransfers javadoc, so omit it here to avoid duplication.

PiperOrigin-RevId: 522404884
Turns out these could have been private, so not sure why they were public.

PiperOrigin-RevId: 522545698
This change improves `ImaUtil.maybeCorrectPreviouslyUnknownAdDuration` to
handles the case when the timeline moves forward more than a single period
while an ad group with unknown period duration is being played.

PiperOrigin-RevId: 522292612
To set the chroma format and depth information for H265 format,the csd-0 data
needs to be parsed. The previous implementation skipped parsing
csd-0 data and hard coded values based on "profile" field in MediaFormat.

Along with above mention changes, corrected some of the comments
as per spec.

PiperOrigin-RevId: 522335595
pengbins and others added 27 commits April 25, 2023 09:15
This implicitly fixes a bug by removing the buggy implementation in H265Reader in favour of a working one. This change also adds tests to confirm the parsing bug is fixed.
To consistent with the other callsites of NalUnitUtil for parsing H265 SPS
Also clean-up a comment about skipping the NAL start code
PiperOrigin-RevId: 526595567
*** Original commit ***

Rollback of f92a9a6

*** Original commit ***

Bump Guava version to 31.1

***

***

PiperOrigin-RevId: 526601244
Previously, I assumed that SDR contents must be BT709, and HDR contents must be
BT2020. Turns out BT2020 is just wide-gamut, and SDR contents / transfers may be
represented in BT2020 color spaces.

Relax the check, so that we don't throw when valid BT2020 SMPTE 170M contents
are input into effects.

PiperOrigin-RevId: 526668347
PiperOrigin-RevId: 526683141
And minor fixes.

PiperOrigin-RevId: 526717927
The production code changes are in transformer, but the tests in effect have also been updated to confirm the is no color regression `inputColorInfo.colorTransfer=C.COLOR_TRANSFER_SRGB`

PiperOrigin-RevId: 526950435
This was only used in EncoderWrapper, so move createSupportedTransformationRequest
from VideoSamplePipeline to EncoderWrapper to reduce its scope.

PiperOrigin-RevId: 527226578
The only dependencies that are not updated are the ones that need
to be kept in sync with other system (like Android source tree) or
would require a Kotlin dependency in common or exoplayer modules.

As a side effect, some demo apps now need a Kotlin config and some
additional modules require desugaring/multidex logic. To simplify
the setup, the desugaring and multidex steps are added to the common
config.

PiperOrigin-RevId: 527243950
Allow the VideoFrameProcessor to output to a texture without an output surface.

Tested by updating texture output tests to no longer output to a surface.

PiperOrigin-RevId: 527244605
This ensures the logic is consistent and can also be easily
used from custom UIs.

PiperOrigin-RevId: 527249127
In ASwB, all Transformer tests can be run by right-clicking on the project and
clicking "Run all tests". We cannot, however, select only some specific test
files within a project (ex. all non-analysis tests) to run tests on.

Add @ignore to analysis tests, which are not intended to be run anyways
when determining whether Transformer is working on some device. These
tests also don't have proper skipping logic when a device doesn't support a
format, so they can't be run effectively on low-end devices anyways.

This eases manual testing, for example when debugging whether tests all pass
on a device.

When analysis tests are desired to be run, it should be easy to comment out
the @ignore.

PiperOrigin-RevId: 527289600
This partially reverts 9842fba
because our tests fail with 4.10 with an error like:

```
ShadowActivityThread.reset: ActivityThread not set
java.lang.NullPointerException: ShadowActivityThread.reset: ActivityThread not set
	at java.base/java.util.Objects.requireNonNull(Objects.java:246)
	at org.robolectric.shadows.ShadowActivityThread.reset(ShadowActivityThread.java:284)
	at org.robolectric.Shadows.reset(Shadows.java:2665)
	at org.robolectric.android.internal.AndroidTestEnvironment.resetState(AndroidTestEnvironment.java:657)
	at org.robolectric.RobolectricTestRunner.lambda$finallyAfterTest$0(RobolectricTestRunner.java:370)
	at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:86)
	at org.robolectric.RobolectricTestRunner.finallyAfterTest(RobolectricTestRunner.java:368)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:298)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:830)
```

It looks like the code throwing this exception is new in Robolectric
4.10:
robolectric/robolectric@65654a7

PiperOrigin-RevId: 527290033
glFinish should be called before reading from a texture, to make sure it's been
properly rendered to.

PiperOrigin-RevId: 527302946
Add `VideoFrameProcessor.registerInputStream()` to signal a new type of input.

And `InputHandler.signalEndOfCurrentInputStream()` to signal to `InputHandler`
partial input stream completion.

Fully processed means after FinalShaderProgramWrapper releases the last frame.

PiperOrigin-RevId: 527356646
@marcbaechinger
Copy link
Contributor

If you want to contribute please use the androidx/media repository and send your PR against the main branch. Thanks.

@google google locked and limited conversation to collaborators Jul 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet