mirror of
https://github.com/androidx/media.git
synced 2025-05-11 17:49:52 +08:00
Re-order events into more of a natural ordering
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173232494
This commit is contained in:
parent
60a81824f5
commit
e5e984f4c6
@ -472,6 +472,30 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ExoPlayerImplInternal.MSG_SOURCE_INFO_REFRESHED: {
|
||||
SourceInfo sourceInfo = (SourceInfo) msg.obj;
|
||||
pendingSeekAcks -= sourceInfo.seekAcks;
|
||||
if (pendingPrepareAcks == 0) {
|
||||
timeline = sourceInfo.timeline;
|
||||
manifest = sourceInfo.manifest;
|
||||
playbackInfo = sourceInfo.playbackInfo;
|
||||
if (pendingSeekAcks == 0 && timeline.isEmpty()) {
|
||||
// Update the masking variables, which are used when the timeline is empty.
|
||||
maskingPeriodIndex = 0;
|
||||
maskingWindowIndex = 0;
|
||||
maskingWindowPositionMs = 0;
|
||||
}
|
||||
for (Player.EventListener listener : listeners) {
|
||||
listener.onTimelineChanged(timeline, manifest);
|
||||
}
|
||||
}
|
||||
if (pendingSeekAcks == 0 && sourceInfo.seekAcks > 0) {
|
||||
for (Player.EventListener listener : listeners) {
|
||||
listener.onSeekProcessed();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ExoPlayerImplInternal.MSG_TRACKS_CHANGED: {
|
||||
if (pendingPrepareAcks == 0) {
|
||||
TrackSelectorResult trackSelectorResult = (TrackSelectorResult) msg.obj;
|
||||
@ -512,30 +536,6 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ExoPlayerImplInternal.MSG_SOURCE_INFO_REFRESHED: {
|
||||
SourceInfo sourceInfo = (SourceInfo) msg.obj;
|
||||
pendingSeekAcks -= sourceInfo.seekAcks;
|
||||
if (pendingPrepareAcks == 0) {
|
||||
timeline = sourceInfo.timeline;
|
||||
manifest = sourceInfo.manifest;
|
||||
playbackInfo = sourceInfo.playbackInfo;
|
||||
if (pendingSeekAcks == 0 && timeline.isEmpty()) {
|
||||
// Update the masking variables, which are used when the timeline is empty.
|
||||
maskingPeriodIndex = 0;
|
||||
maskingWindowIndex = 0;
|
||||
maskingWindowPositionMs = 0;
|
||||
}
|
||||
for (Player.EventListener listener : listeners) {
|
||||
listener.onTimelineChanged(timeline, manifest);
|
||||
}
|
||||
}
|
||||
if (pendingSeekAcks == 0 && sourceInfo.seekAcks > 0) {
|
||||
for (Player.EventListener listener : listeners) {
|
||||
listener.onSeekProcessed();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ExoPlayerImplInternal.MSG_PLAYBACK_PARAMETERS_CHANGED: {
|
||||
PlaybackParameters playbackParameters = (PlaybackParameters) msg.obj;
|
||||
if (!this.playbackParameters.equals(playbackParameters)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user