13882 Commits

Author SHA1 Message Date
andrewlewis
824f69e651 Fix typos
PiperOrigin-RevId: 430220416
2022-02-22 17:17:52 +00:00
ibaker
06ada01730 Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-22 17:14:15 +00:00
andrewlewis
6fac6177df Suppress framework muxer lint warning
We need to access internal state to work around resources not being released on
old API versions. Add a reference to the bug about this and suppress the lint
warning.

#minor-release

PiperOrigin-RevId: 430190794
2022-02-22 17:10:50 +00:00
ibaker
1b5a0c11ab Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-22 17:07:09 +00:00
andrewlewis
5867a3a29c Fix typos
PiperOrigin-RevId: 430220416
2022-02-22 17:05:01 +00:00
ibaker
805959df8b Suppress @VisibleForTesting violation in Transformer
#minor-release

PiperOrigin-RevId: 430200331
2022-02-22 17:03:56 +00:00
hschlueter
19e21d6fba Split out ExternalCopyFrameProcessor.
All (later customizable) GlFrameProcessors after the
ExternalCopyFrameProcessor receive their input from a normal OpenGL
texture not an external texture, so they won't need to worry about
the textureTransformMatrix.

PiperOrigin-RevId: 430165652
2022-02-22 17:03:25 +00:00
andrewlewis
0490839fce Suppress framework muxer lint warning
We need to access internal state to work around resources not being released on
old API versions. Add a reference to the bug about this and suppress the lint
warning.

#minor-release

PiperOrigin-RevId: 430190794
2022-02-22 17:03:06 +00:00
ibaker
42340bf5ac Fix DefaultAnalyticsCollectorTest failure when run with JaCoCo
#minor-release

PiperOrigin-RevId: 430189385
2022-02-22 17:01:55 +00:00
hschlueter
e8977d00c5 Split out ExternalCopyFrameProcessor.
All (later customizable) GlFrameProcessors after the
ExternalCopyFrameProcessor receive their input from a normal OpenGL
texture not an external texture, so they won't need to worry about
the textureTransformMatrix.

PiperOrigin-RevId: 430165652
2022-02-22 17:01:04 +00:00
ibaker
760fe78fbd Redefine VERSION_INT to include alpha/beta/rc/stable
#minor-release

PiperOrigin-RevId: 429596966
2022-02-22 11:25:51 +00:00
aquilescanta
9bc717da31 Depend on llvm-xy bin utils instead of GNU's binutils
NDK 23 removes GNU's bin utils. More info in
https://android.googlesource.com/platform/ndk/+/master/docs/BuildSystemMaintainers.md#binutils.

LLVM bin utils are available in all modern NDK versions.

#minor-release
Issue: google/ExoPlayer#9933
PiperOrigin-RevId: 429299806
2022-02-22 11:25:51 +00:00
olly
cbcf7cd69a Make sure native library loads use correct class loader
Merge of https://github.com/google/ExoPlayer/pull/9934

PiperOrigin-RevId: 429259055
2022-02-22 11:25:44 +00:00
olly
25e58f5f2a Remove deprecated Player track methods
getCurrentTrackGroups and getCurrentTrackSelections are
retained for now, but moved from Player to ExoPlayer, to
ease the transition for some application code that currently
uses these methods.

PiperOrigin-RevId: 430036355
2022-02-22 10:58:21 +00:00
samrobinson
e4eb583922 Reduce the length of the FrameEditorDataProcessingTest TAG.
As per f2ad8ccd3c, log tags can not be longer than 23 chars.

PiperOrigin-RevId: 430032243
2022-02-22 10:54:54 +00:00
huangdarwin
903c8d56cc Transformer: Work around Samsung/OnePlus decoder dequeueBuffer failed.
#mse-bug-week

PiperOrigin-RevId: 430028245
2022-02-22 10:51:25 +00:00
olly
81dd7b343c Add missing import for ExoPlayer GitHub project
PiperOrigin-RevId: 429999620
2022-02-22 10:48:03 +00:00
claincly
a3a0ffc82f Re-enable RepeatedTranscodeTransformationTest.
There are two major blockers to this test:

- H265 muxing is not available for API<24, so setting video mimeType to H265
  will fail on those devices.
- AMR audio encoding is buggy on some device and it's not a widely used format.

The solution: use a video that is encoded with AVC/MP3, to ensure transcoding
to AVC/AAC.

PiperOrigin-RevId: 429648598
2022-02-22 10:44:41 +00:00
samrobinson
666998f0fb Add a new sample file to assets, which has increasing timestamps.
Re-enable tests that have no muxer support for timestamps going backwards.

Tests running on the B-frame sample will be added in a future commit.

#mse-bug-week

