20193 Commits

Author SHA1 Message Date
tofunmi
0480bc31a8 Rename media/bitmap out of media and rename
PiperOrigin-RevId: 610418418
2024-02-26 08:40:19 -08:00
sheenachhabra
63a8fff69e Use ByteBuffer.remaining() instead of ByteBuffer.limit() in BoxUtil
PiperOrigin-RevId: 610414628
2024-02-26 08:24:35 -08:00
huangdarwin
e98858424a Test: Expand GL tone-map pixel difference threshold.
PiperOrigin-RevId: 610374358
2024-02-26 05:13:17 -08:00
michaelkatz
a45e734bb0 Create audio offload failure recovery playback tests
These audio offload failure recovery tests model the DefaultAudioSink failing at audio track init and write operations in offload mode. Playback should recover and try again as DefaultAudioSink will disable offload mode.

PiperOrigin-RevId: 610372935
2024-02-26 05:06:04 -08:00
sheenachhabra
a5f3db4cfe Fix java doc for setAudioProcessors and setVideoEffects method
PiperOrigin-RevId: 609778651
2024-02-23 11:05:12 -08:00
sheenachhabra
9be7a7ab7f Update media3 version for 1.3.0 stable release
PiperOrigin-RevId: 609745599
2024-02-23 09:10:23 -08:00
tofunmi
5a892509f7 remove media/bitmap/input_images
move the images into the respective places in the file extension directory so they file the pre-existing structure

PiperOrigin-RevId: 609744673
2024-02-23 09:07:03 -08:00
michaelkatz
23a301fc5d Fallback to legacy sizerate check if CDD H264 PerfPoint check fails
Some devices supporting Performance Points for decoder coverage are missing coverage over the CDD requirements for H264. For these cases ExoPlayer should fall back to legacy resolution and frame rate support checks. If there is a stream evaluated as a PerformancePointCoverageResult of COVERAGE_RESULT_NO, then ExoPlayer checks for coverage of the 720p H264 CDD requirement.

Issue: google/ExoPlayer#10898

Issue: androidx/media#693

Issue: androidx/media#966
PiperOrigin-RevId: 609740128
2024-02-23 08:48:09 -08:00
sheenachhabra
284d17cb13 Add release reason argument in the MuxerWrapper.release() method
Also called `muxer.release()` in other tests where it is
appropriate.

PiperOrigin-RevId: 609736956
2024-02-23 08:34:04 -08:00
claincly
68a78b9218 When effects are enabled, opportunistally render to VFP
Even when there's no display surface, MCVR can render frames to VFP, becuase by
the time the frame is processed:

- If there's still no surface, VFP will drop the frame;
- If there's surface, the processed frame would be rendered.

In short, placeholder surface is not needed in effect enabled playback. FWIW,
it is used to swallow frames directly from MediaCodec when there's no output
surface.

PiperOrigin-RevId: 609705222
2024-02-23 06:07:54 -08:00
christosts
0480eff6a1 ExoPlayerImplInternal.releaseInternal(): unblock the app thread
This change makes ExoPlayerImplInternal.releaseInternal() unblock the
app thread if a runtime exception is thrown while releasing components
from the playback thread.

Before this change, if a runtime exception occurred during releasing
components in the playback thread, ExoPlayer.release() would wait for
`releaseTimeoutMs` and then raise a player error. With this change,
the player error is reported only when the playback thread is blocked
but if there is a runtime exception, the application thread is
unblocked.

The impact of this change is potentially fewer ANRs on
ExoPlayer.release() at the expense of less error reporting.

PiperOrigin-RevId: 609702549
2024-02-23 05:54:37 -08:00
huangdarwin
601d6ed587 Update GL thread name, per package name
PiperOrigin-RevId: 609686878
2024-02-23 04:29:31 -08:00
andrewlewis
88c6877418 Slow down dizzy crop demo effect
PiperOrigin-RevId: 609667000
2024-02-23 02:54:43 -08:00
huangdarwin
e4cf72db11 Test: Use TestName testId in TransformerSequenceEffectTest.
Some testcases that got through 0d1b35477d as they were submitted as that CL was in-progress.

PiperOrigin-RevId: 609659607
2024-02-23 02:17:59 -08:00
sheenachhabra
fd8f45b38e Add MdtaMetadataEntry constructor with default locale indicator
PiperOrigin-RevId: 609427529
2024-02-22 10:55:50 -08:00
sheenachhabra
82065e699a Update release notes section for 1.3.0 stable release
PiperOrigin-RevId: 609407248
2024-02-22 10:01:30 -08:00
christosts
440d2ab162 ForwardingAudioSink: add override for release()
We forgot to add it when we added AudioSink.release(). The commit
includes a test that ensures ForwardingAudioSink overrides all the
methods defined in the AudioSink interface.

