1473 Commits

Author SHA1 Message Date
olly
d01093d711 Rollback of dd7b379dc0
*** Original commit ***

DataSource.open() throws if already opened.

Update DataSource implementations to throw an error if open() is called
when the DataSource is already open.

***

PiperOrigin-RevId: 348783425
2020-12-23 22:53:24 +00:00
christosts
dd7b379dc0 DataSource.open() throws if already opened.
Update DataSource implementations to throw an error if open() is called
when the DataSource is already open.

PiperOrigin-RevId: 348609860
2020-12-23 22:52:21 +00:00
bachinger
62720858ed Make CronetDataSourceFactory an inner class of CronetDataSource
#exofixit

PiperOrigin-RevId: 348444280
2020-12-23 22:51:38 +00:00
andrewlewis
e791e3ce54 Fix checking imaAdMediaInfo nullness
It's intended to log a warning in this case, rather than throw.

Issue: #8290

#minor-release

PiperOrigin-RevId: 347790527
2020-12-17 11:25:53 +00:00
andrewlewis
0633778c70 Fix handling of repeated ads identifiers
Previously the `AdTagLoader` only had one listener which meant that updates
that should affect all periods with matching identifiers in the timeline only
affected the last-attached one. Fix this by having `AdTagLoader` track all its
listeners.

Issue: #3750
PiperOrigin-RevId: 347571323
2020-12-17 11:25:53 +00:00
andrewlewis
4139ee5c52 Improve ad loader listening in ImaAdsLoaderTest
It is more realistic for each source to have its own listener and to share
`TimelineWindowDefinition`s between them.

Issue: #3750
PiperOrigin-RevId: 347398769
2020-12-17 11:25:53 +00:00
bachinger
6114c894df Make OkHttpDataSourceFactory an inner class of OkHttpDataSource
#exofixit

PiperOrigin-RevId: 347389531
2020-12-17 11:25:53 +00:00
bachinger
a335c96450 Deprecate HttpDataSource.Factory.getDefaultRequestProperties
#exofixit

PiperOrigin-RevId: 347375323
2020-12-17 11:25:52 +00:00
sungsoo
4907cf877a Make media2 extension depend on androidx media2 1.1.0
Issue: #8011
#minor-release
PiperOrigin-RevId: 347288689
2020-12-14 10:19:03 +00:00
bachinger
2ee40270e5 Support setPlaybackSpeed(float) with the MediaSessionConnector
Issue: #8229
#exofixit
PiperOrigin-RevId: 346968046
2020-12-14 10:17:53 +00:00
bachinger
05c928f96d Add live configuration to Timeline.Window
Issue: #5011
PiperOrigin-RevId: 346828103
2020-12-14 10:17:23 +00:00
andrewlewis
6796c4d01c Add a setting for enabling continuous playback
Issue: #3750
PiperOrigin-RevId: 346079830
2020-12-14 10:14:55 +00:00
andrewlewis
ebe54113a9 Fix SonicAudioProcessor end of stream behavior
The `AudioProcessor` interface requires that no more input is queued after
queueing end of stream, but `DefaultAudioSink` did queue more input and the
implementation of `SonicAudioProcessor` actually relied on this to drain output
at the end of the stream.

Fix this behavior by getting `Sonic` output in `getOutput` and having
`DefaultAudioSink` only queue input to processors that are not draining.

Also add TODOs to clean up audio processor implementations where the code
handles interaction that doesn't conform to the interface.

PiperOrigin-RevId: 345406478
2020-12-03 17:11:47 +00:00
olly
104ad64b76 Change CronetDataSource.buildRequestBuilder method to protected.
This allows overriding the implementation of building the UrlRequest
from dataSpec when necessary

PiperOrigin-RevId: 345149165
2020-12-03 17:10:35 +00:00
tonihei
de67030f24 Add back VpxOutputBuffer proguard config.
This is needed to support old binary builds that still rely on the
existance of this class.

PiperOrigin-RevId: 344799495
2020-11-30 16:11:36 +00:00
aquilescanta
054bff80fd Fix ffmpeg build script's strip tool for armeabi-v7a
Broken in bf21e3c690.

PiperOrigin-RevId: 344777455
2020-11-30 16:11:19 +00:00
krocard
538445572d Move FormatSupport in common
#player-to-common