PiperOrigin-RevId: 429599177
2022-02-22 10:41:07 +00:00
olly
bdc3af1416 Remove deprecated Player track methods
getCurrentTrackGroups and getCurrentTrackSelections are
retained for now, but moved from Player to ExoPlayer, to
ease the transition for some application code that currently
uses these methods.

PiperOrigin-RevId: 430036355
2022-02-22 10:35:04 +00:00
samrobinson
3851ef3d69 Reduce the length of the FrameEditorDataProcessingTest TAG.
As per f2ad8ccd3c, log tags can not be longer than 23 chars.

PiperOrigin-RevId: 430032243
2022-02-22 10:34:16 +00:00
ibaker
9961d918a9 Rollback of 8d9c4f4774
*** Original commit ***

Rollback of 43b796b64d

*** Original commit ***

Rollback of 08c5b1cb0a

*** Original commit ***

Wire up MediaMetricsListener and add configuration to...

***

PiperOrigin-RevId: 429585773
2022-02-22 10:34:13 +00:00
huangdarwin
3e9d45f0ea Transformer: Work around Samsung/OnePlus decoder dequeueBuffer failed.
#mse-bug-week

PiperOrigin-RevId: 430028245
2022-02-22 10:32:46 +00:00
claincly
a196b5ec43 Re-enable RepeatedTranscodeTransformationTest.
There are two major blockers to this test:

- H265 muxing is not available for API<24, so setting video mimeType to H265
  will fail on those devices.
- AMR audio encoding is buggy on some device and it's not a widely used format.

The solution: use a video that is encoded with AVC/MP3, to ensure transcoding
to AVC/AAC.

PiperOrigin-RevId: 429648598
2022-02-22 10:31:07 +00:00
samrobinson
d7adb94669 Add a new sample file to assets, which has increasing timestamps.
Re-enable tests that have no muxer support for timestamps going backwards.

Tests running on the B-frame sample will be added in a future commit.

#mse-bug-week

PiperOrigin-RevId: 429599177
2022-02-22 10:30:18 +00:00
ibaker
ad35995d54 Redefine VERSION_INT to include alpha/beta/rc/stable
#minor-release

PiperOrigin-RevId: 429596966
2022-02-22 10:29:12 +00:00
ibaker
99d2b11329 Rollback of caf62842c4
*** Original commit ***

Rollback of c2cb22a056

*** Original commit ***

Rollback of 1521e50307

*** Original commit ***

Wire up MediaMetricsListener and add configuration to...

***

PiperOrigin-RevId: 429585773
2022-02-22 10:28:20 +00:00
bachinger
bb7ee69870 Use service context in DefaultActionFactory
We need to use a Service to create the pending intents in the
`DefaultActionFactory`.

PiperOrigin-RevId: 429115746
2022-02-22 10:25:07 +00:00
bachinger
00f93ac035 Clear ad playback state map when AdsLoader is released
#minor-release

PiperOrigin-RevId: 429067634
2022-02-22 10:21:40 +00:00
bachinger
49bb768323 Integrate IMA SSAI samples in main demo app
PiperOrigin-RevId: 429059793
2022-02-22 10:21:40 +00:00
bachinger
899d458c7b Make AdsLoader.State implement Bundleable
This allows the AdsLoader.State to be stored in savedInstanceState

#minor-release

PiperOrigin-RevId: 429057697
2022-02-22 10:21:40 +00:00
bachinger
ccfb126b8a Copy playback configuration when creating the content media item
#minor-release

PiperOrigin-RevId: 429006934
2022-02-22 10:21:40 +00:00
kimvde
5ed7523158 Handle player release timing out in transformer
- The resources were released twice before, which is not necessary since
  the MSG_RELEASE message is already in the internal player queue.
- The demo app was failing because the stop watch was stopped in
  onTransformationError after being reset.

#minor-release
#mse-bug-week

PiperOrigin-RevId: 428794426
2022-02-22 10:21:40 +00:00
bachinger
b9b1be4f3e Store ad playback state in AdsLoader for resume after backgrounding
#minor-release

PiperOrigin-RevId: 428763656
2022-02-22 10:21:40 +00:00
hschlueter
33afc4760b Track presentation timestamps in FrameEditor.
PiperOrigin-RevId: 428763554
2022-02-22 10:21:37 +00:00
bachinger
238d9ca57b Disable IMA SSAI DASH live streams for now
#minor-release

PiperOrigin-RevId: 428761508
2022-02-21 17:11:39 +00:00
bachinger
b5d5f492e7 Prevent adding multiple IMA SSAI media source instances to the playlist
Currently only a single instance of ImaServerSideAdInsertionMediaSource is
supported at the same time in a playlist. This change makes sure that an
attempt to add multiple instances is prevented by throwing a an exception.

#minor-release

