use of com.google.android.exoplayer2.decoder.DecoderCounters in project ExoPlayer by google.
the class DecoderAudioRenderer method onEnabled.
@Override
protected void onEnabled(boolean joining, boolean mayRenderStartOfStream) throws ExoPlaybackException {
decoderCounters = new DecoderCounters();
eventDispatcher.enabled(decoderCounters);
if (getConfiguration().tunneling) {
audioSink.enableTunnelingV21();
} else {
audioSink.disableTunneling();
}
audioSink.setPlayerId(getPlayerId());
}
use of com.google.android.exoplayer2.decoder.DecoderCounters in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVideoDisabled.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void onVideoDisabled(DecoderCounters counters) {
EventTime eventTime = generatePlayingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_DISABLED, listener -> {
listener.onVideoDisabled(eventTime, counters);
listener.onDecoderDisabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
});
}
use of com.google.android.exoplayer2.decoder.DecoderCounters in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onVideoEnabled.
// Video events.
@Override
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
public final void onVideoEnabled(DecoderCounters counters) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_VIDEO_ENABLED, listener -> {
listener.onVideoEnabled(eventTime, counters);
listener.onDecoderEnabled(eventTime, C.TRACK_TYPE_VIDEO, counters);
});
}
use of com.google.android.exoplayer2.decoder.DecoderCounters in project ExoPlayer by google.
the class DefaultAnalyticsCollector method onAudioEnabled.
// Audio events.
// Calling deprecated listener method.
@SuppressWarnings("deprecation")
@Override
public final void onAudioEnabled(DecoderCounters counters) {
EventTime eventTime = generateReadingMediaPeriodEventTime();
sendEvent(eventTime, AnalyticsListener.EVENT_AUDIO_ENABLED, listener -> {
listener.onAudioEnabled(eventTime, counters);
listener.onDecoderEnabled(eventTime, C.TRACK_TYPE_AUDIO, counters);
});
}
use of com.google.android.exoplayer2.decoder.DecoderCounters in project ExoPlayer by google.
the class DecoderVideoRenderer method onEnabled.
// Protected methods.
@Override
protected void onEnabled(boolean joining, boolean mayRenderStartOfStream) throws ExoPlaybackException {
decoderCounters = new DecoderCounters();
eventDispatcher.enabled(decoderCounters);
mayRenderFirstFrameAfterEnableIfNotStarted = mayRenderStartOfStream;
renderedFirstFrameAfterEnable = false;
}
Aggregations