15023 Commits

Author SHA1 Message Date
claincly
053e14aaaa Add GL utility methods to get 4x4 identity and set identity
PiperOrigin-RevId: 483671580
(cherry picked from commit f5ad4e098dd71bd4f99b87350e042acab4f95746)
2022-10-25 14:47:52 +00:00
ibaker
f7f371fa3e Clarify sideloaded subtitle example
#minor-release

PiperOrigin-RevId: 483633564
(cherry picked from commit eaf1f2153abca685fce6092a52eb4059bc61815a)
2022-10-25 11:15:17 +00:00
ibaker
0f5245f7b1 Use int for an unsigned byte value in Cea608Decoder
This is a no-op, but it's more 'correct' because it avoids any potential
sign mix-ups that come from storing an unsigned byte (with a
potentially set MSB) in a signed java byte variable.

PiperOrigin-RevId: 483409798
(cherry picked from commit 3d0f43a149c846670480c993e09def1a2d2eeeea)
2022-10-24 16:51:08 +00:00
samrobinson
154cd42437 Add CanIgnoreReturnValue to AudioProcessor#configure + implementations
Although it can be useful to check the output format, it's not required or needed.

For some AudioProcessor implementations, it is stated/obvious that
the output format will match the input, in which case there is no
a need to check the return value.

#cleanup

PiperOrigin-RevId: 483403679
(cherry picked from commit a7bfa12eecb42cbdd13bd7e612603a4d400ebda4)
2022-10-24 16:27:18 +00:00
ibaker
84375a4588 Fix some incorrect comments in Cea608DecoderTest
Also used all-caps consistently

PiperOrigin-RevId: 483317405
(cherry picked from commit 6dcb9aaaa87d1a11a0eb41d1f80312796bceb55a)
2022-10-24 09:18:36 +00:00
bachinger
b20752f6d4 Add DAI specific methods to AdPlaybackState
PiperOrigin-RevId: 482755468
(cherry picked from commit a8e6894ad63271293a831d13419b1372fe0f387a)
2022-10-21 11:32:44 +00:00
Rohit Singh
23b070d151 Merge pull request #162 from ittiam-systems:rtp-mp4a-latm
PiperOrigin-RevId: 482490230
(cherry picked from commit fd2ba37b1d67576313aec0512d630331b7c99f4b)
2022-10-24 10:55:19 +00:00
Rohit Singh
d2c4f740e9 Merge pull request #10618 from vishnuchilakala:fix/do_not_send_content_complete_if_midroll_skipped
PiperOrigin-RevId: 482481703
(cherry picked from commit a413b478f7c45615d3fc7ebd31cacfc363e8ca31)
2022-10-24 10:51:21 +00:00
michaelkatz
b97a9593fa Change areSizeAndRateSupported to use PerfomancePoint.covers
PiperOrigin-RevId: 482461219
(cherry picked from commit 0eb30eacc7f65f84e34e038567d0dd86dc4b6e2c)
2022-10-20 12:20:14 +00:00
kimvde
dc8098a5dc Remove muxerFactory dependency on playerListener
This listener will need to be passed to the MuxerWrapper to throw when
the Transformer is stuck.

PiperOrigin-RevId: 482433552
(cherry picked from commit e3f28421fd85f1c44135f24c3df1fac000834f67)
2022-10-20 09:36:28 +00:00
Googler
1b6bef008f Corrected ordering of javadoc params
PiperOrigin-RevId: 482231370
(cherry picked from commit 897722071e90f7b79527a75ac667a4e2143fbdfd)
2022-10-19 16:53:37 +00:00
huangdarwin
0b0101e5f8 HDR: Support RGBA_1010102 in GlUtil as a parameter.
Make it easier to support use of RGBA_101012 rather than RGBA_8888 for EGL
contexts, displays, and surfaces.

This tangentially supports adding HDR tests, by slightly simplifying the color
selection logic we'd have to add in HDR tests.

