19615 Commits

Author SHA1 Message Date
ibaker
bd7615c0b8 Update recommended way to suppress @UnstableApi errors in lint.xml
#minor-release

PiperOrigin-RevId: 582599098
2023-11-15 02:34:40 -08:00
jbibik
94e45eb4ad Migrate CEA-708 logic to a SubtitleParser implementation
This change is similar to 27caeb8038 (CEA-608), but is currently lacking unit tests.

PiperOrigin-RevId: 582585457
2023-11-15 01:38:56 -08:00
jbibik
b23b1bb693 Add HLS support for parsing TTML subs muxed into MP4 during extraction
This removes the flakiness of the HLS playback test as well.

Previously, this flow only worked for standalone WebVTT subtitles (7b762642db)

PiperOrigin-RevId: 582359383
2023-11-14 10:10:44 -08:00
jbibik
67f770a786 Add HLS playback test with TTML subtitles muxed into MP4
The test is hidden behind the `@Ignore` annotation due to some
flakiness. However, it will be removed when the subtitle parsing is
moved to a pre-sample-queue architecture.

The test media was created with:

```shell
$ cp ../../dash/standalone-ttml/sample.xml sample.ttml
$ MP4Box -add sample.ttml sample.text.mp4
$ MP4Box -frag 10000 sample.text.mp4
$ rm sample.ttml
```

PiperOrigin-RevId: 582347113
2023-11-14 09:31:09 -08:00
tonihei
9bf1852069 Set MIME type from IMA SDK on ads MediaItem
This helps to play ads where the file extension is not sufficient
to deduce the correct source in DefaultMediaSourceFactory.

PiperOrigin-RevId: 582340114
2023-11-14 09:12:07 -08:00
tonihei
03a23bef8f Use full MediaItem to define ad playbacks
Currently, ads are only defined by a single URL, which makes it
impossible to define additional fields needed to play ads correctly.

This can be fixed by using a full MediaItem in AdPlaybackState,
replacing the previous Uri field.

PiperOrigin-RevId: 582331588
2023-11-14 08:35:14 -08:00
huangdarwin
8f69bb0d9d HDR: Update PQ to SDR tone-mapping to renderengine.
Use renderengine's PQ to SDR tone-mapping implementation instead
of naive implementation from before.

This improves luminance on highlights, as seen in the test image.

PiperOrigin-RevId: 582318045
2023-11-14 07:43:39 -08:00
tonihei
b570c72588 Normalize MIME types when accepting user or media input
MIME types are case-insensitive, but none of the many existing
comparisons across our code base take this into account. The
code can be made more robust by normalizing all MIME types at the
moment they are first set into a class/builder and adding toLowerCase
as part of the normalization.

Most concretely, this fixes an issue with playing HLS streams via
the IMA SDK where the stream MIME type is indicated with all lower
case "application/x-mpegurl", which failed the MIME type comparison
in DefaultMediaSourceFactory.

PiperOrigin-RevId: 582317261
2023-11-14 07:40:15 -08:00
ibaker
8d83d491f1 Add @OptIn to fields in demo PlayerActivity now this is supported
This is possible now we use `annotation-experimental:1.3.1`.

#minor-release

PiperOrigin-RevId: 582315579
2023-11-14 07:33:45 -08:00
lpribanic
877d26abdc Add ImageRenderer in CapturingRenderersFactory by default
DefaultRenderersFactory now instantiates an ImageRenderer by default,
so CapturingRenderersFactory will too.

PiperOrigin-RevId: 582307243
2023-11-14 06:58:48 -08:00
huangdarwin
28c095d8d0 Effect: Clarify threading for VideoFrameProcessor methods.
All methods in VideoFrameProcessor are expected to be called by the owning thread,
as far as I understand (vs. 10 threads each queuing frames/textures/streams, which
invalidates blocking done by registerInputStream and flush)

PiperOrigin-RevId: 582295240
2023-11-14 06:07:27 -08:00
ibaker
aa1ec981a3 Remove recommendation to pin annotation-experimental to version 1.2.0
This was intended to avoid bringing in a transitive dependency on the
Kotlin standard library, but Gradle no longer flags lint errors on
`@RequiresOptIn` violations with `annotation-experimental:1.2.0` (1.3.0
is needed), making this recommendation dangerous. See also
https://issuetracker.google.com/310651921.

#minor-release

