20446 Commits

Author SHA1 Message Date
tonihei
16df05ec29 Upgrade Gradle and AGP
The newer versions include a bugfix that automatically highlights
when our project requires enhanced Java 8 desugaring.

Issue: androidx/media#1312
PiperOrigin-RevId: 631373018
2024-05-07 04:20:55 -07:00
michaelkatz
75733e294e Fix GitHub ref url typo in 'non-square Dash Thumbnail' release note
PiperOrigin-RevId: 631368681
2024-05-07 04:02:40 -07:00
tofunmi
b2d30a5722 Fallback to hevc transcoding for hdr AV1 files
PiperOrigin-RevId: 631362735
2024-05-07 03:34:31 -07:00
claincly
4aa15e9463 Change test golden files, as default color space chagned
Degamming is removed in cb4b2ea55c, update the test golden files to match
the new working color space.

PiperOrigin-RevId: 631361692
2024-05-07 03:31:32 -07:00
bachinger
4841f8f8b3 Run ExoPlayerTest with preloading enabled and disabled
Replace with parametrized test when  https://issuetracker.google.com/316040980
is resolved.

PiperOrigin-RevId: 631096883
2024-05-06 09:58:09 -07:00
bachinger
0ab6ea5668 Add preload pool to media period MediaPeriodQueue
The pool is created and the queue uses holder instances found
to enqueue. No preloading is done yet though.

PiperOrigin-RevId: 631053172
2024-05-06 08:07:49 -07:00
kimvde
4a54db7cc7 Remove VideoSinkProvider class member from MCVR
PiperOrigin-RevId: 631037709
2024-05-06 07:31:02 -07:00
kimvde
a03f30bea9 Add surface setters on VideoSink
PiperOrigin-RevId: 631025710
2024-05-06 06:31:39 -07:00
kimvde
506944dcfd Move effect setters to VideoSink
PiperOrigin-RevId: 631011252
2024-05-06 05:23:54 -07:00
bachinger
2c912aa697 Handle displayTitle and title in legacy conversions
When converting `MediaMetadata` to the legacy `MediaDescriptionCompat`
the selection and order of properties to use has been aligned with the
behavior of media1. This selection is relevant for users that use a
platform or legacy controller or browser. Before and up to the current
API version 34, this includes System UI, Android Auto/Automotive and
AVRCP (Bluetooth).

PiperOrigin-RevId: 630999535
2024-05-06 04:21:19 -07:00
Googler
1ef0b7c616 Automated Code Change
PiperOrigin-RevId: 630995654
2024-05-06 04:04:20 -07:00
kimvde
6add3a1dba Add release method to VideoSink
PiperOrigin-RevId: 630958612
2024-05-06 01:01:40 -07:00
jbibik
8a8dfbed71 Fix link typo with missing #
Without it, the DAC doesn't render the full sentence. And the link is not actually linking to the proper constructors.

#minor-release

PiperOrigin-RevId: 630395271
2024-05-03 08:22:10 -07:00
sheenachhabra
24305c043e Remove forCancellation flag from Transformer/Muxer.release() method
PiperOrigin-RevId: 630337930
2024-05-03 03:18:24 -07:00
sheenachhabra
10e29be8b6 Allocate correct size for keys and ilst boxes in Mp4Muxer
The keys and ilst boxes in the MP4 muxer were allocated
with a fixed size of 200 bytes. This was not enough to
store the keys and values of large metadata entries, which
could cause the muxer to throw an exception. This CL allocates
the correct size for the keys and ilst boxes based on the size of the metadata entries.

PiperOrigin-RevId: 630331680
2024-05-03 02:47:14 -07:00
tofunmi
620cb32667 effect: use constants for error colors in shaders
PiperOrigin-RevId: 630194321
2024-05-02 15:21:40 -07:00
claincly
d59f1cb6e3 Add test for seeking composition playback
PiperOrigin-RevId: 630184355
2024-05-02 14:46:39 -07:00
tofunmi
cb4b2ea55c remove degammaing: change setSdrWorkingColorSpace default
The second stage of the changes remove the conversion to linear colors in the SDR effects pipeline by default.