PiperOrigin-RevId: 482219428
(cherry picked from commit 9e1adee4cbc3386672f42d580734175c442bdbea)
2022-10-19 16:04:41 +00:00
kimvde
f42d18f213 Make Muxer public
The reason for making the Muxer public is that we want to add an option
to disable or configure the timer that will throw when the muxer doesn't
receive any data for a given period of time.

PiperOrigin-RevId: 482199360
(cherry picked from commit d213b93958fce7e2a25851ec44b7c1938fcf0d7d)
2022-10-19 14:31:06 +00:00
huangdarwin
5c0175e4e3 Effect: Remove unnecessary "this" qualifier
`transformationMatrix` is not ambiguous, as there's no other local
transformationMatrix variable nearby.

PiperOrigin-RevId: 482184602
(cherry picked from commit c698ec51a24bdf42e2affad181d2a6d812cbe47b)
2022-10-19 13:08:03 +00:00
bachinger
6f94b8efe5 Map lib-effect from androidx to exoplayer2
PiperOrigin-RevId: 482179761
(cherry picked from commit 28c4be2f6bd56205e3b8128bf710c34b3b3d65e9)
2022-10-19 12:38:14 +00:00
Marc Baechinger
fc32f0ded3 Merge pull request #183 from jasper-apps:bugfix/make-download-notification-appear-immediately
PiperOrigin-RevId: 482165983
(cherry picked from commit 405455b06c6d596552c695670664309319f5570c)
2022-10-20 03:11:46 +00:00
ibaker
f56d714dd3 Remove ForwardingPlayer special case from PlayerControlView.setPlayer
This was originally added in 4fd7d777b6, but it hasn't done anything
since 98ee159df1 (when the instanceof ExoPlayer check was removed).

PiperOrigin-RevId: 482161662
(cherry picked from commit 7d5f1a24be204321961aba81f2de5b1ce1328c71)
2022-10-19 10:40:06 +00:00
huangdarwin
e54127cf52 Test: Update MatrixProcessorPixelTest to use input width and height.
Before, they used `width` and `height`, which was inconsistent with other pixel tests, and less descriptive.

Refactoring change only. No functional change intended.

PiperOrigin-RevId: 481970243
(cherry picked from commit 620d8c9479469f11bdd372e80d231a64e0132808)
2022-10-18 18:12:06 +00:00
tonihei
ed9bc9ad5d Ensure onMediaItemTransition is sent for repeats of the same item
Currently, repeating the same item (via seekNext/Previous) implicitly
results in a seek to the default position of the current item, which
looks exactly the same as a direct seek. As a result, we don't send
onMediaItemTransition as we would for every other seekNext/Previous
call.

This can be fixed by explicitly marking the repeat case in the internal
BasePlayer/ExoPlayerImpl methods, so that the callback can be triggered.

Issue: google/ExoPlayer#10667
PiperOrigin-RevId: 481951788
(cherry picked from commit 76ce0cc69fa12a9b2592103da97dd45c15bfe4d3)
2022-10-18 17:08:09 +00:00
huangdarwin
66bae6059b GL: Move loadAsset to GlProgram, where it's used.
(Also, make some public methods private)

PiperOrigin-RevId: 481912071
(cherry picked from commit a404fde4fa9d9d16b0be3c6e08dabd059c07f471)
2022-10-18 14:10:39 +00:00
kimvde
66d56be3aa Remove deprecated setOutputMimeType
This is to prepare Muxer to become public

PiperOrigin-RevId: 481893842
(cherry picked from commit bd9181e6ba5daf865f9c2f4338f1238b108dafd8)
2022-10-18 12:26:36 +00:00
samrobinson
5de37d2849 Fix parameter comment block.
#cleanup

