20712 Commits

Author SHA1 Message Date
tianyifeng
e879c4ac43 Call PreloadControl.onSourcePrepared only once for each preload request
PiperOrigin-RevId: 638677090
2024-05-30 09:21:59 -07:00
michaelkatz
9e0f533a11 Schedule exoplayer work task to when renderers can make progress
Currently ExoPlayer schedules its main work loop on a 10 ms interval. When renderers cannot make any more progress(ex: hardware buffers are fully written with audio data), ExoPlayer should be able to schedule the next work task further than 10Ms out.

Through `experimentalSetDynamicSchedulingEnabled`, ExoPlayer will dynamically schedule its work tasks based on when renderers are expected to be able to make progress.

PiperOrigin-RevId: 638676318
2024-05-30 09:19:28 -07:00
rohks
8c8bf1334e Use INDEX_UNSET instead of LENGTH_UNSET for next media sequence/part
Both constants have the same value, but the method returning initial values for the media sequence/part uses `INDEX_UNSET`, so it makes sense to use it.

PiperOrigin-RevId: 638673282
2024-05-30 09:10:09 -07:00
sheenachhabra
d598eb064d Remove unnecessary sortKey from Mp4Muxer.addTrack()
PiperOrigin-RevId: 638647112
2024-05-30 07:37:26 -07:00
kimvde
151a2be141 Regenerate TransformerHdrTest goldens after removing degammaing
Degammaing has been removed in cb4b2ea55c. The goldens for
TransformerHdrTest (previously TransformerSequenceEffectTestWithHdr)
were not regenerated because the test wasn't running due to its name
(fixed in e41a966237).

PiperOrigin-RevId: 638645635
2024-05-30 07:32:22 -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
tianyifeng
1f1897709f Rename PreloadMediaSource.PreloadControl methods
The IntDefs in `DefaultPreloadManager.Stage` are also renamed accordingly.

PiperOrigin-RevId: 638631357
2024-05-30 06:32:33 -07:00
ibaker
4db9bf92af Increase h.264 buffer size in ShadowMediaCodecConfig
Some test media has samples larger than 100kB

PiperOrigin-RevId: 638598553
2024-05-30 03:57:35 -07:00
tofunmi
1640becddd Use file inserts and string replacements in overlay shaders
PiperOrigin-RevId: 638251955
2024-05-29 05:39:35 -07:00
kimvde
e41a966237 Rename test so that it runs on MH
PiperOrigin-RevId: 638237657
2024-05-29 04:35:21 -07:00
michaelkatz
0ed08a5204 Import string translations for session module
#minor-release

PiperOrigin-RevId: 638224207
2024-05-29 03:39:07 -07:00
samrobinson
21eb482baf Add an experimental analyzer mode to Transformer.
PiperOrigin-RevId: 637926059
2024-05-28 09:31:40 -07:00
dancho
3c998ac408 Add a flag to control whether input bitmap resampling can be skipped
Add DefaultVideosFrameProcessor experimental flag that controls
whether input Bitmaps are sampled once for a repeating sequence of
output frames with the same contents, or once for each output frame.

PiperOrigin-RevId: 637921350
2024-05-28 09:15:23 -07:00
dancho
02df88e5d9 Speed up image to video Export
Only sample from input bitmap when the input image has changed.
Introduce GainmapShaderProgram.newImmutableBitmap API that signals
input bitmap changes to GainmapShaderProgram (DefaultShaderProgram).

PiperOrigin-RevId: 637920207
2024-05-28 09:12:24 -07:00
ibaker
3d8b5811b4 Remove deprecated RendererSupport.FormatSupport IntDef & constants
Use `C.FormatSupport` and associated constants instead.

PiperOrigin-RevId: 637890304
2024-05-28 07:21:48 -07:00
ibaker
496bc2b058 Tighten exception handling in TestPlayerRunHelper
This removes `throws Exception` from public methods in favour of more
specific exception types (`TimeoutException` and `PlaybackException`).

PiperOrigin-RevId: 637880546
2024-05-28 06:38:29 -07:00
kimvde
0baa4ff621 Reset input capacity when setting external shader program
Before this CL, externalShaderProgramInputCapacity was not reset when
the external shader program was reset (which occurs when  the
InputSwitcher switches to an input with a different ColorInfo). This is
due to a regression introduced in bef3d518d2.