PiperOrigin-RevId: 582276430
2023-11-14 04:38:38 -08:00
lpribanic
ec7ac3f482 Create image extractors in BundledChunkExtractor
BundledChunkExtractor creates a JpegExtractor or a PngExtractor if the
chunk's MIME type is JPEG or PNG respectively.

The JpegExtractor is instantiated to load an image track.

PiperOrigin-RevId: 582005828
2023-11-13 10:20:23 -08:00
andrewlewis
1b13c87825 Refine test skipping logic
Skip wearable devices, which don't have the same CDD requirements on codecs from Android 5 (API 21).

Limit an existing skipping case to pre API 33 devices, so that we can catch failures on Android 13 (API 33) onwards, and add OnePlus 9 Pro which also times out calculating SSIM. Remove TODOs for removing test/SSIM skipping now they are restricted to API version.

PiperOrigin-RevId: 581985554
2023-11-13 09:14:41 -08:00
andrewlewis
c00161fb8f Skip export4K60 on Pixel 3
This device over-reports encoding capabilities, so skip the test.

This is a Pixel device that was upgraded to Android 12 (API 31/32) so the issue should only affect devices that didn't take OTAs.

PiperOrigin-RevId: 581981073
2023-11-13 09:02:38 -08:00
lpribanic
2fb5695a82 Instantiate an ImageRenderer
Instantiate an ImageRenderer and add it to the list returned by
DefaultRenderersFactory.buildRenderers.

Add Renderer.MessageType.MSG_SET_IMAGE_OUTPUT and
ExoPlayer.setImageOutput to enable setting a custom
ImageRenderer.imageOutput.

Add ImageRenderer.handleMessage to process messages sent to the
renderer.

PiperOrigin-RevId: 581962451
2023-11-13 07:54:47 -08:00
andrewlewis
330713f687 Expand frame drop workaround to Realme C11
Based on on-device testing, this device seems to have the same issue as Moto G (20) where frames are dropped despite configuring the decoder not to drop frames.

PiperOrigin-RevId: 581943805
2023-11-13 06:47:12 -08:00
andrewlewis
c763ed7941 Expand blocklist for export8K24 to OnePlus 9 Pro
This is failing with the same error about having insufficient resources.

PiperOrigin-RevId: 581921054
2023-11-13 05:00:15 -08:00
tianyifeng
79711ebd3f Parse "f800" as channel count of 5 for Dolby in DASH manifest
Issue: androidx/media#688
PiperOrigin-RevId: 581908905
2023-11-13 04:00:24 -08:00
Googler
7014bc6bf4 Add icon URI to bundle serialization
PiperOrigin-RevId: 581333583
2023-11-10 12:19:49 -08:00
Googler
e79809616c Don't crash when receiving a bad playback state
PiperOrigin-RevId: 580942377
2023-11-09 10:01:31 -08:00
jbibik
7ee07a5ff5 Merge release notes for media3 1.2.0 stable release
PiperOrigin-RevId: 580923121
2023-11-09 08:54:44 -08:00
jbibik
3918d36200 Bump media3 versions to 1.2.0 (stable)
#minor-release

PiperOrigin-RevId: 580856330
2023-11-09 04:19:30 -08:00
claincly
f172923f0d Remove possibly retained bitmap reference
PiperOrigin-RevId: 580579054
2023-11-08 10:39:52 -08:00
jbibik
508582d56c Remove old pre-releases from the github bug template
PiperOrigin-RevId: 580554963
2023-11-08 09:19:04 -08:00
claincly
ef9a76efe2 Fix composition's duration not respecting presentation duration
PiperOrigin-RevId: 580540264
2023-11-08 08:23:54 -08:00
samrobinson
2ae22a412a Cleanup small nits in AudioGraphInput.
PiperOrigin-RevId: 580503934
2023-11-08 05:49:34 -08:00
christosts
dae3e275c4 Increase performance test upper bound threshold
PiperOrigin-RevId: 580497700
2023-11-08 05:22:43 -08:00
samrobinson
76474684f9 Plumb audio through AudioGraph for Composition preview.
The dump file diff as part of this change is because using AudioGraph
means the 2nd item is automatically edited to match the AudioFormat of
the 1st item {44.1KHz mono}, rather than {48KHz stereo}.

