As some devices not present in ExoPlayer's list may not implement
MediaCodec.setOutputSurface(Surface) properly, this workaround could be useful
on these devices.
It forces ExoPlayer to fall back on releasing and re-instantiating video codec
instances, which is always used on Android 5 and lower due to addition of this
method in Android 6.
To do so, a CustomMediaCodecVideoRenderer, based on ExoPlayer's
MediaVideoCodecRenderer which always return true for the
codecNeedsSetOutputSurfaceWorkaround method has been added, which is used in
CustomRenderersFactory, a class based on DefaultRenderersFactory which always
returns our CustomMediaCodecVideoRenderer as the video renderers.
CustomRenderersFactory replaces DefaultRenderersFactory in the player, in the
case this setting is enabled.
Media tunneling may be not supported by more devices than the ones we
whitelisted before.
As a matter of fact, the list of devices on which media tunneling is disabled
could be not maintainable in the future, especially if the list of devices
grows more and more.
A preferable solution is to allow users to configure this setting themselves,
allowing them to not wait for their device(s) to be whitelisted in a future
NewPipe update.
This solution has been applied in this commit and works on every build type.
The corresponding preference in the debug settings has been of course removed
and the code used to prevent media tunneling activation on specific devices has
been removed.
This option could help to avoid decoder initialization issues, which falls back
to lower-priority decoders if decoder initialization fails. This may result in
poor playback performance than when using primary decoders.
It is disabled by default, but can be enabled in ExoPlayer settings.
This fragment has been added into SettingsResourceRegistry, to allow searches
in its options.
It has been placed at the place of the previous playback load interval size
setting (so in Video and Audio settings).
The following is the list of all commits squashed together:
Regain function for option `Positions in lists`
use option `Resume playback` to control display of progress info in VideoDetailFragment, remove this (extra) function from option `Positions in lists`.
remove extra check for live streams, live streams updates just as non-live streams.
fix#8176 by eliminating exit delay
Regain function for option `Positions in lists`
update code with developer's comments
apply static import to methods in util class DependentPreferenceHelper
Regain function for option `Positions in lists`
use option `Resume playback` to control display of progress info in VideoDetailFragment, remove this (extra) function from option `Positions in lists`.
remove extra check for live streams, live streams updates just as non-live streams.
fix behavior for displaying progress bar when autoplay off but video resume on
not to retrieve unnecessary states when position in lists disabled
fix mistake in code
simplify conditional logic
update doc comment and remove unused method
Fix not showing duration if position indicators disabled
Positions in lists only depends on watch history
* Consolidated main-setttings into a single file
* Debug settings are only enabled in the DEBUG build
* Moved LeakCanary (debug) specific stuff into a small class that's only shipped with the debug build
* Other minor fixes
* Added a new setting so that player errors are reported (under Video and Audio > Player)
* Moved the player error logic to separate class specially created for this purpose