Fix comments for pull request
- Extract duplicated microsecond duration calculation - Update JavaDoc for CustomRenderersFactory
This commit is contained in:
parent
6af820adae
commit
293914dfed
@ -306,10 +306,11 @@ public final class Player implements PlaybackListener, Listener {
|
||||
final int maxSilenceDurationMillis = prefs.getInt(
|
||||
context.getString(R.string.max_silence_duration_key),
|
||||
Integer.parseInt(context.getString(R.string.max_silence_duration_value)));
|
||||
final long maxSilenceDurationMicros = MILLISECONDS.toMicros(maxSilenceDurationMillis);
|
||||
final SilenceSkippingAudioProcessor silenceSkippingAudioProcessor =
|
||||
new SilenceSkippingAudioProcessor(
|
||||
MILLISECONDS.toMicros(maxSilenceDurationMillis),
|
||||
MILLISECONDS.toMicros(maxSilenceDurationMillis),
|
||||
maxSilenceDurationMicros,
|
||||
maxSilenceDurationMicros,
|
||||
SilenceSkippingAudioProcessor.DEFAULT_SILENCE_THRESHOLD_LEVEL);
|
||||
renderFactory = new CustomRenderersFactory(
|
||||
context, alwaysUseExoplayerSetOutputSurfaceWorkaround,
|
||||
|
||||
@ -17,8 +17,9 @@ import com.google.android.exoplayer2.video.VideoRendererEventListener;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* A {@link DefaultRenderersFactory} which only uses {@link CustomMediaCodecVideoRenderer} as an
|
||||
* implementation of video codec renders.
|
||||
* A {@link DefaultRenderersFactory} which uses {@link CustomMediaCodecVideoRenderer} as an
|
||||
* implementation of video codec renders and uses a provided {@link SilenceSkippingAudioProcessor}
|
||||
* to control silence skipping behavior more precisely.
|
||||
*
|
||||
* <p>
|
||||
* As no ExoPlayer extension is currently used, the reflection code used by ExoPlayer to try to
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user