also resolves Issue: androidx/media#1050

PiperOrigin-RevId: 630108296
2024-05-02 10:35:48 -07:00
claincly
45ccc6978a Add setVideoSurface override
Also adds first frame rendered test for playing back compositions.
- This test checks the output pixels using an `ImageReader` to retrieve the
output bitmap

PiperOrigin-RevId: 630100817
2024-05-02 10:14:07 -07:00
samrobinson
cb846f0b0d Move raw audio decoder channel count workaround to DefaultCodec.
PiperOrigin-RevId: 630071329
2024-05-02 08:31:28 -07:00
tonihei
7cf2fd9486 Postpone AdTagLoader listener deregistration to receive final error
When the AdTagLoader is deactivated because of a player error, the
error callback is already pending on the app's main thread, but not
yet executed. This means the VideoAdPlayerCallback instances
registered in AdTagLoader won't receive this error event if the
Player.Listener is immediately removed from AdTagLoader.

This can be fixed by postponing the deregistration until after
already pending messages have been handled. As this means other
callbacks can be triggered now with player==null, this check needs
to be added to other callbacks to avoid handling stale events.

Issue: androidx/media#1334
PiperOrigin-RevId: 630068222
2024-05-02 08:19:04 -07:00
kimvde
000d1ff0a6 Always set effects surface and resolution together in MCVR
This change is for simplicity.

PiperOrigin-RevId: 630066664
2024-05-02 08:12:19 -07:00
claincly
2e3c3eb678 Fix wrong output timestamp in seeking
Set `VideoSink`'s offset during seeking in `MCVR.onPositionReset()`

This one is necessary in some cases, where `onProcessedStreamChange()` is not
invoked during a seek. For example, when seeking when playback has ended.

PiperOrigin-RevId: 630056723
2024-05-02 07:29:57 -07:00
kimvde
d059e97b28 Use VideoSink directly in MCVR where possible
PiperOrigin-RevId: 630030889
2024-05-02 05:24:13 -07:00
tonihei
0893275841 Add RendererCapabilities.isFormatSupported helper method
This makes the same method that currently exists as
DefaultTrackSelector.isSupported more widely available
as a utility.

PiperOrigin-RevId: 629991830
2024-05-02 02:06:56 -07:00
kimvde
ec9b38b817 Simplify VideoSinkProvider surface handling in MCVR
PiperOrigin-RevId: 629975032
2024-05-02 00:50:39 -07:00
kimvde
bdb8d8e329 Make VideoSink final in MCVR
This is to be able to set some values on the VideoSink before it's
initialized (for example, the effects)

PiperOrigin-RevId: 629966220
2024-05-02 00:06:39 -07:00
Copybara-Service
d3850722d3 Merge pull request #1300 from hakonschia:fix-dash-thumbnails-cropping
PiperOrigin-RevId: 629774942
2024-05-01 11:08:53 -07:00
microkatz
acc5a3bcd3 Updated non-Square thumbnail unit test to contain non-Square thumbnails 2024-05-01 16:26:58 +00:00
microkatz
690bb1ace3 Add release note for DASH non-square thumbnail grid fix 2024-05-01 16:26:58 +00:00
microkatz
6d62d3437c Format with google-java-format 2024-05-01 16:26:58 +00:00
Håkon Schia
cf41ba3a3d Create new ImageRenderer in render_tiledImageNonSquare_rendersAllImagesToOutput to allow it to use a separate bitmap from the other tests 2024-05-01 16:26:58 +00:00
Håkon Schia
e27f527ed1 Revert changes in ImageRenderTest from 3a030da83b49b9f6c0e414955b543433221d4c41 and create a new unit test for non square images instead 2024-05-01 16:26:58 +00:00
Håkon Schia
9ced27a030 Use inputFormat.tileCountHorizontal to calculate tileStartXCoordinate for cropping the correct tile from outputBitmap
To find the column of an index in a matrix the formula "column = index % width" should be used, not "column = index % height"