PiperOrigin-RevId: 481882181
(cherry picked from commit b6bd35860cda60f27439df737fdee815060ed6fe)
2022-10-18 11:13:44 +00:00
ibaker
fb1c9dee04 Remove more references to overriding layouts from Player(Control)View
In exoplayer2 this affects StyledPlayer(Control)View

#minor-release

PiperOrigin-RevId: 481878940
(cherry picked from commit a5583c04bb6c199633e2b1edf036060c0d33b616)
2022-10-18 10:55:13 +00:00
kimvde
1c6cea80eb Add DefaultMuxer forwarding to FrameworkMuxer
- The naming DefaultMuxer is more consistent with the rest of
Transformer codebase (e.g. DefaultEncoderFactory).
- By hiding the implementation details of DefaultMuxer, the transition
to in-app Muxer will be seamless for apps using DefaultMuxer.
- The current plan is that DefaultMuxer will become the in-app muxer.

PiperOrigin-RevId: 481838790
(cherry picked from commit b4d7f066dd31cce1e3d7ab14cc47d3b7be364a88)
2022-10-18 07:23:57 +00:00
bachinger
7cc3f119b1 Add manifest to make gradle build work
PiperOrigin-RevId: 481606248
(cherry picked from commit 325e973ace929efa193b114271d844f20814705a)
2022-10-17 11:33:10 +00:00
bachinger
fbc8019164 Add copybara annotated import statement for special cases
PiperOrigin-RevId: 481605567
(cherry picked from commit fd315dadebe479f2cc75fb4fa482cb414270bdcf)
2022-10-17 11:28:21 +00:00
Googler
e3d0ee990d Fix display settings window UI bug for foldable devices.
PiperOrigin-RevId: 481215581
(cherry picked from commit 6cdaf2c031258221939eead3b11075a90e2c742c)
2022-10-14 20:07:09 +00:00
ibaker
12314abbf0 Fix the position of IntDef annotations on fields in the UI module
PiperOrigin-RevId: 481150758
(cherry picked from commit 871a5e685e9bc78544107c803306320e7d53ee53)
2022-10-14 15:21:58 +00:00
huangdarwin
d9c60dc966 Effect: Remove unused private int ouptutTexId in pixel tests.
PiperOrigin-RevId: 481143798
(cherry picked from commit 026699bafc6d73bc63b6cf416ea183fc3d506039)
2022-10-14 14:43:41 +00:00
ibaker
8ffdc3abf1 Mark effectively-final PlayerControlView fields as actually final
This means the null checker can be more sure that these fields don't
get reassigned between a null-check and a usage.

PiperOrigin-RevId: 481142004
(cherry picked from commit 248ee469ad243a86b66445f96782b915296eec4c)
2022-10-14 14:33:04 +00:00
claincly
df15f9c5c5 Use static import for Assertions in MCVR
PiperOrigin-RevId: 481122795
(cherry picked from commit 12f7174e1f8a2c2b1f36df749b43262efb88f60a)
2022-10-14 12:30:07 +00:00
Marc Baechinger
e13bbbcdd7 Merge pull request #10578 from thucngv:release-v2
PiperOrigin-RevId: 481115402
(cherry picked from commit 9861f88f3db419553b893efd98a5e1a0c8c6287c)
2022-10-20 02:08:44 +00:00
tonihei
b3627361f5 Ensure sessions without MediaPeriodId are ended after seek to new item
We already have logic to end all session except the current one if the
current one doesn't have a MediaPeriodId yet. This is assuming that this
only happens after a seek on the app side where the player doesn't have
detailled knowledge about the MediaPeriodIds yet.

Currently this logic isn't triggered if the window we are coming from
doesn't have its MediaPeriodId either as we run into another check that
keeps sessions around until we have a valid windowSequenceNumber.

Swapping both conditions fixes this case without breaking any of the
other known transition scenarios.

