14979 Commits

Author SHA1 Message Date
ibaker
4ce60968b2 Fix warning about ambiguous @EnsuresNonNull annotation
```
[expression.parameter.name.shadows.field] The postcondition
EnsuresNonNull on the declaration of method 'setContentTimeline'
contains ambiguous identifier 'contentTimeline'. Use
"this.contentTimeline" for the field, or "#1" for the formal parameter.
  private void setContentTimeline(Timeline contentTimeline) {
               ^
```

PiperOrigin-RevId: 448285571
2022-05-24 10:42:20 +01:00
ibaker
25279ad477 Add DefaultMediaSourceFactory.{set,clear}LocalAdInsertionConfig
Deprecate the setAdsLoaderProvider and setAdViewProvider methods these
replace.

PiperOrigin-RevId: 448251423
2022-05-24 10:41:26 +01:00
samrobinson
de33eee6ec Increase test timeout for 4k60 regression test.
Pixel 5 was occasionally reaching the 2 minute limit.

PiperOrigin-RevId: 448244803
2022-05-24 10:40:25 +01:00
tonihei
fe9e6da8a5 Remove network type test restrictions for API 29/30
Network type detection on these API levels couldn't be tested
yet because of a missing Robolectric feature. This was fixed by
the recent Robolectric upgrade and the restrictions can be removed.

This also requires to replicate the platform hack we rely on on
these API levels.

PiperOrigin-RevId: 448240431
2022-05-24 10:39:39 +01:00
claincly
4c34160a96 Add support for static RTP payload types.
Some RTP foramts are statically assigned, so they don't have the rtpmap
attribute. Create the missing rtpmap attribute in this case.

PiperOrigin-RevId: 448239724
2022-05-24 10:38:44 +01:00
huangdarwin
5067a8da0d Transformer GL: Update test name reference.
The prior test does not exist, and is not a pixel test.

PiperOrigin-RevId: 448224929
2022-05-24 10:37:51 +01:00
hmzh
2725b4c479 Adds key functionality for basic MIDI synthesization
- Add a MidiRenderer skeleton with basic playback
- Add MidiDecoder with placeholder synthesizer (JSyn) impl
- Make MidiExtractor feed placeholder data
- Add Renderer extension loaders for MIDI

PiperOrigin-RevId: 448212797
2022-05-24 10:34:45 +01:00
bachinger
9b07d71f66 Remove all handler messages when controller is released
Issue: androidx/media#74
PiperOrigin-RevId: 448205908
2022-05-24 10:33:49 +01:00
hmzh
efb49f285e Refactor MIDI and Flac extractor loaders for deduplication
Add MIDI filetype information for use in the ExtractorsFactory

PiperOrigin-RevId: 447976272
2022-05-24 10:33:06 +01:00
bachinger
1d89c35f7b Add MediaSession.setCustomLayout(List<CommandButton>)
This provides a way for apps to send a custom layout to media3
controllers and legacy controllers by making sure to include custom
actions in the legacy playback state when built in the PlayerWrapper
for broadcasting.

PiperOrigin-RevId: 447967600
2022-05-24 10:30:00 +01:00
samrobinson
d72ffe4ba1 Expose decoder name to analysis files.
PiperOrigin-RevId: 447950623
2022-05-24 10:29:06 +01:00
christosts
1bcabd3450 Session: Misc change from link tag to linkplain
PiperOrigin-RevId: 447939097
2022-05-24 10:28:00 +01:00
samrobinson
8d2597acc6 Force encoding for the on-device regression tests.
transformWithDecodeEncode is now transformWithoutDecodeEncode,
to test the passthrough path.

PiperOrigin-RevId: 447796892
2022-05-24 10:26:19 +01:00
ibaker
274f3a13a2 Rollback of 57182ac7bd32db54d11fd41e21338a2bbfaf043c
*** Original commit ***

Remove `@Nullable` from `MediaSource.Factory` setters

The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default implementation is only used if the
parameter is `null`.

******

PiperOrigin-RevId: 450410833
2022-05-23 13:01:22 +01:00
andrewlewis
4277ac3835 Reorder demo samples
Put cloud storage samples at the top to avoid having a sample at the top of the list where we don't control the server.

Also update labels not to mention progressive container type, as it's irrelevant for Transformer, which always transmuxes even if it doesn't transcode.

#ame-bug-week

PiperOrigin-RevId: 450403784
2022-05-24 12:23:50 +01:00
ibaker
dc6cc4550e Remove @Nullable from some Dash/Hls/SsMediaSource.Factory methods
The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default implementation is only used if the
parameter is `null`.

Follow-up to 57182ac7bd