Manually verified that for the 2nd item, data output:
* Before: 66936 bytes (16734 frames) output = 348_625us of audio.
* After: 30750 bytes (15375 frames) output = 348_639us of audio.

The small final buffer is caused by SonicAudioProcessor outputting all
pending data when EOS queued, and is WAI.

PiperOrigin-RevId: 580494578
2023-11-08 05:13:08 -08:00
claincly
8d1663a57f Clarify GL texture creation
PiperOrigin-RevId: 580176027
2023-11-07 07:43:15 -08:00
andrewlewis
a7d47d4526 Add info about using SurfaceView instead of TextureView
PiperOrigin-RevId: 580145645
2023-11-07 05:35:09 -08:00
tofunmi
4311cf1d6c Mp4MetadataInfo: add format and time-based I-frame timestamp extraction
PiperOrigin-RevId: 580132463
2023-11-07 04:31:25 -08:00
jbibik
089910546f Fix the asset and dump file names for the standalone Webvtt-HLS test
PiperOrigin-RevId: 580125493
2023-11-07 04:02:34 -08:00
andrewlewis
63bda3b001 Fix typo
PiperOrigin-RevId: 580113633
2023-11-07 03:02:56 -08:00
tofunmi
ba0724ca78 Pass initializationData to EncoderFactory when requested
PiperOrigin-RevId: 580098432
2023-11-07 02:04:39 -08:00
andrewlewis
14fb45626d Add missing visibility modifier
PiperOrigin-RevId: 580092052
2023-11-07 01:33:44 -08:00
sheenachhabra
5db9a66b3b Implement resume API in Transformer
Changes includes:
1. Add resume flow.
2. Change demo app code to resume export.
3. Changes in test infra to trigger resume.
4. E2E Test cases

PiperOrigin-RevId: 579895744
2023-11-06 11:01:04 -08:00
claincly
414b72619b Remove unnecessary memory allocation in OpenGL
PiperOrigin-RevId: 579835031
2023-11-06 07:21:23 -08:00
claincly
98e9022c0e Ensure the exception thrown in the constructor is reported
PiperOrigin-RevId: 579776559
2023-11-06 02:44:22 -08:00
huangdarwin
920d588575 Effect: Clarify ExternalTextureManager thread access.
Turns out more things are accessed only on the GL thread than labelled.

PiperOrigin-RevId: 579244695
2023-11-03 11:25:16 -07:00
tonihei
bce82bdc75 Fix proguard rule to also keep referenced class name
PiperOrigin-RevId: 579234050
2023-11-03 10:53:36 -07:00
huangdarwin
229d9713a4 Flush: Add javadoc for exception when no active stream.
PiperOrigin-RevId: 579225491
2023-11-03 10:28:25 -07:00
tonihei
312203d38b Deprecate Bundleable and Bundleable.Creator
Both interfaces are not really needed as the methods can be called
on the respective classes directly. This also avoid error-prone
situations where classes define to/fromBundle methods with parameters
that should be used instead of the parameter-less version.

Also deprecate all existing CREATOR static instances and make the
corresponding fromBundle method public where needed.

PiperOrigin-RevId: 579189766
2023-11-03 08:27:21 -07:00
ibaker
0a016b59f7 Remove Guava @Beta API warning suppressions
These are no longer needed now we've updated to 32.1.3 in 7a10435633

PiperOrigin-RevId: 579149808
2023-11-03 05:21:49 -07:00
Googler
21a9bfe440 Add iconUri to CommandButton
PiperOrigin-RevId: 578916804
2023-11-03 05:19:56 -07:00
ibaker
901f89c456 Add @CheckReturnValue to ParsableByteArray and ParsableBitArray
This helps encourage usages of `skipXXX()` methods instead of
`readXXX()`.

PiperOrigin-RevId: 578892379
2023-11-02 10:08:26 -07:00
tofunmi
3253f1b5cd Add microsecond precision to MediaItem.ClippingConfiguration
PiperOrigin-RevId: 578881990
2023-11-02 09:40:11 -07:00
Copybara-Service
dab9eb33a4 Merge pull request #692 from haixia-meta:main
PiperOrigin-RevId: 578881745
2023-11-02 09:36:38 -07:00
microkatz
dc530289bb Changed av1c parser from a class to a method 2023-11-02 15:38:27 +00:00
microkatz
9d43cdac17 Add av1C to atom list comment in colr atom parse 2023-11-02 15:31:49 +00:00