PiperOrigin-RevId: 609402258
2024-02-22 09:59:15 -08:00
michaelkatz
4192924622 Use playing period TrackSelectorResult in track reselection update
If the reading period has already advanced and a track reselection procs that only affects the reading period media, then ExoPlayer may try and apply the reading period's track selection incorrectly unto the playing period. ExoPlayer should apply the playing period's track selection to the playing period instead.

PiperOrigin-RevId: 609375077
2024-02-22 08:08:18 -08:00
huangdarwin
0d1b35477d Test: Use testId throughout media3 tests.
No more instances of this codesearch query after this CL in non-parameterized
tests:
`String\ testId\ \=\ \" f:media3`
PiperOrigin-RevId: 609364413
2024-02-22 07:28:55 -08:00
ibaker
d1ae9ffc52 Add more details about why Extractor.sniff returned false
PiperOrigin-RevId: 609335656
2024-02-22 05:20:16 -08:00
sheenachhabra
41886434ad Remove duplicate Mp4Location class
PiperOrigin-RevId: 609313551
2024-02-22 03:40:35 -08:00
michaelkatz
9046f2edb6 Allow renderer retry for audio track offload initialization failure
If render error occurs due to AudioTrack initialization failure in offload mode, then ExoPlayer should allow retry as subsequent attempt will be with DefaultAudioSink disabling offload.

PiperOrigin-RevId: 609304897
2024-02-22 03:00:10 -08:00
tianyifeng
d952a06214 Fix a bug in retaining streams when preload a PreloadMediaPeriod again
The `PreloadMediaPeriod.selectTracksForPreloading` can be called for multiple times at the preloading stage (before the period is being played). For example, when the period resumes preloading. This change fix the assertion failure in `ProgressiveMediaPeriod.selectTracks` caused by the wrong implementation of `PreloadMediaPeriod.selectTracksForPreloading` when it is trying to retain the previously preloaded streams.

Also the `TrackSelectorResult` parameter is changed to a list of `ExoTrackSelection`. We should compare the selections only rather than considering the `RendererConfiguration` in the `TrackSelectorResult` to decide whether to retain the streams, as for preloading case the renderers haven't consumed the samples yet.

PiperOrigin-RevId: 609126868
2024-02-21 14:41:33 -08:00
huangdarwin
fde6a32156 Transformer: Input decoder output color to VideoSampleExporter.
Previously, the track format was used in VideoSampleExporter. Now, we use a
simulated decoder output format.

As the last expected change for this bug, also adds release notes

PiperOrigin-RevId: 609080629
2024-02-21 12:15:11 -08:00
ibaker
bb5c688543 Update TestPlayerRunHelper to fail on non-fatal errors by default
Also introduce a fluent API that allows callers to ignore non-fatal
errors (while avoiding adding boolean overloads for every method).

**Most** tests want to fail on non-fatal errors (since they likely
indicate user-visible issues like codec errors etc), only tests
explicitly testing fallback in error scenarios should want to ignore
them.

Before this change there were a few `playUntilXXX` methods. These can
now all be triggered via `play(player).untilXXX`, which means
effectively every 'until' condition is available in a 'play until'
variant that calls `play` just before waiting for the condition.

PiperOrigin-RevId: 608988234
2024-02-21 07:39:07 -08:00
huangdarwin
2e9cc2784f Test: Add sequence effect test with bt601 image and bt709 video.
The lack of this test was the *real* root cause for our partner's regression :P

PiperOrigin-RevId: 608956530
2024-02-21 05:22:11 -08:00
Googler
dca7bae416 Allow mismatching H.264/AVC level for trimming or resuming
MediaCodec docs already allude to potentially mismatching H.264 level
between container and bitstream. Relax the initialization data check to
reflect this.

PiperOrigin-RevId: 608942322
2024-02-21 04:20:50 -08:00
sheenachhabra
a82d7e7098 Improve retrieveTrackFormat() java doc and remove catch block
PiperOrigin-RevId: 608939192
2024-02-21 04:11:39 -08:00
tofunmi
7a632a43ba Move bitmap decoding into datasource util
PiperOrigin-RevId: 608588505
2024-02-20 06:57:02 -08:00
sheenachhabra
ebcb4e8b21 Fix nit issues in 1.3.0-rc01 release notes
PiperOrigin-RevId: 608580903
2024-02-20 06:22:14 -08:00
tonihei
711d24a12f Clarify purpose of omitting zero duration clipped audio samples
When applying edit lists, we need to output the last partial samples
to have all the necessary data needed for rendering.