PiperOrigin-RevId: 344558028
2020-11-30 09:33:11 +00:00
olly
50bbfb57c0 Mini phrasing tweak
PiperOrigin-RevId: 344535069
2020-11-30 09:33:00 +00:00
andrewlewis
99f48ccaa0 Fix typo
PiperOrigin-RevId: 344526343
2020-11-30 09:32:48 +00:00
aquilescanta
e4adf99ac0 Use symlinking for dependency on libvpx
As opposed to in-source git-clone.

PiperOrigin-RevId: 344525899
2020-11-30 09:32:37 +00:00
andrewlewis
4446e2637d Fix unexpected multiline comments
#exofixit

PiperOrigin-RevId: 344517105
2020-11-30 09:32:25 +00:00
tonihei
87cd644d00 Add remaining proguard config tests.
This ensures we have full test coverage for proguard configs now.
The only configs not covered by tests are:
 - IMA and OkHttp which copy recommended configs from the respective
   library. I couldn't reproduce failures by removing them (and thus
   couldn't write a test that ensures they are correct).
 - Some dontwarn lines that just suppress warnings.

In addition, this change fixes a couple of related issues:
 - Moved AV1 proguard config to correct module.
 - Removed mentioning of deprecated ExtractorMediaSource from README
 - Suppressed warning from IMA code that prevent proguarding under
   strict rules
 - Fixed wrong proguard exclusion in VP9 module.
 - Moved FLAC exclusion (DefaultExtractorsFactory) to correct module.
 - Added AlertDialog suppression for de-jetified code.
 - Removed unusued dependency from UI module that causes large APK
   size increase.

#exofixit
#minor-release

PiperOrigin-RevId: 344427532
2020-11-27 11:08:34 +00:00
aquilescanta
1cdf5e79e3 Rename the FFMPEG extension binary to ffmpegJNI
Instead of ffmpeg_jni for consistency with other extensions.

PiperOrigin-RevId: 344411014
2020-11-27 11:07:55 +00:00
aquilescanta
bf21e3c690 Make libffmpeg_jni link statically against ffmpeg
Also make compilation automatically determine the number of
threads to use during compilation.

PiperOrigin-RevId: 344264761
2020-11-27 11:07:15 +00:00
olly
2fbad2105e Make special exception for cleartext-not-permitted
#exofixit

PiperOrigin-RevId: 344246408
2020-11-27 11:07:07 +00:00
andrewlewis
ee36e648e3 Fix ad progress updates after rebuffering an ad
Issue: #8239

#exofixit
#minor-release

PiperOrigin-RevId: 344211877
2020-11-27 11:06:35 +00:00
bachinger
58e01671e1 Use onEvents in MediaSessionConnector to avoid multiple updates.
#exofixit

PiperOrigin-RevId: 344065556
2020-11-27 11:06:02 +00:00
andrewlewis
809b8a0679 Removed unneeded activity from media2 extension tests
These tests appear not to need an activity, and removing it means we don't need
to switch away from the deprecated `ActivityTestRule`.

#exofixit

PiperOrigin-RevId: 344037927
2020-11-24 16:03:21 +00:00
andrewlewis
1b1a1a6414 Mark pending TODOs for media2 1.1.0 consistently
#exofixit

PiperOrigin-RevId: 344031062
2020-11-24 16:03:12 +00:00
olly
2ddb5b8d94 Update nullness issue in SilkCastApiImpl.java,SessionCallback.java
Null check warning was reported by //java/com/google/android/apps/gsa/staticplugins/silk/silkcast:silkcast_nullness_checker

//third_party/java_src/android_libs/exoplayer/v2/extensions/media2/src/main:library_nullness_test

PiperOrigin-RevId: 343939763
2020-11-24 16:02:55 +00:00
tonihei
d4e1904604 Rollback of 483a350e84
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

LSC: go/checker-lsc

Tested:
    TAP train for global presubmit queue
    http://test/OCL:342788973:BASE:342817196:1605636478036:6c558c0c

***

PiperOrigin-RevId: 343895651
2020-11-24 16:02:45 +00:00
olly
64d11a98ec Reference IMA language code bug
PiperOrigin-RevId: 343883034
2020-11-24 16:02:37 +00:00
andrewlewis
05f6d24821 Add support for ad playlists with ImaAdsLoader
Issue: #3750
PiperOrigin-RevId: 343878310
2020-11-24 16:02:17 +00:00
olly
689e89e5f3 Localize IMA based on device locale by default
#exofixit

