20446 Commits

Author SHA1 Message Date
sheenachhabra
b4e6b9a694 Update java doc for processedInputs field
PiperOrigin-RevId: 619902389
2024-03-28 06:08:22 -07:00
tofunmi
272fada10e Signal assetloader output format in image case
the output format conatins key information about the output of the assetloader being hdr, so we must signal the output format, not the input format to the sample exporter

fixes mh ultraHdr test failures.
Also discovered images created are very device specfic so got rid of the pixel tests, we have pixel tests in the effects library that cover the same case.

PiperOrigin-RevId: 619899249
2024-03-28 05:56:39 -07:00
ibaker
b60cd2c033 Rollback of e665e2aee8
PiperOrigin-RevId: 619871653
2024-03-28 04:04:01 -07:00
kimvde
04a3889998 Reset maxPositionOfRemovedSources in DefaultAudioMixer
If the mixer is reset without resetting maxPositionOfRemovedSources and
then reused, the value of maxPositionOfRemovedSources can be outdated,
leading to an incorrect number of bytes being output by the mixer.

PiperOrigin-RevId: 619832502
2024-03-28 01:22:25 -07:00
tofunmi
828f6d87f9 Make calculateSpeedAdjustedTime() output monotonically increasing
calculate based on the output of consecutive calls rather than the speed provider speed change point to ensure the timestamps are monotonically increasing.

PiperOrigin-RevId: 619584001
2024-03-27 10:55:59 -07:00
Copybara-Service
8fe70332ee Merge pull request #1054 from jekopena:main
PiperOrigin-RevId: 619573181
2024-03-27 10:24:32 -07:00
sheenachhabra
55289b4392 Rename BasicMp4Writer to Mp4Writer
PiperOrigin-RevId: 619560211
2024-03-27 09:44:42 -07:00
ibaker
d684cdb330 Add PlayerView.setControllerAnimationEnabled(boolean)
Issue: androidx/media#1227
PiperOrigin-RevId: 619558900
2024-03-27 09:40:09 -07:00
ibaker
ebfd540817 Fix javadoc on PlayerView.setControllerVisibilityListener
#minor-release

PiperOrigin-RevId: 619536799
2024-03-27 08:20:38 -07:00
sheenachhabra
58e8300ea2 Make isMetadataSupported method public
Moved few other public methods from `Mp4Utils` class into the
corresponding classes which needs them.

PiperOrigin-RevId: 619535658
2024-03-27 08:16:37 -07:00
sheenachhabra
66547cc331 Remove Mp4Writer interface
Since the public class has already been split into `Mp4Muxer` and
`FragmentedMp4Muxer`, there is no need for having common interface
for internal implementation.

In the follow up CL `BasicMp4Writer` will be renamed to `Mp4Writer`
which is more appropriate and aligns with public class names.

PiperOrigin-RevId: 619486876
2024-03-27 04:28:07 -07:00
jbibik
5a318deb40 Downgrade kotlin plugin version to 1.9.0
Earlier upgrade in 276e0655f4 was too high, since Android Studio Iguana is still bundled with Kotlin plugin with version `232-1.9.0-release-358-AS10227`. The result of the mismatched plugin is a build failure like:

`Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is XXX`

Although according to https://plugins.jetbrains.com/plugin/6954-kotlin, the 1.9.23 is already available. So we will be able to upgrade again soon.

Version 1.9.0 is still good enough for the compose compiler to be 1.5.0+ according to https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility

PiperOrigin-RevId: 619278402
2024-03-26 12:43:44 -07:00
huangdarwin
24e1796c50 Effect: Improve setEnableColorTransfers javadoc.
PiperOrigin-RevId: 619250163
2024-03-26 11:15:34 -07:00
ibaker
7a105e0e57 Fix XingSeeker @param tags - follow-up to 4fde35c9cc
PiperOrigin-RevId: 619249887
2024-03-26 11:11:58 -07:00
tianyifeng
8f2f3bb7e4 Allow target preload status to be null to indicate not to preload
PiperOrigin-RevId: 619246259
2024-03-26 11:03:10 -07:00
kimvde
98dac54816 Fix negative position for clipped media
With this CL:
- The large timestamp offset added by ExoPlayer so that decoders
don't see any negative timestamps is removed before passing the
timestamp to the AudioGraph.
- Clipped media timestamps are offset by the clipping start position
before being passed to the AudioGraph.
- The offset added to the audio buffer timestamps is removed when
computing the audio sink position, to convert them back to the
timestamps passed by the player.