PiperOrigin-RevId: 637869215
2024-05-28 05:55:00 -07:00
tofunmi
9622411b50 Add support for ultra HDR overlays
PiperOrigin-RevId: 637863706
2024-05-28 05:28:03 -07:00
ibaker
3bb6cf2129 Remove unused Util.getCommaDelimitedSimpleClassNames method
PiperOrigin-RevId: 637854422
2024-05-28 04:43:56 -07:00
ibaker
c87b7d86cc Remove deprecated format changed methods
Use the overloads with an additional `@Nullable DecoderReuseEvaluation`
parameter instead.

PiperOrigin-RevId: 637851937
2024-05-28 04:31:14 -07:00
dancho
aadcbe332b Ensure single-frame videos are correctly exported
Add a wait in DefaultCodec.signalEndOfInputStream when no
video encoder output has been seen. This avoids a thread synchronization problem
between writing frames to video surface, and signaling end of stream,
which was hit for video input of only one frame on some devices.

PiperOrigin-RevId: 637844690
2024-05-28 04:00:01 -07:00
Copybara-Service
67b799c714 Merge pull request #1389 from DolbyLaboratories:dlb/dovi-profile10/dev
PiperOrigin-RevId: 637827802
2024-05-28 02:39:42 -07:00
tofunmi
8feaf82768 UltraHdr: Fix calculations to apply gainmap
PiperOrigin-RevId: 636964921
2024-05-24 10:39:36 -07:00
ibaker
763a5f0272 Remove deprecated DrmSessionManager.DUMMY and getter method
Use `DRM_UNSUPPORTED` constant instead.

PiperOrigin-RevId: 636937592
2024-05-24 09:07:35 -07:00
ibaker
7fd8a06e08 Remove deprecated MediaCodecInfo.isSeamlessAdaptationSupported(...)
Use `MediaCodecInfo.canReuseCodec(...)` instead.

PiperOrigin-RevId: 636918479
2024-05-24 07:59:45 -07:00
ibaker
2ab1c75ca7 Remove deprecated DashMediaSource.DEFAULT_LIVE_PRESENTATION_DELAY_MS
Use `DashMediaSource.DEFAULT_FALLBACK_TARGET_LIVE_OFFSET_MS` instead.

PiperOrigin-RevId: 636906922
2024-05-24 07:11:39 -07:00
ibaker
0f1f6bfa41 Remove deprecated DefaultHttpDataSource constructors
Use `DefaultHttpDataSource.Factory` instead.

PiperOrigin-RevId: 636875524
2024-05-24 05:03:05 -07:00
ibaker
4a16212fb3 Remove deprecated Timeline.Window.isLive field
PiperOrigin-RevId: 636870982
2024-05-24 04:37:04 -07:00
ibaker
08d1eb4376 Remove ShadowLog references from tests
These were accidentally submitted after being added for local debugging.

PiperOrigin-RevId: 636865825
2024-05-24 04:10:27 -07:00
tofunmi
db6144e7dd Maintain a consistent luminance range across HDR content in effects
PQ and HLG have different luminance ranges (max 10k nits and max 1k nits resp). In GL, colors work in a normalised 0 to 1 scale, so for PQ content, 1=10k nits and and for HLG content, 1=1k nits.

This cl scales and normalises PQ content appropriately so that all HDR content works in the HLG luminance range. This fixes two things

1. Conversions between HLG and PQ are "fixed" (before the output colors looked too bright or too dark depending on which way you are converting)
2. color-altering effects will be able to work consistently across HLG and PQ content

1 is tested in this cl. 2 will be tested when ultra HDR overlays are implemented, both cases have been manually tested to ensure the output looks correct on a screen.

PiperOrigin-RevId: 636851701
2024-05-24 03:05:34 -07:00
ibaker
cfd29e04f3 Remove PlayerMessage.setHandler(Handler)
Use `setLooper(Looper)` instead.