If inputFormat.tileCountVertical was equal to 1 then it would not throw an error, but instead result in the first tile of the bitmap always being returned. If inputFormat.tileCountVertical was larger than 1 then Bitmap.createBitmap() would throw an error as it would attempt to go outside the bounds of outputBitmap

ImageRenderTest has been updated to test for 2x3 images so that tileCountVertical != tileCountHorizontal. These tests passed previously because they were equal, so using tileCountVertical produced the same results as tileCountHorizontal
2024-05-01 16:26:57 +00:00
rohks
feb512544a Fix issue with updating the last rebuffer time
The last rebuffer time was being updated erroneously, even in the absence of rebuffering events, resulting in incorrect `bs` (buffer starvation) key in CMCD.

Issue: androidx/media#1124
PiperOrigin-RevId: 629731796
2024-05-01 08:35:02 -07:00
rohks
e25bd07a81 Parse initialization data from AV1 tracks
Initialization data is not passed to `MediaCodecRenderer` as it is not required for playing AV1 video.

See: https://developer.android.com/reference/android/media/MediaCodec#CSD
PiperOrigin-RevId: 629729301
2024-05-01 08:23:43 -07:00
tonihei
1af86d4c4d Fix issue where subtitles starting before a seek position are skipped
These subtitles were skipped because they are marked as shouldBeSkipped
based on their timestamps. The fix removes this flag entirely in
SimpleSubtitleDecoder because TextRenderer handles potential skipping
if needed.

PiperOrigin-RevId: 629717970
2024-05-01 07:34:40 -07:00
tonihei
fb982c2d54 Don't enforce SimpleDecoder skipping for samples before start time
We currently enforce the skipping if the sample has a timestamp less
than the start time. While this may be the default desired behavior
for most implementations, it prevents an implementation from outputting
a sample with such a timestamp.

This change updates the logic to pre-fill the shouldBeSkipped flag
based on the input timestamp, and only check this flag on the output
buffer. None of the implementations in our library change timestamps
of samples, so this is equivalent to the previous code.

PiperOrigin-RevId: 629708873
2024-05-01 06:42:36 -07:00
rohks
5805287620 Remove an extra call to updateRebufferingState method
`updateRebufferingState` is invoked immediately preceding this `if-else`, with no alteration of state occurring in between, making this invocation unnecessary.

PiperOrigin-RevId: 629694531
2024-05-01 05:13:15 -07:00
tonihei
c9aab56d9c Add Mp4 object type for JPEG
PiperOrigin-RevId: 629683068
2024-05-01 04:05:42 -07:00
Copybara-Service
6e8f3a8f97 Merge pull request #1189 from v-novaltd:dsparano-exo245
PiperOrigin-RevId: 629476777
2024-04-30 11:31:53 -07:00
tonihei
703b9368c3 Add ExoPlayer.setPriority
This lets apps update the task manager priority and send the
priority message to all renderers so that they can adjust their
resources if needed.

PiperOrigin-RevId: 629426058
2024-04-30 08:49:16 -07:00
Rohit Singh
a09c2f1701 Add boolean input to MpeghReader 2024-04-30 16:36:51 +01:00
Rohit Singh
247cad934a Update dump files 2024-04-30 16:31:50 +01:00
Rohit Singh
0a436ad491 Use inclusive language 2024-04-30 16:31:50 +01:00
Rohit Singh
1ab91a64c2 Refactor and add release notes 2024-04-30 16:31:50 +01:00
Rohit Singh
e1294c0d5c Format with google-java-format 2024-04-30 16:31:50 +01:00
Daniele Sparano
838083e610 Update dump files 2024-04-30 16:31:50 +01:00
Daniele Sparano
029b8bad86 Fix H264 transformer test, fix H265 byterange case; re-enable file H262 case 2024-04-30 16:31:50 +01:00
Rohit Singh
3cafb08a32 Fix condition to send dummy end of input and update dump files 2024-04-30 16:31:50 +01:00