PiperOrigin-RevId: 619225990
2024-03-26 10:05:11 -07:00
sheenachhabra
8d65b75185 Rename setFragmentedMp4Enabled to setOutputFragmentedMp4
PiperOrigin-RevId: 619216854
2024-03-26 09:34:23 -07:00
sheenachhabra
8eb1390f80 Create FragmentedMp4Muxer class
This CL aims to separate Fragmented MP4 related logic in a separate public class.
Earlier all the logic was in a single class `Mp4Muxer`.

PiperOrigin-RevId: 619206661
2024-03-26 09:02:43 -07:00
tonihei
737bf08314 Don't apply performance point workaround from API 35
The workaround check is now part of CTS and we should be able
to rely on the PerformancePoints values (or at least can be sure
that they cover all CDD requirements)

#minor-release

PiperOrigin-RevId: 619201331
2024-03-26 08:42:49 -07:00
tofunmi
f4fefd19f7 Document and test multi asset ultraHDR support
PiperOrigin-RevId: 619200688
2024-03-26 08:39:44 -07:00
ibaker
d00ca1e343 Plumb MP3 average bitrate from metadata frames into Format
Issue: androidx/media#1081

#minor-release

PiperOrigin-RevId: 619185083
2024-03-26 07:40:08 -07:00
tonihei
6e0f8e3b0d Remove decode-only flag
No known component is using this flag anymore and it has been
deprecated for a while for custom renderers and decoders.

PiperOrigin-RevId: 619154299
2024-03-26 05:28:27 -07:00
tofunmi
ef2314c404 Move bitmap decoding out of datasource util
PiperOrigin-RevId: 619139208
2024-03-26 04:10:38 -07:00
tofunmi
65e94480f4 Transformer: add single-asset ultraHDR image to HLG HDR vid transcoding
PiperOrigin-RevId: 619138202
2024-03-26 04:06:41 -07:00
tonihei
0f42dd4752 Use output start time instead of deprecated isDecodeOnly in CeaDecoder
PiperOrigin-RevId: 619133908
2024-03-26 03:47:18 -07:00
andrewlewis
c3c964627f Log internal Transformer lifecycle for debugging
Add logging similar to `ExoPlayerImpl` to make bug reports more useful.

PiperOrigin-RevId: 619117500
2024-03-26 02:31:31 -07:00
ibaker
6cb25119fb In-line versions only used by exoplayer-media2 extension
Also remove an unused `androidxTestServicesStorageVersion` version.

Issue: androidx/media#1216
PiperOrigin-RevId: 618990983
2024-03-25 16:21:29 -07:00
sheenachhabra
2eaece5ed9 Move setMaxDelayBetweenSamplesMs on Transformer builder
This property is transformer specific and does not belong to
muxer interface.
This is to eventually replace muxer interface in Transformer module with
muxer interface in Muxer module.

PiperOrigin-RevId: 618895836
2024-03-25 11:02:15 -07:00
Googler
f4e444bdd2 Internal change
PiperOrigin-RevId: 618879473
2024-03-25 10:12:34 -07:00
tonihei
ab0391167c Include nullness of MediaMetadata.extras in equals method
This ensures MediaMetadata with just non-null extras is not
considered equal to MediaMetadata.EMPTY. This makes sure the
contents are bundled when a controller sets the extras in a
new MediaItem

Issue: androidx/media#1176

#minor-release

PiperOrigin-RevId: 618876642
2024-03-25 10:05:15 -07:00
tonihei
73c0ebb214 Additional clean-up and formatting 2024-03-25 15:02:31 +00:00
ibaker
fd268eed46 Remove unecessary re-setting of group from session Gradle files
These TODOs precede <unknown commit> when the group was set in the top-level
`build.gradle` file.

Issue: androidx/media#1215
PiperOrigin-RevId: 618835040
2024-03-25 07:33:05 -07:00
Juan Carlos Penalver
8673e6d39a Removing label from toLogString. 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
54c23e2856 Reverting changes in gradle-wrapper.properties 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
0a04e7908b Addressing PR feedback. 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
591020065a Adding IllegalStateException to Format build and unit tests. 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
e9e47f4fe6 Removing id from Label and ensuring label/labels consistency in Format.Builder. 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
63fb68e99e Reverting breaking changes by keeping label and adding labels. 2024-03-25 12:00:14 +00:00
Juan Carlos Penalver
df763220c8 Replacing label with a list of Label elements in Format. 2024-03-25 12:00:14 +00:00
ibaker
d997ba367c Rollback of 7cffae9cd0
PiperOrigin-RevId: 618799275
2024-03-25 04:30:55 -07:00
Copybara-Service
c352e2c7b8 Merge pull request #1213 from MGaetan89:update_guava
PiperOrigin-RevId: 618797532
2024-03-25 04:21:53 -07:00
sheenachhabra
483d2bb9e7 Add Muxer interface in muxer module
The immediate plan is to replace `Transformer Muxer interface`
with this one.
It was not straight forward to move/change `Transformer Muxer interface`
hence this intermediate step.
The follow up CL will also remove fragmented MP4 related code from
`Mp4Muxer` and move it into `FragmentedMp4Muxer implements Muxer`.