PiperOrigin-RevId: 343871061
2020-11-24 16:02:07 +00:00
tonihei
bd631a6ce2 Add onEvents callback.
This callback allows listeners to know when all simultanous changes
have been handled and the values reported through callbacks are
again completely consistent with value obtained from Player
getter calls.

PiperOrigin-RevId: 343476639
2020-11-20 17:10:05 +00:00
sungsoo
2f1c0a5d0d Allow to remove all playlist items
PiperOrigin-RevId: 343437513
2020-11-20 11:11:08 +00:00
sungsoo
d67b70340e Refactor ComponentListener of PlayerWrapper
PiperOrigin-RevId: 343432873
2020-11-20 11:10:58 +00:00
tonihei
f13ffb4390 Rollback of 5d9c2d7b6a
*** Original commit ***

Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.

***

PiperOrigin-RevId: 343086403
2020-11-18 18:40:30 +00:00
olly
3c91ba14b3 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 343003559
2020-11-18 18:40:17 +00:00
olly
483a350e84 Suppress warnings in preparation for Checker Framework 3.7.1 upgrade.
PiperOrigin-RevId: 342999390
2020-11-18 18:40:06 +00:00
olly
4ff7eb4905 Fix CronetDataSource handling of 200 response for range request
Issue: #8090
#minor-release
PiperOrigin-RevId: 342638922
2020-11-16 16:50:58 +00:00
olly
c47e62209d Report reasons for not being able to reuse decoders
PiperOrigin-RevId: 342344090
2020-11-16 16:49:48 +00:00
bachinger
b03df4e8b5 Add dispatchPrepare(player) to ControlDispatcher
Issue: #7882
PiperOrigin-RevId: 341394254
2020-11-11 09:49:32 +00:00
andrewlewis
ae4cf9f1da Clean up AdTagLoader and ImaAdsLoader
In preparation for adding support for ads in playlists:
- Make releasing a no-op if the instance was already released
- Remove null checks on non-null `adDisplayContainer` and `adsLoader`
- Move initializing the ads manager into a private method as it will need to be
  called from two places soon.
- Misc other cleanup.

Issue: #3750
PiperOrigin-RevId: 341021493
2020-11-06 16:35:14 +00:00
andrewlewis
764e5e8141 Expose the ads identifier in the Timeline period
Issue: #3750
PiperOrigin-RevId: 341021084
2020-11-06 16:35:06 +00:00
andrewlewis
0c301fefa8 Pass AdsMediaSource to other AdsLoader methods
Issue: #3750
PiperOrigin-RevId: 341020676
2020-11-06 16:34:57 +00:00
andrewlewis
5fd1601f91 Signal an ads identifier to the AdsLoader
In a later change, the AdPlaybackState will include the playing adsId (set by
the AdsLoader) and the ads loader will use this to determine what ad
information is associated with the playing/next periods, to allow loading ads
in playlists.

Apps can continue to pass just a URI for an ad tag with their MediaItem, in
which case the associated playlist will request that ad tag just and the same
state will be used for all occurrences of the ad tag.

This change has breaking changes to the AdsLoader interface and removes
deprecated ways of passing the ad tag, as it's very likely to go into a major
release anyway and not needing to handle the deprecated cases simplifies
ImaAdsLoader.

Issue: #3750
PiperOrigin-RevId: 340438580
2020-11-06 16:32:31 +00:00
andrewlewis
57c53c5ac4 Fix ImaPlaybackTest
This test is not run in presubmit as it was too flaky, and is currently broken
due to assets moving.

Also migrate off ImaPlaybackTest off deprecated APIs.

#minor-release

PiperOrigin-RevId: 340405666
2020-11-06 16:32:11 +00:00
andrewlewis
4289112947 Fix buildForAdsResponse
PiperOrigin-RevId: 340198099
2020-11-02 23:01:07 +00:00
andrewlewis
32b710712e Split AdTagLoader out of ImaAdsLoader
In a later change ImaAdsLoader will use multiple AdTagLoaders.

This change shouldn't have any substantial changes in behavior (it's almost
entirely moving code around). An exception is that ImaSdkSettings is configured
when making a request rather than at construction time.

Issue: #3750
PiperOrigin-RevId: 339891712
2020-11-02 23:00:48 +00:00