PiperOrigin-RevId: 428743140
2022-02-21 17:11:38 +00:00
bachinger
fe55d982f1 Skip played server side inserted ads in a single period window
This change makes sure played server side ads are skipped in a single period
timeline. It avoids creating an ad-MediaPeriodInfo for played postrolls and
creates a content info instead. It also sets the end position for content infos
that terminate the stream before the stream is actually finished. This prevents
the player from continue playing the remaining media delivered by the
MediaPeriod.

We also make sure that the discontinuity of played ads are not reported because
there is actually no discontinuity.

#minor-release

PiperOrigin-RevId: 428734387
2022-02-21 17:11:38 +00:00
bachinger
16261967c0 Do not manipulate the duration of SSAI periods in FakeTimeline
#minor-release

PiperOrigin-RevId: 428727560
2022-02-21 17:11:38 +00:00
bachinger
24cd34dd0d Reset stream manager in AdsLoader.release()
This prevents a stack trace that is shown in the logs when the stream manager is
released after the activity was stopped. In this case the call to
`streamManager.destroy()` coming from `releaseSourceInternal()` of the media
source is too late and produces an error saying `Application attempted to call on
a destroyed WebView`. The error has no effect but it's nice to not have this
stack trace in the logs.

PiperOrigin-RevId: 428574231
2022-02-21 17:11:38 +00:00
bachinger
6df893a7cd Make AdsLoader.addMediaSourceResources package private.
#minor-release

PiperOrigin-RevId: 428565444
2022-02-21 17:11:38 +00:00
andrewlewis
d9253c6f51 Fix debug frame showing through player on old devices
PiperOrigin-RevId: 428524300
2022-02-21 17:11:38 +00:00
bachinger
29c0054a0a Seek to start position when reusing the last used shared period
The last used shared media period is reused after all media periods have been
released. In case the sample streams are already filled up, they need to be
reset or they download samples from the current position up to the seek
position. This causes long buffering states or load stuck exceptions.

A seek when reusing the shared period takes care for reseting the period or
internally seeks to the current position in the already available samples.

#minor-release

PiperOrigin-RevId: 428484187
2022-02-21 17:11:38 +00:00
tonihei
418726d04b Make usage of live minDurationForQualityIncrease more consistent
We have two ways to choose the minDurationForQualityIncreaseMs value in
AdaptiveTrackSelection: use the configured value for non-live or when
enough buffered data is available, or use a fraction of the available
duration to allow switching when playing close to the live edge.

The decision point when to use which value isn't quite consistent because
we compare against availableDurationUs before making the adjustments. This
means there is range of values where no up-switching is possible despite
perfect buffering. Fix this by choosing the minimum of both values.

Issue: google/ExoPlayer#9784

#minor-release

PiperOrigin-RevId: 428474332
2022-02-21 17:11:38 +00:00
bachinger
2b817fb6f6 Use content timeline to get ad group index and ad index in ad group
The timeline used to map ad groups to periods needs to report the original content period duration without subtracting the serverside inserted ad duration. When marking played ads in onPositionDiscontinuity, the public timeline has been used which crashed the app when the ads media source is playing on a window index different to zero (in a playlist).

#minor-release

PiperOrigin-RevId: 428465833
2022-02-21 17:11:38 +00:00
andrewlewis
e777bedd40 Improve transformer activity layout
On Samsung S21 with light theme the debug labels weren't showing up because the player view was visible (with a black background) while the transformation was in progress, matching the debug label text color. Hide the player view until the transformation is complete to fix this.

Also tweak the layout slightly to add space between the card border and the labels.

#mse-bug-week

PiperOrigin-RevId: 428455824
2022-02-21 17:11:38 +00:00
krocard
b8c3d97bf9 Do not reference AnalyticsCollector in common constructor
This prevents it to be stripped by R8 if a custom one is
passed.

#minor-release

PiperOrigin-RevId: 428034999
2022-02-21 17:11:38 +00:00
christosts
71f21ccfa6 Create MediaNotification.Provider
Define MediaNotification.Provider so that apps can customize
notification UX. Move MediaNotificationManager's functionality
around notifications on DefaultMediaNotificationProvider

PiperOrigin-RevId: 428024699
2022-02-21 17:11:38 +00:00
bachinger
0367fafa6c Resolve media period ids in multi-period windows
Ignorable ad periods are skipped to resolve the media period id with the
ad playback state of the resulting period. In case of a change in the period
position un-played ad periods are rolled forward to be played.

PiperOrigin-RevId: 428011116
2022-02-21 17:11:38 +00:00
tonihei
449a840f88 Add some missing thread verifications
This adds some missing calls to verifyApplicationThread to
ExoPlayerImpl.

Now all public methods start with this call, except listener
registrations because registration after construction on a background
thread is allowed and supported.

PiperOrigin-RevId: 428009498
2022-02-21 17:11:38 +00:00