PiperOrigin-RevId: 618789265
2024-03-25 03:40:15 -07:00
Gaëtan Muller
d66a3032c1 Update Guava to 33.0.0-android
Following the recommendation in `constants.gradle`:
d13a0f4ec6/constants.gradle (L29-L31)

This PR updates Guava to the version used in the Android repository: 33.0.0.

The changelog for Guava 33.0.0 is available [here](https://github.com/google/guava/releases/tag/v33.0.0).
2024-03-22 16:14:41 +00:00
huangdarwin
d165af9a85 Test: Use AssumptionViolatedException for format support detection.
This is the most widely-used test-skipping method I'm aware of, so I figured this
would be a great method to scale usage of AssumptionViolatedException.

PiperOrigin-RevId: 618160931
2024-03-22 06:41:18 -07:00
sheenachhabra
16aac07bce Add support for processing 3 byte NAL start code in Mp4Muxer
Issue: androidx/media#725

Ideally the test to transmux a `ts` file (having 3 bytes NAL start code)
should go into `Mp4MuxerEndToEndTest`but `Mp4MuxerEndToEndTest` uses `MediaExtractor` and `MediaExtractor` is returning samples with `4 byte NAL start code` which will not exercise the newly added code path.
Hence the test is added in `TransformerWithInAppMuxerEndToEndTest` which
internally uses `media3 extractor` and feeds samples with `3 bytes NAL start code`
only.

PiperOrigin-RevId: 617985866
2024-03-21 15:49:12 -07:00
kimvde
6fc4f0263f Add methods required for seek to AudioGraph
Seeking will consist of the following steps:
- Block the AudioGraph input data.
- Flush the AudioGraph.
- Seek the ExoPlayers.
- Unblock the AudioGraph input data.

PiperOrigin-RevId: 617868124
2024-03-21 09:31:51 -07:00
tonihei
ed505df2ca Partial revert of 3a7d31a599
The original change did not set the color info in the codec
for standard SDR infos. This was meant to help with consistency
to avoid a situation where the information is partially set and
later the bitstream provides slightly different values (all in
standard SDR though).

We can revert this part because the bitstream may change anyway
and the decoder needs to handle this internally. And more
importantly, it also avoids removing this information when encoding
the format again in Transformer.

PiperOrigin-RevId: 617582066
2024-03-20 11:51:25 -07:00
sheenachhabra
2491dd07e1 Process all samples before writing them to mdat
This refactoring is required to support 3 byte NAL start code, in which
the sample ByteBuffer might change after AnnexB to Avcc conversion.
This would required changes in the corresponding BufferInfo as well.

PiperOrigin-RevId: 617538338
2024-03-20 09:33:10 -07:00
jbibik
276e0655f4 Upgrade Kotlin version to 1.9.22
This will allow us to use the latest Compose complier version (from https://developer.android.com/jetpack/androidx/releases/compose-kotlin#pre-release_kotlin_compatibility) for the future Compose Demo.

PiperOrigin-RevId: 617509694
2024-03-20 07:44:52 -07:00
tonihei
3a7d31a599 Don't set codec color info for default SDR
Some media can read color info values from the bitstream
and may partially set some of the SDR default values in
Format.ColorInfo. Setting these default values for SDR can
confuse some codecs and may also prevent adaptive ABR
switches if not all ColorInfo values are set in exactly the
same way.

We can avoid any influence of HDR color info handling by
disabling setting the color info MediaFormat keys for SDR
video and also avoid codec reset at format changes if both
formats are SDR with slightly different ColorInfo settings.

To identify "SDR" ColorInfo instances, we need to do some
fuzzy matching as many of the default values are assumed to
match the SDR profile even if not set.

Issue: androidx/media#1158
PiperOrigin-RevId: 617473937
2024-03-20 04:58:13 -07:00