19730 Commits

Author SHA1 Message Date
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
tonihei
c4c4ef9670 Add terminating newline 2023-10-31 12:39:02 +00:00
tonihei
78142d3f5e Fix typo 2023-10-31 12:32:28 +00:00
tonihei
36fb20719f Change warning suppression style 2023-10-31 12:29:23 +00:00
tonihei
8750ed8de6 Format with google-java-format
Also amended Javadoc and added assertion to grow method
2023-10-31 12:25:32 +00:00
Alexey Rochev
adee4626d3 ffmpeg: reallocate output buffer dynamically
With FFmpeg we can't determine size of output buffer ahead of time for all codecs,
so we need to reallocate it when needed instead of simply failing.
2023-10-31 12:25:32 +00:00
ibaker
3a527a888a Split openAssetFileDescriptor from RawResourceDataSource.open
This moves the invocation of `transferInitializing` slightly earlier,
but this is consistent with other `DataSource` implementations like
`OkHttpDataSource`.

PiperOrigin-RevId: 578137236
2023-10-31 04:38:57 -07:00
ibaker
88f554c74b Add cross-package support to RawResourceDataSource
This has been documented to work since this class was created, but until
now we were always trying to resolve using the current application's
`Resources.getIdentifier` method. This commit changes to resolve to the
other app's `Resources` object if the package name doesn't match the
current package.

This will only work if the current app has package-visibility to the
destination package: http://g.co/dev/packagevisibility

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: 577864992
2023-10-30 09:17:45 -07:00
ibaker
26789b56c2 Remove unecessary proguard config symlink
PiperOrigin-RevId: 577858121
2023-10-30 08:53:51 -07:00
ibaker
841cdf170b Reduce HlsMediaPeriod to package-private visibility
This type shouldn't be directly depended on from outside the HLS
package.

PiperOrigin-RevId: 577833188
2023-10-30 07:17:52 -07:00
ibaker
db1ab1dcf3 Remove stray parentheses from release notes
#minor-release

PiperOrigin-RevId: 577809964
2023-10-30 05:19:34 -07:00
ibaker
e30e43ec3f Migrate EventLogger to non-deprecated AnalyticsListener methods
Also suppress a warning about unused constructor parameters.

#minor-release

PiperOrigin-RevId: 577795245
2023-10-30 04:05:46 -07:00