10943 Commits

Author SHA1 Message Date
olly
50db2ee172 Remove deprecated Player.DefaultEventListener
PiperOrigin-RevId: 356479682
2021-02-09 14:00:06 +00:00
olly
30ad70bbd7 Remove deprecated DownloadNotificationUtil
PiperOrigin-RevId: 356474350
2021-02-09 13:59:57 +00:00
tonihei
4c9780abd0 Add ABR unit tests
This parameterized test execute a single playback with a variety of
specified network conditions, user country and network types, and then
compares some basic ABR performance data against a dump file to detect
changes.

PiperOrigin-RevId: 356468304
2021-02-09 13:59:49 +00:00
olly
94a4b905c9 Make additional modules depend only on common
ControlDispatcher and DefaultControlDispatcher also need
to move to common for the UI module. As does PlaybackPreparer,
although that will be removed entirely in a future release.

PiperOrigin-RevId: 356467394
2021-02-09 13:59:41 +00:00
olly
c501908dad Remove deprecated extension-jobdispatcher module
PiperOrigin-RevId: 356456843
2021-02-09 13:59:32 +00:00
andrewlewis
846bb94ec4 Handle loading the same ad more than once
Also allow the player's prepared ad media period durations array to exceed the
length of the loaded ad URIs array, as it's possible for the player to buffer
an ad media period fully at the point where it's known that an ad is coming up
but its URI is still unknown.

#minor-release

PiperOrigin-RevId: 356249284
2021-02-09 13:59:24 +00:00
tonihei
fbc8d6c801 Don't apply speed adjustment if windowStartTime is unknown.
This may happen for HLS live streams without program date time
information.

Issue: #8560

#minor-release

PiperOrigin-RevId: 356227729
2021-02-09 13:59:16 +00:00
kimvde
d21a47c4f1 Transformer: remove SpeedProvider interface from Javadoc
#minor-release

PiperOrigin-RevId: 356221487
2021-02-09 13:59:07 +00:00
aquilescanta
0b8b03e46d Add method to create a MediaFormat based on an ExoPlayer Format
PiperOrigin-RevId: 356157035
2021-02-09 13:58:59 +00:00
olly
01b6061bd2 Wire CodecException.isRecoverable to ExoPlaybackException
PiperOrigin-RevId: 355896218
2021-02-09 13:58:50 +00:00
tonihei
91c2f891a0 Ensure BandwidthProfileDataSource loading is fully deterministic
We currently block the loading thread until the calculated load
time has past and then unblock again by a message sent from the
playback thread. However, because the loading thread itself is not
using a Looper and runs freely, we don't control when the short
calculations on the loader thread that determine how long we have
to wait are happening, and we also don't control how long it takes
to start and stop this thread.

To solve these problems and to make the playback deterministic we
can
 1. Send a message on the playback thread to block until the loader
    thread has started.
 2. Block the playback thread whenever a loading thread is doing its
    short calculation of wait times. The playback thread knows when it
    can continue because loading either enter a new waiting state for
    a simulated load time or loading is finished completely.
 3. Also wait on the playback thread until the loader has shut down.
    As this is waiting for a message on the playback thread, we can
    achieve this by sending messages to ourselves at the current time
    until the loader is shut down.
All 3 steps together ensure that the loading thread interaction is
compeltely deterministic when simulating bandwidth profiles with the
BandwidthProfileDataSource. As we need to notify the source before and
after the load started/finished, we also need a small wrapper for the
chunk source when running the playback.

PiperOrigin-RevId: 355810408
2021-02-09 13:58:42 +00:00
olly
438bcada38 Consistently throw the original exception if recovery fails
PiperOrigin-RevId: 355664280
2021-02-09 13:58:33 +00:00
olly
a245fbdc99 #ExoPlayerMigration Ensure RawResourceDataSource class is obfuscated
PiperOrigin-RevId: 355659628
2021-02-09 13:58:24 +00:00
krocard
91d3f47e45 Clarify AudioFocusManager by renaming some methods/field
The current naming had cause confusinon in b/179369346
and #8545.

PiperOrigin-RevId: 355656404
2021-02-09 13:58:15 +00:00
kimvde
da52de669c Avoid skipping the first decoder output buffers after speed change
#minor-release

PiperOrigin-RevId: 355652144
2021-02-04 18:14:35 +00:00
olly
5107fea576 More clearly define the semantics of error recovery
- When throwing a recoverable error from a renderer, it's important to understand
  exactly how the player will attempt recovery. Clarify the documentation to
  make this explicit.