PiperOrigin-RevId: 636840566
2024-05-24 02:13:43 -07:00
ibaker
4fb2255eb9 Print underlying extractor name in UnrecognizedInputFormatException
If subtitle-parsing-during-extraction is enabled (now defaults to on),
the 'outer' extractor class name is often
`SubtitleTranscodingExtractor`, leading to some slightly useless error
messages like:

`None of the available extractors (FragmentedMp4Extractor, Mp4Extractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, TsExtractor, MatroskaExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, AviExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor, SubtitleTranscodingExtractor)`

PiperOrigin-RevId: 636834354
2024-05-24 01:44:12 -07:00
Copybara-Service
0a58832d85 Merge pull request #1315 from datdoantelus:ClosedCaption_708Decoder_bugfix
PiperOrigin-RevId: 636591170
2024-05-23 10:18:02 -07:00
ibaker
e150e0d39f Remove OkHttpDataSource constructors & OkHttDataSourceFactory
Use `OkHttpDataSource.Factory` instead.

PiperOrigin-RevId: 636585523
2024-05-23 10:03:12 -07:00
ibaker
4986fdd1a6 Remove deprecated setContentTypePredicate() methods
Use the suggested alternative on the respective
`XXXDataSource.Factory` instead.

PiperOrigin-RevId: 636560182
2024-05-23 08:32:26 -07:00
ibaker
68c16782d7 Migrate buildConfig from properties.gradle to build.gradle
This is generated in response to a deprecation warning in AS:

```
The option setting 'android.defaults.buildfeatures.buildconfig=true' is deprecated.
The current default is 'false'.
It will be removed in version 9.0 of the Android Gradle plugin.
You can resolve this warning in Android Studio via `Refactor` > `Migrate BuildConfig to Gradle Build Files`
```

PiperOrigin-RevId: 636546985
2024-05-23 07:40:46 -07:00
tonihei
7b352e1903 Add more details to thread assertion in onAudioCapabilitiesChanged
This helps to debug issues reported in https://github.com/androidx/media/issues/1191

PiperOrigin-RevId: 636545970
2024-05-23 07:37:04 -07:00
ibaker
f5438c9d55 Remove jetifier config from gradle config
None of the AndroidX libs we depend on require jetification any more.

Issue: androidx/media#1362
PiperOrigin-RevId: 636544337
2024-05-23 07:32:27 -07:00
Ian Baker
e87b820626 Add release note 2024-05-23 15:27:25 +01:00
Ian Baker
3aebb38cd3 Rename and reshuffle tests 2024-05-23 15:27:19 +01:00
datdoantelus
ed5d47e856 Add cea708Decoder test for setPenLocation command and newline handling 2024-05-23 15:22:13 +01:00
datdoantelus
327d26cb32 remove test comment 2024-05-23 15:21:45 +01:00
datdoantelus
ec3065e981 revert rowLock and colomnLock changes since it will be done separately 2024-05-23 15:21:32 +01:00
datdoantelus
3b7ec52ca8 Ignore rowLock and numLock as define in CTA-708 spec.
Update current row value when new line is added.
2024-05-23 15:21:11 +01:00
andrewlewis
174d452bf7 Add missing module registrations
PiperOrigin-RevId: 636506860
2024-05-23 04:50:01 -07:00
samrobinson
414dbebc2b Assert file size in E2E android tests that claim to complete.
Remove redundant test logic to add file size to ExportResult because
the file size is already added to export result as part of an export
finishing.

PiperOrigin-RevId: 636499236
2024-05-23 04:17:19 -07:00
tonihei
08006651fa Update session module registration
PiperOrigin-RevId: 636482934
2024-05-23 03:11:51 -07:00
Googler
37c2d9957e Fragmented Mp4Muxer: add support to B-frame Muxing
Add composition time offset parameter to TRUN box to
support muxing of videos containing B-frames by FragmentedMp4Muxer.
Update TRUN box version from 0 to 1 in order to manage signed
composition time offset.

PiperOrigin-RevId: 636426397
2024-05-22 23:07:35 -07:00
ybai001
205bbef9d6 Add DV profile 10 handling in getAlternativeCodecMimeType() method 2024-05-23 09:42:43 +08:00
ybai001
e060c92068
Merge pull request #9 from androidx/main
Merge latest androidx/media main branch
2024-05-23 09:37:35 +08:00