Skip to content

Merge latest code from androidx/media main branch#8

Merged
ybai001 merged 5110 commits intoDolbyLaboratories:dlb/ac4-level4/dev_new2from
androidx:main
Apr 11, 2024
Merged

Merge latest code from androidx/media main branch#8
ybai001 merged 5110 commits intoDolbyLaboratories:dlb/ac4-level4/dev_new2from
androidx:main

Conversation

@ybai001
Copy link
Copy Markdown

@ybai001 ybai001 commented Apr 11, 2024

No description provided.

icbaker and others added 30 commits February 13, 2024 10:26
PiperOrigin-RevId: 607117264
The original change missed copying the newly added flag in `buildUpon()`, which
caused some test flakes.

PiperOrigin-RevId: 607232373
PiperOrigin-RevId: 607264513
PiperOrigin-RevId: 607319987
The behaviour and docs of `playUntilPosition` were changed in
00c7a9b.

This change also affects `playUntilStartOfMediaItem` (since it delegates
to `playUntilPosition`), so the same doc change should also be made
here.

#minor-release

PiperOrigin-RevId: 607364897
This change:
1. Updates the implementation of
   `FrameworkMediaDrm.requiresSecureDecoder` to include the
   'force allow insecure decoder' workaround logic.
2. Removes the 'force allow insecure decoder' logic from MCR
3. Removes the `requiresSecureDecoder` field from MCR (it can just
   be a local derived from `codecDrmSession` now).

PiperOrigin-RevId: 607664186
Fixes an issue caused by no support for negative audio PTS and edit lists
in FrameworkMuxer, Android versions before 11