- Rename some methods/constants to make it clear that error recovery is specific
  to renderer errors. The current recovery mechanism only makes sense for
  renderer errors. Making the naming renderer specific avoids reader doubt that
  the implementation doesn't appear to be generic enough for other types of
  errors.

PiperOrigin-RevId: 355650945
2021-02-04 18:14:26 +00:00
olly
d08cacd9ba Finalize release notes for 2.13.0
PiperOrigin-RevId: 355621265
2021-02-04 16:17:34 +00:00
gyumin
d72d25470d Add Bundleable interface
It's for classes to clearly denote they support bundling and it gives
us a good place to document the best practice to implement fromBundle.

PiperOrigin-RevId: 355609942
2021-02-04 16:17:24 +00:00
kimvde
35d34af2e9 Fall back to AVC/HEVC for Dolby Vision levels 10-13
Before, the level was set to null in this case.
MediaCodecUtil.getCodecProfileAndLevel() was therefore returning null
and the fallback to AVC/HEVC was not enabled in MediaCodecVideoRenderer.

Issue:#8530
#minor-release
PiperOrigin-RevId: 355574499
2021-02-04 09:57:46 +00:00
olly
e345e0a5bc Upgrade some dependency versions
PiperOrigin-RevId: 355508621
2021-02-04 09:57:27 +00:00
Oliver Woodman
018493806f Merge branch 'release-v2' into dev-v2 2021-02-04 00:42:55 +00:00
Oliver Woodman
f931632ccc Merge branch 'release-v2' into dev-v2 2021-02-04 00:38:57 +00:00
olly
2a22b347c4 Suppress SwitchIntDef warning where it makes sense
In both cases it's deliberate that all excluded constants should use
the default branch. Furthermore, there are quite a lot of excluded
constants missing, so it's probably better to suppress the warning
than to include them all.

#minor-release

PiperOrigin-RevId: 355426749
2021-02-04 00:24:04 +00:00
olly
e98f5f34ce Fix gradle conflict resolution for Cronet tests
This resolves the following constraint resolution issue when running our release script:

> Cannot find a version of 'org.chromium.net:cronet-api' that satisfies the version constraints:
    Dependency path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'com.google.android.gms:play-services-cronet:17.0.0' --> 'org.chromium.net:cronet-api:72.3626.96'
    Constraint path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'org.chromium.net:cronet-api:{strictly 72.3626.96}' because of the following reason: debugRuntimeClasspath uses version 72.3626.96
    Dependency path 'com.google.android.exoplayer:extension-cronet:unspecified' --> 'org.chromium.net:cronet-embedded:76.3809.111' --> 'org.chromium.net:cronet-common:76.3809.111' --> 'org.chromium.net:cronet-api:76.3809.111'

#minor-release

PiperOrigin-RevId: 355414968
2021-02-04 00:23:55 +00:00
Larry Ng
bbcbe65f08 Add missing resource ids from StyledPlayerControlView 2021-02-03 12:52:49 -05:00
ibaker
710dff0388 Disable setOutputSurface workaround for all codecs in GTS tests
Issue: #8427
PiperOrigin-RevId: 355381785
2021-02-03 15:03:24 +00:00
kimvde
a2d0161eaf Add Transformer "Getting started" page
#minor-release

PiperOrigin-RevId: 355381610
2021-02-03 15:03:16 +00:00
olly
1bf53bfabc Refine ProGuard config workaround for Function
This is a more targeted workaround, which still allows for the
containing package name to be obfuscated.

#minor-release

PiperOrigin-RevId: 355381201
2021-02-03 15:03:07 +00:00
bachinger
63ae8f5417 Add PlayerNotificationManager.Builder
PiperOrigin-RevId: 355356169
2021-02-03 15:02:59 +00:00
olly
584a0730c9 Improve EventLogger static metadata formatting
#minor-release

PiperOrigin-RevId: 355203044
2021-02-03 15:02:50 +00:00
ibaker
8d1eddb027 Release notes tweaks for 2.13.0
* Move cherrypicked changes from dev-v2 to 2.13.0
* Use a bulleted list instead of comma-separated.
* Standardise everything into present, imperative sentences.
* Remove a couple of mixed-font words (I left cases with a separating
  apostrophe, as these seemed visually clearer).
* Merge multiple issue links into a single set of parentheses.

#minor-release

PiperOrigin-RevId: 355180143
2021-02-03 15:02:41 +00:00
ibaker
0b34cabca0 Document that DrmSessionManagerProvider doesn't call DSM#prepare()
#minor-release

PiperOrigin-RevId: 355159635
2021-02-03 15:02:32 +00:00
olly
b1920f3a78 Fix ProGuard configuration for 2.13
Note: We only support pro-guard on a best effort basis,
and developers should use R8 whenever possible.