PiperOrigin-RevId: 450395941
2022-05-24 12:20:20 +01:00
ibaker
57182ac7bd Remove @Nullable from MediaSource.Factory setters
The null-behaviour of these methods creates a minimization footgun,
because **any** call to these setters will prevent R8 from removing
the default implementation (even if it's never used by the app) - this
is because R8 can't tell the default implementation is only used if the
parameter is `null`.

PiperOrigin-RevId: 450386627
2022-05-24 12:16:55 +01:00
tonihei
48a0301bf5 Remove 5G-NSA detection on API 29/30.
This detection relies on an unsupported workaround and may trigger
permission warnings in tools analyzing permission usage although
no permission is needed or requested by app code.

Given the majority of 5G-NSA playbacks are on API 31+ by now,
we can remove this path to avoid the permission confusion and the
unsupported detection workaround.

PiperOrigin-RevId: 450382586
2022-05-24 12:13:33 +01:00
ibaker
5baeffbf59 Simplify some DefaultMediaSourceFactory instantiation in the dev guide
In many cases we're passing a 'custom' DataSource.Factory where it's not
relevant for the respective dev guide section.

#minor-release

PiperOrigin-RevId: 450374171
2022-05-24 12:09:58 +01:00
ibaker
bbb6d8f049 Use @C.DataType intdef in HlsDataSourceFactory.createDataSource
PiperOrigin-RevId: 449973324
2022-05-24 12:06:31 +01:00
ibaker
685761b05b Fix comment in MediaCodecRenderer
This constant name was updated in 1bcf1cf9f7

PiperOrigin-RevId: 449969093
2022-05-24 12:03:03 +01:00
andrewlewis
7ef65b69d6 Track validity of debug SurfaceView
The debug surface view's output surface can become invalid during a transformation due to the parent activity pausing, for example. This can currently cause a crash when backing out of the `TransformerActivity` in the demo because the surface can be destroyed before the transformer has fully canceled.

Also clarify naming of the outputSurface and inline the private method that created `EGLSurface`s (it was shorter after removing the debug preview).

PiperOrigin-RevId: 449963440
2022-05-24 11:59:37 +01:00
rohks
75dc0e26c5 Migrate leaf listeners of Player to new onCues override
PiperOrigin-RevId: 449587030
2022-05-24 11:55:09 +01:00
samrobinson
97331a612a Rename expected to reference in SsimHelper.
Reference is clearer when used in conjunction with actual, and matches
other SSIM documentation.

PiperOrigin-RevId: 449486177
2022-05-24 11:51:41 +01:00
ibaker
cfaf39c82c Clarify the priority of live config values in the dev guide
PiperOrigin-RevId: 449485592
2022-05-24 11:48:16 +01:00
ibaker
aef2f154a7 Remove all null-tolerant methods from BundleableUtil.
In most cases it's clearer to in-line these null-checks with ternary
operators.

PiperOrigin-RevId: 449474621
2022-05-24 11:44:55 +01:00
tonihei
e9d5381b54 Add missing equals to MergingMediaPeriod.ForwardingTrackSelection
This causes a bug where the forwarded selections are no longer
assumed equal and the child MediaPeriods will think they need
to reset streams even though the selection stayed the same.

Issue: Issue: google/ExoPlayer#10248
PiperOrigin-RevId: 449454038
2022-05-24 11:41:34 +01:00
andrewlewis
b3dc32d7fb Tidy releasing FrameProcessorChain
PiperOrigin-RevId: 449238525
2022-05-24 11:37:08 +01:00
andrewlewis
bea17b4357 Attempt to load OpenCV when loading MediaPipe
PiperOrigin-RevId: 449227706
2022-05-24 11:33:49 +01:00
andrewlewis
d6dc3c5351 Fix initialization of media pipe processors with assets
PiperOrigin-RevId: 449221156
2022-05-24 11:30:29 +01:00
rohks
a27b5398a8 Create new class to store cues and timestamp.
We need to pass timestamp for the list of cues so we are defining a new class CueGroup which will store both cues and timestamp.

PiperOrigin-RevId: 449212054
2022-05-24 11:27:01 +01:00
andrewlewis
b2f46fabf7 Update stale bug reference.
The old reference was just for prototyping HDR. The new reference is for planned work to use the correct formats for input and output for HDR editing in GL.

PiperOrigin-RevId: 449211792
2022-05-24 11:23:33 +01:00
andrewlewis
578afa883d Fix demo app crash when media pipe isn't loaded
The toast message about media pipe not loading needs to be shown on the main
(UI) thread.

PiperOrigin-RevId: 449199285
2022-05-24 11:20:08 +01:00
tonihei
463603049e Add replacement for deprecated network type override constant
The MMWAVE constant was deprecated in favour of a new constant
with a better name. Thus, we need to check for both constants now.

PiperOrigin-RevId: 449018959
2022-05-24 11:16:39 +01:00
Ian Baker
f28f8026ff Merge pull request #64 from ittiam-systems:rtp-vp9
PiperOrigin-RevId: 448978892
2022-05-24 11:13:17 +01:00
tonihei
daa4c1c0a6 Add language normalization for "arb" (Standard Arabic)
This is an individual language (ISO 639-3) part of the Arabic
macrolanguage ("ar" in ISO 639-1). Add this mapping to our
existing list similar to other individual to macrolanguage
mappings we have already.

Issue: Issue: google/ExoPlayer#10255
PiperOrigin-RevId: 448911950
2022-05-24 11:09:21 +01:00
hschlueter
df1b733d50 Combine multiple matrix transformations in one shader.
When using a MatrixTransformationFrameProcessor per transformation
matrix, each frame processor's shader applies the matrix to the
vertices and clips the result to the NDC range when drawing the
output frame.
This change combines consecutive MatrixTransformations into a single
MatrixTransformationFrameProcessor by multiplying the individual
matrices while updating and clipping the visible polygon after
each matrix and mapping the resulting visible polygon back to the
input space so that its vertices and the combined transformation
matrix can be used in the shader.

PiperOrigin-RevId: 448521068
2022-05-24 11:05:59 +01:00
ibaker
b9f1cb4b15 Fix warning about ambiguous @EnsuresNonNull annotation
```
[expression.parameter.name.shadows.field] The postcondition
EnsuresNonNull on the declaration of method 'setContentTimeline'
contains ambiguous identifier 'contentTimeline'. Use
"this.contentTimeline" for the field, or "#1" for the formal parameter.
  private void setContentTimeline(Timeline contentTimeline) {
               ^
```

PiperOrigin-RevId: 448285571
2022-05-24 11:02:32 +01:00
ibaker
938728ce00 Add DefaultMediaSourceFactory.{set,clear}LocalAdInsertionConfig
Deprecate the setAdsLoaderProvider and setAdViewProvider methods these
replace.

PiperOrigin-RevId: 448251423
2022-05-24 10:59:01 +01:00
samrobinson
800e533014 Increase test timeout for 4k60 regression test.
Pixel 5 was occasionally reaching the 2 minute limit.

PiperOrigin-RevId: 448244803
2022-05-24 10:55:20 +01:00
tonihei
3eb6f0e806 Remove network type test restrictions for API 29/30
Network type detection on these API levels couldn't be tested
yet because of a missing Robolectric feature. This was fixed by
the recent Robolectric upgrade and the restrictions can be removed.

This also requires to replicate the platform hack we rely on on
these API levels.

PiperOrigin-RevId: 448240431
2022-05-24 10:51:54 +01:00
claincly
010a00e458 Add support for static RTP payload types.
Some RTP foramts are statically assigned, so they don't have the rtpmap
attribute. Create the missing rtpmap attribute in this case.

PiperOrigin-RevId: 448239724
2022-05-24 10:48:29 +01:00
huangdarwin
dd365cbeb8 Transformer GL: Update test name reference.
The prior test does not exist, and is not a pixel test.

PiperOrigin-RevId: 448224929
2022-05-24 10:44:55 +01:00
hmzh
0948fd1cd8 Adds key functionality for basic MIDI synthesization
- Add a MidiRenderer skeleton with basic playback
- Add MidiDecoder with placeholder synthesizer (JSyn) impl
- Make MidiExtractor feed placeholder data
- Add Renderer extension loaders for MIDI

PiperOrigin-RevId: 448212797
2022-05-24 10:41:20 +01:00
hmzh
dce0db35f1 Refactor MIDI and Flac extractor loaders for deduplication
Add MIDI filetype information for use in the ExtractorsFactory

PiperOrigin-RevId: 447976272
2022-05-24 10:37:39 +01:00
samrobinson
d254967a85 Expose decoder name to analysis files.
PiperOrigin-RevId: 447950623
2022-05-24 10:34:20 +01:00
samrobinson
271cdbed35 Force encoding for the on-device regression tests.
transformWithDecodeEncode is now transformWithoutDecodeEncode,
to test the passthrough path.

PiperOrigin-RevId: 447796892
2022-05-24 10:30:55 +01:00
sr1990
c659fe9441 Changing for loop. 2022-05-15 09:26:17 -07:00
sr1990
cfd13ce6d9 [DASH][ClearKey] Parse ClearKey license URL in MPD. 2022-05-14 11:25:32 -07:00
samrobinson
f8f1a4d1ed Expose the codec name to the analysis files.
PiperOrigin-RevId: 447724152
2022-05-10 17:52:05 +01:00