4292 Commits

Author SHA1 Message Date
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
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
Rohit Singh
a7f5c3f5b6 Update dump files 2024-04-30 16:31:50 +01:00
Rohit Singh
4b14bc2c3e Format with google-java-format 2024-04-30 16:31:50 +01:00
Daniele Sparano
b82f4b8e28 Tidy up dummy pusi, do not apply to H262 streams 2024-04-30 16:31:50 +01:00
Daniele Sparano
85826ebc19 Fix dummy pusi solution for byte range and key frame only NAL stream cases 2024-04-30 16:31:49 +01:00
Tofunmi Adigun-Hameed
c002ff6a6f Merge pull request #419 from v-novaltd:vnova-104 2024-04-30 16:31:49 +01:00
sheenachhabra
72013446c4 Update error message to be more specific
PiperOrigin-RevId: 629405290
2024-04-30 07:28:35 -07:00
sheenachhabra
6956d8099a Rename Muxer.addMetadata to addMetadataEntry
This is to make it clear that the method adds a single metadata entry, not a collection of metadata entries.

PiperOrigin-RevId: 629398485
2024-04-30 06:55:50 -07:00
sheenachhabra
bc77cef403 Rollback of 08abc964ab
PiperOrigin-RevId: 629382753
2024-04-30 05:41:45 -07:00
tofunmi
28655d27a7 test: use Ascii.equalsIgnoreCase for device model matching
PiperOrigin-RevId: 629349367
2024-04-30 02:54:38 -07:00
Rohit Kumar Singh
43f098da0f Merge Issue: androidx/media#882: Extend MPEG2TS implementation with MPEG-H support
Imported from GitHub PR https://github.com/androidx/media/pull/882

Merge 27a4c43de6294a5482b85ff8e2b4501057f3e946 into a49b625cc585970843f27410b614c6470924e7e5

COPYBARA_INTEGRATE_REVIEW=https://github.com/androidx/media/pull/882 from androidx:ts_mpegh_reader_patch 27a4c43de6294a5482b85ff8e2b4501057f3e946
PiperOrigin-RevId: 629132035
2024-04-29 11:33:38 -07:00
ibaker
96bc9e9652 Propagate ID3 TCON frame to MediaMetada.genre
This change also includes mapping the numeric ID3v1 codes to their
string equivalents before setting them into `MediaMetadata`. This
mapping already existed, but it was previously only used when parsing
MP4 `gnre` atoms.

Issue: androidx/media#1305
PiperOrigin-RevId: 629113480
2024-04-29 10:38:51 -07:00