19641 Commits

Author SHA1 Message Date
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
Rohit Singh
6297e7aeae Changes based on internal review 2023-11-07 14:23:07 +00:00
andrewlewis
a7d47d4526 Add info about using SurfaceView instead of TextureView
PiperOrigin-RevId: 580145645
2023-11-07 05:35:09 -08:00
Rohit Singh
8e554c6d6a - some further changes according to review comments
- update MPEG-H test data and extractor dumps
2023-11-07 13:01:20 +00: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
Rohit Singh
6d2059080b - changes according to review comments
- add test data and dumps
2023-11-06 13:28:26 +00:00
Rohit Singh
94442291bd Extend MP4 extractor implementation with complete parsing of mhaC and mhaP boxes 2023-11-06 13:11:46 +00: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
Haixia Shi
5bca9d8a41 Use a shorter test file 2023-11-02 15:31:49 +00:00
Haixia Shi
258f45f874 Fix unit test problems with sample_with_av1c.mp4 2023-11-02 15:31:49 +00:00
microkatz
5a70bbfeec Format with google-java-format 2023-11-02 15:31:49 +00:00
Haixia Shi
834664be4f Add a unit test to Mp4ExtractorTest with a small av1 sample with color info. 2023-11-02 15:31:49 +00:00
microkatz
918079059c Format files and add release note 2023-11-02 15:31:49 +00:00
Haixia Shi
f455e843bc Address review comments on Av1BitstreamParser
* Rename method f(n) to a more helpful name.
* Move the private inner class to the bottom.
* Move public fields before private fields but below the static field.
* Make `private ParsableByteArray data` final.
* Make sure `parseSequenceHeader` can only be called once.
2023-11-02 15:31:48 +00:00
Haixia Shi
4ded7e588d Add AV1 color space parsing in MP4 atom parser
This adds av1C parsing based on the AV1 bitstream specification: https://aomediacodec.github.io/av1-spec/av1-spec.pdf

This is needed to have correct color space when using hardware AV1 decoder.
2023-11-02 15:31:48 +00:00
jbibik
c5241c028e Restore DelegatingSubtitleDecoder's visibility to package-private
PiperOrigin-RevId: 578836078
2023-11-02 06:50:23 -07:00
lpribanic
7387284c1c Add image track selection to DefaultTrackSelector
DefaultTrackSelector now has all logic necessary for selecting an
image track.

If isPrioritizeImageOverVideoEnabled is set to true, image track will
try to be selected first and a video track will only be selected if no
image track is available. If isPrioritizeImageOverVideoEnabled is set
to false, image track will be selected only if video track wasn't
selected.

PiperOrigin-RevId: 578806006
2023-11-02 04:25:05 -07:00
tonihei
ae6f83d298 Fix access to stale ByteBuffer in FfmpegAudioDecoder
The native code can now reallocate the buffer if it needs to grow
its size, so we have to reacquire a reference in the Java code to
avoid accessing a stale instance.

This fixes a bug introduced by 8750ed8de6.

PiperOrigin-RevId: 578799862
2023-11-02 03:55:44 -07:00
tonihei
d4e5ab2c4d Make BundleableUtil more generic by taking Function parameters
BundleableUtil is the only class that really depends on the type
inheritence from Bundleable. However, it only needs this as a way
to define Function<T, Bundle> and Function<Bundle, T>, which could
just be passed in as parameters as it's already done for some of
these methods.

Also rename the class to BundleCollectionUtil accordingly.

PiperOrigin-RevId: 578791946
2023-11-02 03:17:17 -07:00
tofunmi
de82aa93f0 Move shouldTrancodeAudio/Video to static helper methods
PiperOrigin-RevId: 578617730
2023-11-01 13:12:56 -07:00
Googler
a671f4aede Add addAll to SessionCommands
PiperOrigin-RevId: 578588968
2023-11-01 11:47:49 -07:00
ibaker
7a10435633 Upgrade Guava dependency to 32.1.3
This is slightly out of sync with the version in AOSP (32.1.2) but the
diff is minimal, and we need 32.1.3 here as it contains the fix for
https://github.com/google/guava/issues/6657.

PiperOrigin-RevId: 578572893
2023-11-01 11:02:35 -07:00
huangdarwin
44f317693b Flush: Move TextureManager flush logic to abstract class.
This also adds flush support to texture input.

PiperOrigin-RevId: 578536040
2023-11-01 09:08:10 -07:00
jbibik
7b762642db Add experimental opt-in to parse HLS subtitles during extraction
PiperOrigin-RevId: 578524318
2023-11-01 08:25:37 -07:00
ibaker
72b7019578 Split media1/media3 conversion methods out of MediaUtils
Android Studio removed some nested imports, but I think the extra
qualification at the usage site is actually mostly helpful, so I'm
leaving it as-is.

PiperOrigin-RevId: 578518880
2023-11-01 08:04:21 -07:00
ibaker
27caeb8038 Migrate CEA-608 logic to a SubtitleParser implementation
PiperOrigin-RevId: 578505919
2023-11-01 07:07:19 -07:00
ibaker
d42c23706b Add warning log if DASH manifest contains incomplete ClearKey info
Unfortunately we can't fail any more obviously at this point, because
manifests often contain config for multiple DRM schemes, and when
parsing the manifest we don't know which scheme is going to be used for
playback. It would be unreasonable to fail playback due to incomplete
ClearKey config if playback was otherwise going to succeed using e.g.
Widevine.

* Issue: androidx/media#777
* Issue: androidx/media#563
* Issue: google/ExoPlayer#9169

#minor-release

PiperOrigin-RevId: 578491484
2023-11-01 05:59:49 -07:00
tianyifeng
84022eacc5 Put the custom keys in MediaMetadataCompat to MediaMetadata.extras
PiperOrigin-RevId: 578473874
2023-11-01 04:30:10 -07:00
tonihei
1a09430182 Make remote process bundle method less error-prone
The toBundle method should only be used for remote processes,
because there is a separate method for in-process bundling.
Renaming the method makes this more explicit and less error-prone.

PiperOrigin-RevId: 578456532
2023-11-01 03:08:43 -07:00
Copybara-Service
4f99000ba1 Merge pull request #746 from equeim:ffmpeg-output-buffer-reallocation
PiperOrigin-RevId: 578217064
2023-10-31 09:59:35 -07:00
tonihei
58d8850b21 Satisfy nullness checker correctness by using local variable 2023-10-31 12:56:32 +00:00
huangdarwin
8d87a27fb9 Remove deprecated ColorInfo constructor
This was first deprecated in a4bc0959be, submitted Dec 2022

PiperOrigin-RevId: 578152077
2023-10-31 05:46:39 -07:00