18347 Commits

Author SHA1 Message Date
ibaker
2c05a9af26 Use TestUtil.getPublicMethods instead of getDeclaredMethods
JaCoCo introduces private synthetic methods (even on interfaces) which
have to be skipped when checking that a 'forwarding' implementation does
forward everything. Instead we can use the existing `getPublicMethods()`
method which implicitly skips these (since they're private).

PiperOrigin-RevId: 519665752
2023-03-30 17:11:30 +00:00
tonihei
b9790e69d7 Handle output format changes for empty sample streams correctly
When MediaCodecRenderer is given an empty sample stream, it puts
its output format change tracking in a bad state where we never
process future stream changes because we are waiting for a sample
that doesn't exist.

We can fix this by:
 - Looping the pending output stream changes to see if we processed
   more than one change at once (this fixes the tracking for empty
   sample streams that are not the first in the queue).
 - Checking if none of the previous streams queued any samples in
   onStreamChanged to handle this in the same way as the case
   where we already output all samples (this fixes the problem when
   the empty sample stream comes first in the queue).
 - Also calling onProcessedStreamChange for the case above, which
   was missing previously.

#minor-release

PiperOrigin-RevId: 519226637
2023-03-30 17:10:49 +00:00
sheenachhabra
35f016f5c4 Add end to end test for edit box
PiperOrigin-RevId: 519184599
2023-03-30 17:10:07 +00:00
tonihei
fc54a7a487 Add COMMAND_RELEASE to set whether Player instances can be released
This wasn't added so far because releasing is always allowed from a
MediaController (as it just releases the connection, not the session
player). But Player instances can be created for other purposes and
the receiver of a Player instance should not always be allowed to
call release if it doesn't own the player resource.

PiperOrigin-RevId: 519121122
2023-03-30 17:09:28 +00:00
kimvde
710b462b5f Update documentation of supported Compositions
Account for features implemented recently.

PiperOrigin-RevId: 519113898
2023-03-30 17:08:46 +00:00
claincly
b70e7ca9e7 Remove redundant volatile.
PiperOrigin-RevId: 519099339
2023-03-30 17:08:05 +00:00
kimvde
b118565730 Add an API entry point for looping a sequence
Also
- Add unit tests
- Fix bug discovered by unit tests

PiperOrigin-RevId: 519092249
2023-03-30 17:07:27 +00:00
Tianyi Feng
dc3481fca7 Merge pull request #11051 from TiVo:p-fix-for-issue-11050
PiperOrigin-RevId: 518953648
2023-03-30 17:06:46 +00:00
kimvde
1f6b000219 Handle looping sequences in TransformerInternal
PiperOrigin-RevId: 518895943
2023-03-30 17:06:01 +00:00
Googler
67f8fbf3bd [Media3][Shader] Reset the composite RGB matrix upon update
Since the composite matrix is ultimately rewritten to, we need to ensure it's cleared (to identity) before update.

Test plan: use an effect as a time based approach and see that the effect no longer clips

PiperOrigin-RevId: 518886623
2023-03-30 17:05:23 +00:00
sheenachhabra
69cece1d82 Make getMp4LocationData method inline
PiperOrigin-RevId: 518827223
2023-03-30 17:04:46 +00:00
michaelkatz
ecf4d8b891 Retry RTSP Setup with TCP if response with UDP is UnsupportedTransport
If RTSP Setup Request with UDP receives HTTP Error Status 461 UnsupportedTransport, then client will retry with TCP.

Issue: google/ExoPlayer#11069
PiperOrigin-RevId: 518807829
2023-03-30 17:04:07 +00:00
tianyifeng
df558b59db Deprecate onUpdateNotification(MediaSession)
PiperOrigin-RevId: 518612625
2023-03-30 17:03:28 +00:00
sheenachhabra
0747486e5a Remove helper method to create "hdlr" box for "meta" box
The "hdlr" box for "meta" box can be easily created by passing required parameters to Boxes.hdlr() method.

PiperOrigin-RevId: 518568103
2023-03-30 17:00:53 +00:00
tofunmi
c17e043403 Transformer Demo: Hide playback views during transformation
PiperOrigin-RevId: 518560945
2023-03-30 17:00:11 +00:00
sheenachhabra
e211889d70 Add Mp4 boxes test cases
PiperOrigin-RevId: 518531999
2023-03-30 16:57:33 +00:00
tonihei
7aff4764e4 Add ExoPlayer versions to GH bug template
PiperOrigin-RevId: 518523484
2023-03-22 13:22:41 +00:00
tonihei
dbeb9f51c4 Add ExoPlayer versions to GH bug template
PiperOrigin-RevId: 518523484
2023-03-22 10:38:39 +00:00
tofunmi
8df4fd769c Log export errors that occur after export completes
PiperOrigin-RevId: 518281002
2023-03-22 10:35:05 +00:00
tonihei
0a9a758079 Merge branch 'release' 2023-03-22 09:58:30 +00:00
tonihei
95f9e8f8ff
Merge pull request #270 from androidx/release-1.0.0
1.0.0
2023-03-22 09:49:31 +00:00
tofunmi
3a6ee77daf skip transformer tests if no internet connection
The failure reason (no network) will be logged in the test output, but the test will not be marked as failing, rather skipped.

PiperOrigin-RevId: 518262203
2023-03-21 14:06:11 +00:00
michaelkatz
ea3a85f89f Add RequiresApi annotations to some unittest methods
PiperOrigin-RevId: 518258380
2023-03-21 14:24:10 +00:00
Googler
7c7a6298ff Fixed TableLayout in demo UI to work with small screens
PiperOrigin-RevId: 518257650
2023-03-21 14:23:29 +00:00
huangdarwin
cbaf0f8232 Effect: Early return and rename variable (+ nits).
Reduce nesting by using an early return. Also, rename
`outputSizeOrRotationChanged` to `outputChanged`, because this also applies to when the output surface changes.

Also, update local variable initialization, add some javadoc, and remove unneeded
local variable

PiperOrigin-RevId: 518241708
2023-03-21 14:22:46 +00:00
sheenachhabra
87cd90eb15 Fix TODO in Boxes.java
The fix is as per MP4 spec ISO/IEC 14496-12

PiperOrigin-RevId: 518240043
2023-03-21 14:22:08 +00:00
bachinger
0bae410f7d Use final reference to content timeline inside handler message
The content timeline field may be updated when the live timeline
is refreshed in the looper event preceding the runnable that is
posted to the player thread. Hence a new timeline may contain a
new period uid that is not present in the ad playback state map.

Using a final reference makes sure period and ad playback state
match when asserted.

PiperOrigin-RevId: 518228165
2023-03-21 14:21:21 +00:00
bachinger
0a2a20d4fb Skip played live ad media periods
This change makes sure that live ad periods that are played are
skip when attempted to be added to the queue. To make this work
the existing filter logic had to be take into account the content
resume offset that live periods use.

PiperOrigin-RevId: 518068138
2023-03-21 14:20:43 +00:00
huangdarwin
fca9197e1c HDR: Only check for HDR encoders on API 33+.
FEATURE_HdrEditing is only available on and above API 33, so it doesn't make
sense to check for support under API 33.

PiperOrigin-RevId: 518036855
2023-03-21 14:20:01 +00:00
sheenachhabra
669008f437 Use FakeExtractorOutput in Mp4MuxerMetadataTest
The FakeExtractorOutput dumps data in more readable format
so using that where ever possible.

The MdtaMetadataEntry which contains key and value dumped only "key".
Added fix to dump "value" as well.

PiperOrigin-RevId: 517968996
2023-03-21 14:19:12 +00:00
bachinger
b13b272695 Use correct period duration in fake live timeline
PiperOrigin-RevId: 517953981
2023-03-21 14:18:30 +00:00
sheenachhabra
ccdbd3b0a3 Add tkhd, mvhd and mdhd box test cases
PiperOrigin-RevId: 517933485
2023-03-21 14:17:47 +00:00
kimvde
aed5d62602 Remove TODOs
PiperOrigin-RevId: 517444208
2023-03-21 14:17:04 +00:00
kimvde
d41d025803 Add support for looping sequences in SequenceAssetLoader
PiperOrigin-RevId: 517418886
2023-03-21 14:16:19 +00:00
huangdarwin
e54c7a7c79 Test: Trim 4k60 test file to 300ms.
This was trimmed using the Transformer Demo, from ~4 seconds to 300ms

Otherwise, this test file will be quite large, and folks who clone the repo will
have to clone this content as well. Trimming the file also allows the test to
take less time, while still testing the core purpose of the file, to confirm that 4k extraction/decode/GL/encode/muxing works.

PiperOrigin-RevId: 517408463
2023-03-21 14:15:35 +00:00
samrobinson
78373991b8 Fix nits in FloatAudioMixingAlgorithmTest.
* Reorder methods.
* Arrange, act, assert split.

PiperOrigin-RevId: 517158351
2023-03-21 14:14:47 +00:00
tofunmi
de3678e461 Remove glUtil.clearOutputFrame from GLObjectsProvider.
d288891c77 added clearing depth buffers to GLUtil, so there is no need to have allow apps to have a custom clearOutputFrame.
Also removes default implementations in GLObjectsProvider know that these methods have been implemented.

PiperOrigin-RevId: 517156304
2023-03-21 14:13:59 +00:00
tianyifeng
6109a0eb62 Intercept audio capabilities change in DefaultAudioSink
PiperOrigin-RevId: 517144710
2023-03-21 14:13:07 +00:00
tianyifeng
841c5477d1 Add release method to Renderer and AudioSink
* Add `release` method to Renderer and AudioSink interfaces.
* Call the `release` method for renderers when the ExoPlayer is going to be released.

PiperOrigin-RevId: 517135677
2023-03-21 14:12:21 +00:00
Steve Mayhew
f2cf82cd15 Removes liveOffsetTarget override on seek to live edge
Any calls that issue a `seekTo()` where the position is `TIME_UNSET` will
now restore the live offset target to the MediaItem set default.

The change simply passes a flag to `updatePlaybackSpeedSettingsForNewPeriod()` that
indicates the call is from a seek operation.  If this flag is set, a `positionForTargetOffsetOverrideUs`
of `TIME_UNSET` unconditionally removes the `setTargetLiveOffsetOverrideUs()`

This fixes issue #11050
2023-03-17 13:28:16 -07:00
Rohit Singh
d88dd74b2b Merge pull request #11064 from haixia-meta:release-v2
PiperOrigin-RevId: 517128752
2023-03-16 16:36:19 +00:00
samrobinson
3ac82b1d62 Add test cases for mixing to mono.
PiperOrigin-RevId: 517127021
2023-03-16 16:27:41 +00:00
huangdarwin
40acbb00cb Demo: Shorten default trim range from 10s to 1s.
Shorten the demo's default trim range from 0-10s to 0-1s, and change the
UI-supported trim range from 0-60s to 0-10s.

Most demo videos aren't very long, and the default demo is 10 seconds.

The use-case for trimming in the demo seems to be mostly for validating trimming
works, or generating test media. Test media should tend to be short in order to be
small, so shortening the trim range helps this be accomplished more effectively.

PiperOrigin-RevId: 517103583
2023-03-16 16:19:06 +00:00
rohks
e4446c37fb Add support to fetch ColorInfo from hvcc box in AtomParsers
#minor-release

PiperOrigin-RevId: 517086016
2023-03-16 16:10:16 +00:00
Rohit Singh
eb6fc93b15 Merge pull request #11061 from cedricxperi:dts-udts-support
PiperOrigin-RevId: 517067549
2023-03-16 16:01:28 +00:00
tofunmi
ddbad57031 Clear depth buffers in glUtil.clearOutputFrame.
[GL documentation for glClear](https://registry.khronos.org/OpenGL-Refpages/gl4/html/glClear.xhtml) says "If a buffer is not present, then a glClear directed at that buffer has no effect." so it's okay to clear the depth buffer even if there isn't one set.

Also manually tested to have no impact when contrast effect and dizzy crop effect form transformer demo was added to image/video input.

PiperOrigin-RevId: 516879598
2023-03-16 15:52:28 +00:00
huangdarwin
e6343a34b8 Test: Move 4k60 test file to local from remote.
This test file used to be remote, which led to various errors in loading the file or timing out during the muxer or overall transformer.

export4k60 test timing on Pixel 7:

|Condition                 |elapsedTimeMs|AS Test "Duration" (s)|
|--------------------------|-------------|----------------------|
|local file (this CL)      |4253         |14                    |
|Remote file, googleguest  |5510         |17                    |
|Remote file, 4G           |11423        |25                    |

PiperOrigin-RevId: 516815462
2023-03-16 15:43:35 +00:00
Rohit Singh
0e3f407e0e Merge pull request #11064 from haixia-meta:release-v2
PiperOrigin-RevId: 517128752
2023-03-16 15:37:02 +00:00
samrobinson
9e66998ea4 Add test cases for mixing to mono.
PiperOrigin-RevId: 517127021
2023-03-16 15:36:09 +00:00
huangdarwin
236748070c Demo: Shorten default trim range from 10s to 1s.
Shorten the demo's default trim range from 0-10s to 0-1s, and change the
UI-supported trim range from 0-60s to 0-10s.

Most demo videos aren't very long, and the default demo is 10 seconds.

The use-case for trimming in the demo seems to be mostly for validating trimming
works, or generating test media. Test media should tend to be short in order to be
small, so shortening the trim range helps this be accomplished more effectively.

PiperOrigin-RevId: 517103583
2023-03-16 15:35:18 +00:00