PiperOrigin-RevId: 607690507
These were previously somewhat supported, but the `package` part was
never read (so it only worked if it was either absent or the same as the
current application's package). This change parses and uses the
`package` part.

This partially reverts 35121a2.

This is hard to test for the same reasons as 88f554c:

> This is hard to test because to do so robustly requires being able to guaranteed that another test APK will be installed with a known raw resource inside it.

PiperOrigin-RevId: 608270463
PiperOrigin-RevId: 608275835
There is no super test which covers whole MP4 structure.
In all the E2E test, it verified against `ExtractorOutput` which
would remain same if there are changes in the box structure.

PiperOrigin-RevId: 608310006
PiperOrigin-RevId: 608377195
PiperOrigin-RevId: 608551290
PiperOrigin-RevId: 608556329
When applying edit lists, we need to output the last partial samples
to have all the necessary data needed for rendering.

The only case where we can omit the sample is for zero duration
audio data that has no additional information.

The current comment and variable name doesn't make this very clear
and this change improves the naming and the comment.

PiperOrigin-RevId: 608579746
PiperOrigin-RevId: 608580903
PiperOrigin-RevId: 608588505
MediaCodec docs already allude to potentially mismatching H.264 level
between container and bitstream. Relax the initialization data check to
reflect this.

PiperOrigin-RevId: 608942322
tof-tof and others added 29 commits April 3, 2024 11:27
Makes OverlayFrameAnchor works as described in the OverlaySettings documentation. Currently the code does the opposite e.g setting the anchor to (+1,-1) makes the code anchor to the top left rather than the bottom right.

PiperOrigin-RevId: 621585558
#minor-release

PiperOrigin-RevId: 621828038
PiperOrigin-RevId: 621863325
This API additions help an app to implement the lifecycle of a MediaSessionService
properly and in consistency with the `MediaSessionService` being in the foreground
or not.

Not properly implementing `onTaskRemoved` is the main reason for crashes and
confusion. This change provides `MediaSessionService` with a default
implementation that avoids crashes of the service. This default implementation
uses the new API provided with this change just as an app can do.

Issue: #1219
PiperOrigin-RevId: 621874838
The `MediaSourceManager` is removed and its functionalities are replaced by `DefaultPreloadManager`.

PiperOrigin-RevId: 621884502
The join mode is used for two cases: surface switching and mid-playback
enabling of video.

In both cases, we want to pretend to be ready despite not having rendered
a new "first frame". So far, we also avoided force-rendering the first
frame immediately because it causes a stuttering effect for the
mid-playback enable case. The surface switch case doesn't have this
stuttering issue as the same codec is used without interruption. Not
force-rendering the frame immediately causes the first-frame rendered
callback to arrive too early though, which may lead to cases where
apps hide shutter views too quickly.

This problem can be solved by only avoiding the force-render for the
mid-playback enabling case, but not for the surface switching case.

PiperOrigin-RevId: 622105916
This change makes sure the `DefaultLoadControl` would work
when passed to multiple players. It makes sure and unit tests
that the loading state of a player is maintained for each player
that is using `DefaultLoadControl`.

The targetBufferSize of the `DefaultAllocator` is increased
linearly for each player and memory is allocated in a simple
first-come-first-serve manner.

PiperOrigin-RevId: 622126523
Both `remove(MediaItem)` and `remove(MediaSource)` return a boolean suggesting that whether the preload manager is holding the corresponding `MediaSource` and it has been removed.

PiperOrigin-RevId: 622185427
PiperOrigin-RevId: 622211426
PiperOrigin-RevId: 622292092
The androidx.media library is only used for its compat MediaStyle.
On API 21 and above, the logic can be easily inlined, and only
on API < 21, the androidx.media handling can be used.

This allows to remove the androidx.media dependency completely
once the minSdk has been increased to 21.

PiperOrigin-RevId: 622855469
PiperOrigin-RevId: 622866208
In offloaded audio playback, the `DefaultAudioSink` should use the `AudioTrack.StreamEventCallback` `onPresentationEnded` to note whether the AudioTrack has completed playing all pending data.

PiperOrigin-RevId: 622885399
This is an internal name for the exoplayer2 `PlayerView` that was never
published as part of media3.

PiperOrigin-RevId: 623120907
Compared to `release`, the `reset` method doesn't release the preload manager instance. This applies to the use case that an app wants to discard all the sources but keep the preload manager active for later usage.

Also rename the `releaseSourceInternal` to `removeSourceInternal`, as the latter sounds more generic for different preload manager implementations.

PiperOrigin-RevId: 623148723
Reduces flakiness of tests that assert on PCM audio. Tests now have to
clearly choose how they want the capturing muxer to handle pcm audio.

Note that the only dump files that have changed are those that deal
with PCM audio (.wav, sowt, twos, silence). Because of the continuous
nature of PCM, timestamps are not part of the dump.

PiperOrigin-RevId: 623155302
#minor-release

PiperOrigin-RevId: 623158370
#minor-release

PiperOrigin-RevId: 623185060
PiperOrigin-RevId: 623186293
When delegating EMSG samples in `HlsSampleStreamWrapper`,
the offset passed into `sampleMetadata(..)` of the delegate
`TrackOutput` must be zero because it is called immediately
after `sampleData(..)` is called.

The condition to trigger this issue is that more than one
metadata samples are pending in `pendingMetadataSampleInfos`
of `FragmentedMp4Extractor` which produces non-zero offsets.

Issue: #1002
Issue: #1203
PiperOrigin-RevId: 623210835
This removes the TODOs without updating the links, because the
DAC-hosted images are not co-located with the hosted javadoc (unlike
when these images were referenced on exoplayer.dev before 1034250),
and therefore we would need to include the full path anyway, at which
point it seems clearer and more robust to keep using a fully-qualified
URL with the domain too.

PiperOrigin-RevId: 623452217
This methods doesn't need to be non-static, and can have less state assumed if static

PiperOrigin-RevId: 623466017
@ybai001 ybai001 merged commit b8c559e into DolbyLaboratories:dlb/ac4-level4/dev_new2 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet