17928 Commits

Author SHA1 Message Date
samrobinson
73e4348411 Verify the audio properties being used within Transformer.
Add TransformerAudioEndToEndTest to emulated tests.

PiperOrigin-RevId: 514991434
2023-03-14 07:51:18 +00:00
tianyifeng
bb9ac21434 Handle dead object error during writing buffer to AudioTrack
PiperOrigin-RevId: 514989776
2023-03-14 07:47:23 +00:00
kimvde
87d1c3e624 Fix threading issueis in SequenceAssetLoaderListener
Callbacks onTrackCount and onTrackAdded can be called simultaneously
from different threads.

Before this fix, it was possible for the MuxerWrapper and
FallbackListener track count to never be set, or to be set
with incorrect values.

PiperOrigin-RevId: 514779719
2023-03-14 07:43:16 +00:00
tonihei
fe710871aa Use current position code when checking if AudioTrack has pending data
We currently rely on the raw playback head position to check if any
data is pending in the AudioTrack (e.g. to know if the renderer is
still ready). We can use the value returned from getCurrentPositionUs
instead to align the "isReady" logic with the playback position logic.

This has the side effect that getPlaybackHeadPosition position is called
less often when the position is obtained via getTimestamp.

PiperOrigin-RevId: 514747613
2023-03-14 07:39:10 +00:00
tofunmi
82ab327e02 Update effect to take in and use a GlObjectsProvider
PiperOrigin-RevId: 514744747
2023-03-14 07:34:53 +00:00
rohks
0bec22f31b Fix copybara import in GlTextureInfo
PiperOrigin-RevId: 514728583
2023-03-07 15:48:06 +00:00
tonihei
0113174788 Make DefaultDashChunkSource more robust against empty segment timelines
Segment timelines are technically allowed to be empty, but not all places
add the necessary checks.

Issue: google/ExoPlayer#11014
PiperOrigin-RevId: 514722205
2023-03-07 15:43:41 +00:00
rohks
d83b4a358f Fix copybara import
PiperOrigin-RevId: 514720434
2023-03-07 15:06:27 +00:00
samrobinson
83192e870c Fix AudioMixer javadoc.
PiperOrigin-RevId: 514699994
2023-03-07 15:02:21 +00:00
huangdarwin
3b58a74d0c GL: Reduce visibility of GlProgram.loadAsset.
This is only used within the same class, so can be private.

PiperOrigin-RevId: 514665000
2023-03-07 12:57:18 +00:00
samrobinson
2d22604efe Pass Metadata to Muxer when adding a track.
PiperOrigin-RevId: 514575400
2023-03-07 12:53:00 +00:00
tofunmi
e12de4cc1f Create GlObjectsProvider
To create this file TextureInfo has been moved to common and renamed to GLTextureInfo.

We'll look to expand the interface in future to cover more of the methods around GL object maintenance in future as required.

PiperOrigin-RevId: 514445397
2023-03-07 12:48:40 +00:00
kimvde
ce9fa88c0d Rename CompositeAssetLoader to SequenceAssetLoader
This clarifies that a SequenceAssetLoader loads data corresponding to an
EditedMediaItemSequence.

PiperOrigin-RevId: 514442681
2023-03-07 12:44:22 +00:00
tofunmi
f94d3cf6c4 ImageAssetLoaderTest minor fixes
PiperOrigin-RevId: 514436359
2023-03-07 12:40:08 +00:00
tofunmi
6188952682 Add ImageAssetLoader tests.
PiperOrigin-RevId: 514431184
2023-03-07 12:35:55 +00:00
kimvde
55f2d1a5e2 Make onOutputFormat nullable
- This is to make sure we know about all the tracks before initializing
the SamplePipelines. This allows to set the muxer and the fallback
listener track count before the SamplePipelines are built.
- As a result, the test files had to be updated because the order in
which the tracks are written has changed.
- The ImageAssetLoader also had to be updated to call onOutputFormat
repeatedly until it returns a non-null SampleConsumer.
- Also fix the trackCount sent to the muxer and fallback listener. The
correct track count can be computed now that we know about all the
tracks before building the SamplePipelines.

PiperOrigin-RevId: 514426123
2023-03-07 12:31:43 +00:00
huangdarwin
67e359c867 GL: Delete frame buffers after use.
Before, we used to never call glDeleteFramebuffers, which could
in theory lead to leaks in the number of frame buffers
available and make releasing the GL context more expensive.

PiperOrigin-RevId: 514387847
2023-03-07 12:27:32 +00:00
sheenachhabra
db6064288c Create orientation matrix byte array using util method
PiperOrigin-RevId: 514375835
2023-03-07 12:23:14 +00:00
ibaker
06741778e4 Update templates to more clearly signpost between exoplayer2 and media3
Issue: google/ExoPlayer#11031

#minor-release

PiperOrigin-RevId: 514366016
2023-03-07 12:18:59 +00:00
ibaker
d67c869378 Add missing @param tags
Dackka generates a warning if a method has at least one `@param` tag,
but not all of them are documented.

#minor-release

PiperOrigin-RevId: 513873453
2023-03-07 12:14:41 +00:00
ibaker
abcb8061b7 Remove references to MetadataOutput from dev guide
This is now a much more 'internal' component, and there's no way to
register one directly on a `Player` instance.

Issue: androidx/media#258

#minor-release

PiperOrigin-RevId: 513849776
2023-03-07 12:10:28 +00:00
ibaker
af45bedfcd Ensure ForwardingPlayer users do listener registration correctly
The `@CallSuper` annotation should help catch cases where subclasses are
calling `delegate.addListener` instead of `super.addListener` but it
will also (unintentionally) prevent subclasses from either completely
no-opping the listener registration, or implementing it themselves in a
very custom way. I think that's probably OK, since these cases are
probably unusual, and they should be able to suppress the warning/error.

Issue: androidx/media#258

#minor-release

PiperOrigin-RevId: 513848402
2023-03-07 12:06:07 +00:00
tofunmi
e8c86e1bae Remove effect/SimpleBitmapLoader & replace with DataSourceBitmapLoader
PiperOrigin-RevId: 513824487
2023-03-07 12:01:50 +00:00
kimvde
db540a02b7 Make sure that tracks are transcoded/transmuxed consistently
All audio tracks should either all be transcoded or all be transmuxed.
Same for video tracks.

To achieve this, simplify the behaviour of transmuxAudio/Video.

PiperOrigin-RevId: 513809287
2023-03-07 11:57:35 +00:00
samrobinson
93b9cc731d Provide TransformerInternal with the AssetLoader output format.
TI can use this Format as part of creating the SamplePipelines.

PiperOrigin-RevId: 513777622
2023-03-07 11:53:03 +00:00
sheenachhabra
b9ade43a19 Fix nit issues in muxer end to end tests
Renamed MuxerEndToEndTest.java to Mp4MuxerEndToEndTest.java to align it with class under test.
Removed muxed prefix from dump file name because Mp4 implicitely means muxed only.

PiperOrigin-RevId: 513574681
2023-03-07 11:48:32 +00:00
tonihei
0f85157a0d Merge branch 'release-v2' into dev-v2 2023-03-03 10:45:21 +00:00
tonihei
bc3537260b
Merge pull request #11034 from google/release-v2-r2.18.4
r2.18.4
2023-03-03 10:01:45 +00:00
tonihei
86013bdc36 Update release notes for ExoPlayer 2.18.4
#minor-release

PiperOrigin-RevId: 513555559
(cherry picked from commit 4f68f891bca4d506ea552e1389060286474a6aae)
2023-03-02 17:58:16 +00:00
tonihei
c459b08b81 Fix lint-baseline.xml for latest UI translations
#minor-release

PiperOrigin-RevId: 513533248
(cherry picked from commit af6807d959ff7bb3166177b6d687d41bf937b650)
2023-03-02 17:58:16 +00:00
tonihei
05ac6ab15d Update Javadoc for 2.18.4
PiperOrigin-RevId: 513516267
(cherry picked from commit 658b5030e45435472d490fe7280a70c0196744d4)
2023-03-02 17:58:15 +00:00
tonihei
4f68f891bc Update release notes for ExoPlayer 2.18.4
#minor-release

PiperOrigin-RevId: 513555559
2023-03-02 17:44:11 +00:00
tonihei
af6807d959 Fix lint-baseline.xml for latest UI translations
#minor-release

PiperOrigin-RevId: 513533248
2023-03-02 17:39:57 +00:00
andrewlewis
9f0a6f1619 Fix typo
PiperOrigin-RevId: 513529059
2023-03-02 17:35:30 +00:00
andrewlewis
389d5ea229 Fix name for FrameCacheGlShaderProgram
This implements `GlShaderProgram` (and is GL-specific).

PiperOrigin-RevId: 513528160
2023-03-02 17:31:16 +00:00
tonihei
658b5030e4 Update Javadoc for 2.18.4
PiperOrigin-RevId: 513516267
2023-03-02 17:26:57 +00:00
samrobinson
8642594379 Add getNormalizedTrackType, mapping image to video track type.
PiperOrigin-RevId: 513514142
2023-03-02 17:22:29 +00:00
tonihei
c641307110 Bump version numbers to Media3 1.0.0-rc02 and ExoPlayer 2.18.4
#minor-release

PiperOrigin-RevId: 513488487
(cherry picked from commit 3b16231e29e4f952e4f44a179a1e91022f7bad36)
2023-03-02 13:54:32 +00:00
tonihei
4298cfabc6 Update migration script to 1.0.0-rc02/2.18.4
PiperOrigin-RevId: 513482096
(cherry picked from commit b634005c5f69f6a5ba47f58534fd41e16e237c25)
2023-03-02 13:54:30 +00:00
tonihei
3b16231e29 Bump version numbers to Media3 1.0.0-rc02 and ExoPlayer 2.18.4
#minor-release

PiperOrigin-RevId: 513488487
2023-03-02 13:28:55 +00:00
tonihei
b634005c5f Update migration script to 1.0.0-rc02/2.18.4
PiperOrigin-RevId: 513482096
2023-03-02 13:24:56 +00:00
christosts
d5ae16c0c9 Extend documentation for ForwardingPlayer
Add some additional information which methods to override
for available commands.

#minor-release

PiperOrigin-RevId: 513251805
(cherry picked from commit a64a9e67ca3bf34f29e525b1bdfbb73371a66ae7)
2023-03-02 09:57:58 +00:00
tonihei
d3ef80106e Merge pull request #255 from mayurk2:use_edts_offset_if_it_is_for_entire_file
PiperOrigin-RevId: 513213229
(cherry picked from commit d2ba290746221c8bd32e32d29050c78774c83f1f)
2023-03-02 09:57:58 +00:00
ibaker
a834d05387 Remove @see tags with <a> tags
These are not supported by Dackka

#minor-release

PiperOrigin-RevId: 513176533
(cherry picked from commit ef5a1ce9322352f084b992d370cad740edc43fa2)
2023-03-02 09:57:58 +00:00
christosts
bfc12ef59a Minor change in ForwardingPlayer javadoc
#minor-release

PiperOrigin-RevId: 512897269
(cherry picked from commit 48047cf9e8a75e30c3b464f2e89f9406c71b1271)
2023-03-02 09:57:58 +00:00
tonihei
c23010d3f6 Update translations
#minor-release

PiperOrigin-RevId: 512890813
(cherry picked from commit 13a86b38334bf8e34d79762edcf139e5ab731085)
2023-03-02 09:57:58 +00:00
tonihei
996d66052e Ensure getPlaybackHeadPosition isn't called if not needed
Once the value returned from AudioTimestampPoller advances, we
only need getPlaybackHeadPosition to sample sync params and
verify the returned timestamp. Both of these happen less often
and we can avoid calling getPlaybackHeadPosition if we don't
actually need it.

PiperOrigin-RevId: 512882170
(cherry picked from commit 4cf7d3c7acc7244bcbf2998f9fdb43c100ce51e1)
2023-03-02 09:57:58 +00:00
tonihei
3e7eeceb56 Fix some playback parameter signalling problems.
Playback parameter signalling can be quite complex because
 (a) the renderer clock often has a delay before it realizes
     that it doesn't support a previously set speed and
 (b) the speed set on media clock sometimes intentionally
     differs from the one surfaced to the user, e.g. during
     live speed adjustment or when overriding ad playback
     speed to 1.0f.

This change fixes two problems related to this signalling:
 1. When resetting the media clock speed at a period transition,
    we don't currently tell the renderers that this happened.
 2. When a delayed speed change update from the media clock is
    pending and the renderer for this media clock is disabled
    before the change can be handled, the pending update becomes
    stale but it still applied later and overrides any other valid
    speed set in the meantime.

Both edge cases are also covered by extended or new player tests.

Issue: google/ExoPlayer#10882

PiperOrigin-RevId: 512658918
(cherry picked from commit d363977156b49c1fe793bfc9709eb00595bfae6c)
2023-03-02 09:57:54 +00:00
tofunmi
5c2eea86a2 README.md line reflow.
PiperOrigin-RevId: 513289716
2023-03-02 08:21:46 +00:00
tofunmi
a6e0b5b9d6 Image frame processing color transfer fix
Used an actual captured image with set color profile for test to minimise the chance of the test flaking. Also renamed the media/bitmap/overlay folder to media/bitmap/input_images for clarity.

PiperOrigin-RevId: 513273353
2023-03-02 08:17:45 +00:00