Issue: androidx/media#180
PiperOrigin-RevId: 480866465
(cherry picked from commit 6070d9110a9cec61f6073c7669f2f8185a635767)
2022-10-13 12:29:51 +00:00
bachinger
1bea5067cf Migrate media constants from androidx.media.util.MediaConstants
Adds root extras and metadata extras to MockMediaLibraryService and MockMediaBrowserCompatService and completed test cases for asserting
interoperability with a media1 or Media3 browser.

PiperOrigin-RevId: 480854842
(cherry picked from commit f95406e75d1eca9b96477132d33d752e2485bee6)
2022-10-13 11:18:46 +00:00
Googler
a8921b7449 Fix blank toast in Transformer Demo
PiperOrigin-RevId: 480847967
(cherry picked from commit 446c9943f935541d7b76fc1dfa62ee969d775f60)
2022-10-13 10:32:32 +00:00
kimvde
267725c54a Remove supportsSampleMimeType from Muxer.Factory
- This method is redundant with getSupportedSampleMimeTypes().
- This is to prepare the Muxer class to become public.

PiperOrigin-RevId: 480840902
(cherry picked from commit 8962f5a3f4b505224ceb22ac5771b85f24e30358)
2022-10-13 09:52:26 +00:00
ibaker
3aca9bc0d3 Add Cea608DecoderTest
When debugging and fixing Issue: google/ExoPlayer#10666 I wanted to write a regression
test, but needed to add a test first... This is just a small bit of
coverage to start with. It checks the field/channel filtering works
correctly, but doesn't check any styling info. It also doesn't test
'pop on' subtitles (i.e. when the subtitle isn't shown until a 'end of
subtitle' signal is received).

PiperOrigin-RevId: 480644568
(cherry picked from commit 6052212c15b89d71846f1f3855728ce863304bca)
2022-10-12 16:31:35 +00:00
huangdarwin
4198ddebe2 Demo: Shorten trim range from 60 seconds to 10 seconds.
Most demo videos aren't very long, and the default demo video is only 10 seconds.

Shorten the maximum trim duration to 10 seconds, to demonstrate transformer functionality more easily, and allow this to be used more easily when trimming short sections of a longer video (ex. to make test clips)

PiperOrigin-RevId: 480602037
(cherry picked from commit 3142a2127dc224e4c2124989b952a8bd1e06d510)
2022-10-12 12:58:12 +00:00
huangdarwin
2244549146 Demo: Hide player controls by default.
Player controls are somewhat distracting when showing the difference between the
input and output video, as they obscure and darken the video players.

PiperOrigin-RevId: 480597804
(cherry picked from commit 91a61cecbe37f4c5595f534ee237011289c0ac18)
2022-10-12 12:26:07 +00:00
huangdarwin
abefef9b59 Demo: Read long values from trim slider.
Before, slider values were read as `floor()`'ed `longValue()`s, so that trimming to
intervals less than one second would be interpreted as a request for a zero-
duration trim.

Also, rename `radiusRange` references here to `trimRange`, since this is not a
radius range.

PiperOrigin-RevId: 480401556
(cherry picked from commit 6c59f9ece40f6450405d29acd559492145158409)
2022-10-11 17:57:01 +00:00
Googler
5d8daba5c5 Add local file picker to ConfigurationActivity
PiperOrigin-RevId: 480349627
(cherry picked from commit 225d0dcdd1e7e7f1f41d8ac1d2dee7340c40cf3a)
2022-10-11 14:21:12 +00:00
tonihei
dc805232a3 Treat NO_VALUE as zero when adding up total required bitrate
We currently use the literal -1 (=NO_VALUE) when adding up the
total. Tracks without known bitrate can be ignored in the
calculation, but we should use an explicit value of 0.

#minor-release

Issue: google/ExoPlayer#10664
PiperOrigin-RevId: 480048126
(cherry picked from commit af19e0ea890e7b274b6f75f409f00f11e11c1c81)
2022-10-10 11:11:30 +00:00
michaelkatz
e8a5ac91ef Adjust track selection with Dolby Vision if display does not support
If the sample type is Dolby Vision and the display does not support Dolby Vision, then the capabilities DecoderSupport flag is set to DECODER_SUPPORT_FALLBACK_MIMETYPE. This denotes that the renderer will use a decoder for a fallback mimetype if possible. This alters track selection as tracks with DecoderSupport DECODER_SUPPORT_PRIMARY are preferred.

UnitTests included
-DefaultTrackSelector test that checks track selection reordering with DECODER_SUPPORT_FALLBACK_MIMETYPE
-MediaCodecVideoRenderer test that checks setting of DecoderSupport flag based on Display's Dolby Vision support

Issue: google/ExoPlayer#8944
PiperOrigin-RevId: 480040876
(cherry picked from commit a366590a0425ff138520752e2fc94c70429c20ab)
2022-10-10 10:35:17 +00:00
claincly
efb7bf2fc2 Remove late frame dropping in FrameProcessor
Currently, a frame is dropped if it's requested release time is in the past.
This mode was added to support previewing. However, in normal ExoPlayer
playback, slightly late frames (<30ms late) are also rendered. On MediaCodec
side, this means calling `releaseOutputBuffer` with a release time in the
past.

PiperOrigin-RevId: 479615291
(cherry picked from commit 2188685c465aa6d641e78ab33eaa93fbb92185b8)
2022-10-07 17:29:15 +00:00
christosts
bd616e164a Bump dexmaker version
PiperOrigin-RevId: 479579252
(cherry picked from commit a6b9772f0e6f5a31baafb6965c3386d819d3c1e9)
2022-10-07 14:49:37 +00:00
huangdarwin
15e316da3f HDR: Disable tone mapping on unsupported pixel build ID.
Also, update tests to allow AnyOf error codes, and no longer check exception messages, which caused quite a bit of churn.

PiperOrigin-RevId: 479570861
(cherry picked from commit faa796d7365330d1f1d4f5b17901d6b1a78ce868)
2022-10-07 13:57:06 +00:00
ibaker
ee9bff08da Document the allowed values of TsPayloadReader.Flags IntDef
PiperOrigin-RevId: 479569806
(cherry picked from commit 7c68b8d4500cb25779a473b52029944ec4d29543)
2022-10-07 13:50:28 +00:00
claincly
808180455a Add a FrameProcessor flag to drop the processed frame
This mode is supported by using `C.TIME_UNSET` (which is a negative value). The
new logic decouples the value of `C.TIME_UNSET` and the frame dropping
behaviour.

PiperOrigin-RevId: 479368880
(cherry picked from commit ccab9fba0369ea9709a6987024177e8b73a5c7ac)
2022-10-06 18:30:14 +00:00
tianyifeng
d2f7fb1d50 Provide access to original media timestamps in AudioSink.
* Add `setOutputStreamOffsetUs(long)` method in `AudioSink`.
* Add private methods `setOutputStreamOffsetUs(long)` method in `MediaCodecRenderer` and `DecoderAudioRenderer`.
* Add protected method `onOutputStreamOffsetUs(long)` method in `MediaCodecRenderer`, in which:
  * `MediaCodecRenderer` itself will be no-op for this method.
  * `MediaCodecAudioRenderer` will propagate this value to its `audioSink`.
* Add logics in `DecoderAudioRenderer` to calculate `outputStreamOffsetUs`.

PiperOrigin-RevId: 479265429
(cherry picked from commit 4c73241058041fd978e9748b2158168d4e6e702d)
2022-10-06 09:58:37 +00:00
tonihei
e37f16a749 Fix RequestMetadata JavaDoc link to point to the right MediaController.
The JavaDoc of RequestMetadata should point to the media3 controller,
not the platform one.

PiperOrigin-RevId: 479047924
(cherry picked from commit 088958994776a65666045b3e7b332f5f0c336bcf)
2022-10-05 15:03:16 +00:00