The only case where we can omit the sample is for zero duration
audio data that has no additional information.

The current comment and variable name doesn't make this very clear
and this change improves the naming and the comment.

PiperOrigin-RevId: 608579746
2024-02-20 06:17:28 -08:00
christosts
8dd6590fe9 Use application context in CompositingVideoSinkProvider.Builder
PiperOrigin-RevId: 608572065
2024-02-20 05:45:44 -08:00
sheenachhabra
063fbc7b84 Remove FileUtil.java class
PiperOrigin-RevId: 608556329
2024-02-20 04:35:49 -08:00
tofunmi
f1c21f6c07 Rollback of 5a3f18f837
PiperOrigin-RevId: 608551290
2024-02-20 04:09:26 -08:00
michaelkatz
52c1d60d39 Allow empty information attributes in RTSP Session Description
Issue: androidx/media#1087
PiperOrigin-RevId: 608534659
2024-02-20 02:47:40 -08:00
huangdarwin
04bdf3e814 Test: Use Format.colorInfo instead of hardcoded format.
PiperOrigin-RevId: 608399485
2024-02-19 14:21:36 -08:00
huangdarwin
9e352d5c27 Test: Add sequence effect test with bt601.
PiperOrigin-RevId: 608377195
2024-02-19 11:53:09 -08:00
tofunmi
e6facd6a7e Fix: make VFP test runner propagate the right exceptions
PiperOrigin-RevId: 608337651
2024-02-19 07:57:33 -08:00
sheenachhabra
d097fe11d0 Add E2E test for Mp4Muxer to verify overall box structure
There is no super test which covers whole MP4 structure.
In all the E2E test, it verified against `ExtractorOutput` which
would remain same if there are changes in the box structure.

PiperOrigin-RevId: 608310006
2024-02-19 05:31:34 -08:00
sheenachhabra
2cd0cb30cd Use default asset loader factory for remuxing video step
PiperOrigin-RevId: 608308406
2024-02-19 05:22:07 -08:00
tofunmi
5a3f18f837 Make DataSourceBitmapLoader non-final
PiperOrigin-RevId: 608275835
2024-02-19 02:52:58 -08:00
ibaker
3bbb0e7453 Add documented support for android.resource://package/id URIs
These were previously somewhat supported, but the `package` part was
never read (so it only worked if it was either absent or the same as the
current application's package). This change parses and uses the
`package` part.

This partially reverts 35121a2d3d.

This is hard to test for the same reasons as 88f554c74b:

> 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: 608270463
2024-02-19 02:28:39 -08:00
Googler
e43f96687c Fix failure to write negative PTS sample
Fixes an issue caused by no support for negative audio PTS and edit lists
in FrameworkMuxer, Android versions before 11

PiperOrigin-RevId: 607690507
2024-02-16 08:03:38 -08:00
ibaker
c872af4bc0 Consolidate requiresSecureDecoder logic in ExoMediaDrm
This change:
1. Updates the implementation of
   `FrameworkMediaDrm.requiresSecureDecoder` to include the
   'force allow insecure decoder' workaround logic.
2. Removes the 'force allow insecure decoder' logic from MCR
3. Removes the `requiresSecureDecoder` field from MCR (it can just
   be a local derived from `codecDrmSession` now).

PiperOrigin-RevId: 607664186
2024-02-16 05:57:50 -08:00
ibaker
fa3212e73e Fix docs on playUntilStartOfMediaItem to match playUntilPosition
The behaviour and docs of `playUntilPosition` were changed in
00c7a9bcbb.

This change also affects `playUntilStartOfMediaItem` (since it delegates
to `playUntilPosition`), so the same doc change should also be made
here.

#minor-release

PiperOrigin-RevId: 607364897
2024-02-15 09:49:51 -08:00
Copybara-Service
fb7438378d Merge pull request #983 from MGaetan89:min_api_19
PiperOrigin-RevId: 607319987
2024-02-15 07:00:17 -08:00
bachinger
4777d62d31 Rollback of 8e2869278c
PiperOrigin-RevId: 607264513
2024-02-15 02:35:12 -08:00
claincly
ae0da442b1 Fix forward for 216f3fedb8
The original change missed copying the newly added flag in `buildUpon()`, which
caused some test flakes.

PiperOrigin-RevId: 607232373
2024-02-15 00:05:10 -08:00
asinclair
8e2869278c Internal Cleanup
PiperOrigin-RevId: 607117264
2024-02-14 15:06:10 -08:00
ibaker
a0727fe4d7 Demo app: Clarify that only Widevine DRM content can be downloaded
Issue: androidx/media#1085
PiperOrigin-RevId: 606921440
2024-02-14 03:28:57 -08:00