24 Commits

Author SHA1 Message Date
michaelkatz
decfb9b0a9 Refactor MediaCodecVideoRenderer to use a Builder
MediaCodecVideoRenderer is becoming unwieldy with the numerous constructors and optional settings. This refactors MediaCodecVideoRenderer to use a builder pattern for simplicity.

PiperOrigin-RevId: 723022129
2025-02-04 04:08:56 -08:00
ibaker
3e94bd6125 Enable lint errors in tests for remaining playback modules
Also fix existing violations

This enables the lint for tests in:
* `decoder-iamf`
* `exoplayer-rtsp`
* `test-exoplayer-playback`
* `test-session-current`
* `ui-compose`

PiperOrigin-RevId: 702728438
2024-12-04 08:08:01 -08:00
ibaker
286273c10e Enable lint in tests for modules that require no fixes
PiperOrigin-RevId: 693313908
2024-11-05 05:40:03 -08:00
Gaëtan Muller
b90f00c774 Revert erroneous changes 2024-07-24 16:17:02 +01:00
Gaëtan Muller
28edfcbb69 Remove unnecessary SDK_INT checks 2024-07-24 16:17:01 +01:00
Gaëtan Muller
71b8c32a6f Remove Multidex 2024-07-24 16:17:00 +01:00
ibaker
6a9ff95bf0 Bump minSdk to 21 and remove resulting simple dead code
All other AndroidX libraries have already increased their min SDK to
21.

This change renames private symbols to remove `V21` suffixes and
similar, but doesn't change public or protected symbols with similar
names, to avoid needless breakages/churn on users of the library.

Some of the dead code removal is more complex, so I've split it out
into follow-up changes to make it easier to review.

PiperOrigin-RevId: 651776556
2024-07-12 08:11:01 -07:00
michaelkatz
96fae82436 Suppress incorrect linter error in DebugRenderersFactory method
Method should use @RequiresApi annotation instead of @SdkSuppress

PiperOrigin-RevId: 638639225
2024-05-30 07:05:27 -07:00
Ian Baker
b82f341007 In-line DashTestRunner.MediaDrmBuilder 2024-02-13 17:11:03 +00:00
Gaëtan Muller
963e517a5a Remove unnecessary RequiresApi annotation 2024-02-13 10:26:19 +00:00
Gaëtan Muller
973b717914 Remove unnecessary SDK_INT checks 2024-02-13 10:26:19 +00:00
ibaker
999e154b2a Disable 'skip buffers with identical release times' in GTS tests
This optimization always reports buffers as 'skipped' (i.e. deliberately
not shown), which makes sense for the target case of high FPS content on
a lower refresh rate screen, when lots of the frames will **never** be
shown.

However the optimization also results in reporting buffers as 'skipped'
when decoding is a bit slow, resulting in a frame being released one
vsync late, which then means we have two frames to release in the same
vsync (when the previous vsync was empty). In this case, it would be
more correct to report this as a 'dropped' frame (since it was due to
slow decoding).

Until we can change the logic to distinguish these cases and report them
separately, this CL disables the optimization completely in GTS tests.
This is needed because we often assert there were zero skipped frames,
so slight decoding slowness can cause spurious/flaky test failures (our
threshold for dropped frames is non-zero).

#minor-release

PiperOrigin-RevId: 600406443
2024-01-22 03:27:17 -08:00
ibaker
b3db85133a Add android.namespace to all build.gradle files
This is a pre-requisite for the Android Studio upgrade assistant to
upgrade from AGP 7.2.2 to 8.0.1, otherwise it fails and complains
this is missing.

Issue: androidx/media#409
PiperOrigin-RevId: 533463246
2023-05-19 17:19:15 +01:00
tonihei
889f435a49 Update dependencies to latest versions
The only dependencies that are not updated are the ones that need
to be kept in sync with other system (like Android source tree) or
would require a Kotlin dependency in common or exoplayer modules.

As a side effect, some demo apps now need a Kotlin config and some
additional modules require desugaring/multidex logic. To simplify
the setup, the desugaring and multidex steps are added to the common
config.

PiperOrigin-RevId: 527243950
2023-04-26 15:49:57 +01:00
rohks
c96e010d35 Fix instrumentation tests not working via Gradle
PiperOrigin-RevId: 475560401
2022-09-30 18:03:11 +00:00
rohks
5b3f320230 Switch incorrectly configured native multidex to legacy
Native multidex can only be used for binaries with minSdkVersion of 21 or higher, but minSdkVersion was specified to 16.

PiperOrigin-RevId: 470003836
2022-09-30 17:04:29 +00:00
ibaker
2deb435625 Annotate methods that always return this with @CanIgnoreReturnValue
It's always safe to ignore the result of these methods, because the
caller already has a reference to the returned value.

PiperOrigin-RevId: 462388947
2022-08-08 07:55:25 +00:00
olly
5d8ac644a6 Move TrackGroupArray back to ExoPlayer
PiperOrigin-RevId: 435325454
2022-03-17 13:08:56 +00:00
christosts
212e29865a Extend support for audio spatialization in MediaCodecAudioRenderer
With this change, the MediaCodecAudioRenderer configures the MediaCodec
to not downmix audio only if spatialization can be applied. This way,
decoders who are downmixing by default are left doing so when
spatialization cannot be applied. The renderer re-initializes the codec
when spatialization properties change mid-playback.

PiperOrigin-RevId: 422822952
2022-01-25 18:59:43 +00:00
ibaker
691f9c50cf Migrate usages of deprecated MediaSourceFactory methods
PiperOrigin-RevId: 417428182
2022-01-05 10:40:02 +00:00
ibaker
dcc69056bf Fix how drop-to-keyframe events are recorded in DecoderCounters
The existing code creates an imbalance between `inputBufferCount` and
`droppedBufferCount` by adding 'dropped source buffers' to
`droppedBufferCount` but not to `inputBufferCount`. This results in
assertion failures in `DashTestRunner`.

PiperOrigin-RevId: 414672175
2021-12-07 17:37:45 +00:00
olly
f2ad8ccd3c Shorten log tags to 23 char limit
When calling Android's Log class directly, there's a LongLogTag
lint check that detects tags over the 23 char limit, however it
cannot detect long log tags in ExoPlayer due to the way that we
log via our own Log class. This commit adds @Size annotations to
enforce the same rule.

PiperOrigin-RevId: 413976364
2021-12-07 17:37:31 +00:00
bachinger
222db48298 Make package in test manifest consistent
PiperOrigin-RevId: 406255369
2021-11-08 15:18:26 +00:00
Andrew Lewis
933e207b3e Update to androidx.media3
PiperOrigin-RevId: 405656499
2021-10-27 09:12:46 +01:00