#minor-release

PiperOrigin-RevId: 355129695
2021-02-02 13:06:52 +00:00
tonihei
05fddff84f Modernize bandwidth profile simulator.
Main improvement is to switch away from ExoPlayerTestRunner and to
split out the waiting component so that the same class can be used
from Robolectric tests in the future.

The only functional difference is that that BufferLengthLogAction
is removed completely because the data isn't used downstream and the
method of collecting this data is a bit arbitrary.

PiperOrigin-RevId: 355117850
2021-02-02 13:06:43 +00:00
TadejZupancic
331a444e46 Remove log 2021-02-01 20:39:27 +01:00
TadejZupancic
751b3f2dee Remove log 2021-02-01 20:35:44 +01:00
TadejZupancic
d3b091b22a Merge branch 'dev-v2' of https://github.com/TadejZupancic/ExoPlayer into dev-v2 2021-02-01 20:31:09 +01:00
TadejZupancic
34fa7a66c5 Add option to add playback speed button and audio track selection button via xml. So far only settings button existed that opened a submenu with the playback speed button and audio track selection button. 2021-02-01 20:03:04 +01:00
kimvde
46b8b069ca Transformer: set audio decoder max input size
#minor-release

PiperOrigin-RevId: 354949992
2021-02-01 18:12:14 +00:00
kimvde
1ec326438f Merge MuxerWrapper stop() and release() methods
#minor-release

PiperOrigin-RevId: 354938190
2021-02-01 18:12:05 +00:00
ibaker
ffc1b5bbef Log a warning when SingleSampleMediaPeriod turns a load error into EOS
Without this no error is currently logged or propagated to EventLogger.
The propagation doesn't happen because
MergingMediaSource.ForwardingEventListener only propagates events
originating from the "main" source in the merge:
<unknown commit>

#minor-release

PiperOrigin-RevId: 354902467
2021-02-01 18:11:56 +00:00
andrewlewis
b9065e8dfa Simplify output buffer handling in transformer
We can dequeue as part of getting output buffers (or output buffer info) in
`MediaCodecAdapterWrapper`, which simplifies the caller slightly.

Also try to make minor clarifications in method naming in
`TransformerAudioRenderer`.

#minor-release

PiperOrigin-RevId: 354890796
2021-02-01 18:11:42 +00:00
andrewlewis
91dcf39db5 Simplify feeding codec input in transformer
The caller knows whether it's queued end-of-stream, so we can remove the return
value of the method.

#minor-release

PiperOrigin-RevId: 354888298
2021-02-01 18:11:33 +00:00
olly
35b99d634f Make Cronet extension depend only on common
This also moves DefaultHttpDataSource to common, which seems
sensible, else non-player components that need a DataSource
don't have any useful concrete implementations. We should
think about moving some of the other concrete implementations
to common as well.

PiperOrigin-RevId: 354738925
2021-02-01 18:11:23 +00:00
olly
eb0d8e6f28 Fix nullness issues in DefaultHttpDataSource
This is needed to move it to common, since we don't want to start
adding any nullness exemptions for the common module.

PiperOrigin-RevId: 354734715
2021-02-01 18:11:14 +00:00
andrewlewis
c3bce234ca Improve format propagation in transformer
- Store output format in `MediaCodecAdapterWrapper` when we get a format from
  the codec, instead of creating it on demand.
- Make format building code not audio-specific.
- Remove `MediaCodecAdapterWrapper.getConfigFormat` and instead keep track of
  the input/output formats in the renderer. This will mean that the code still
  works if an audio processor changes the audio format in future.
- Make exceptions thrown during audio rendering use the same (input) renderer
  format.
- Misc other minor cleanup.

#minor-release

PiperOrigin-RevId: 354556619
2021-02-01 18:11:04 +00:00
andrewlewis
afb41123c2 Switch transformer tests to use dump files
Add an interface to muxers to allow tests to pass a dumpable muxer.

#minor-release

PiperOrigin-RevId: 354543388
2021-02-01 18:10:55 +00:00
olly
2b24e88726 Pass full locale code to IMA
IMA can now handle the full locale code properly.

PiperOrigin-RevId: 354528700
2021-02-01 18:10:46 +00:00
Oliver Woodman
c9fce083f3 Merge pull request #8490 from szaboa:dev-2-8435-ssa-color
PiperOrigin-RevId: 354293679
2021-02-01 18:10:35 +00:00
tonihei
ae51e2e1d1 Also fix thread blocking nullness assertion when called from non-Looper
PiperOrigin-RevId: 354268013
2021-02-01 18:10:24 +00:00