mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 08:32:38 -06:00
62 lines
3.3 KiB
Java
62 lines
3.3 KiB
Java
|
package androidx.media3.exoplayer;
|
||
|
|
||
|
import androidx.media3.common.util.Assertions;
|
||
|
import androidx.media3.common.util.Util;
|
||
|
import androidx.media3.exoplayer.source.MediaSource;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class MediaPeriodInfo {
|
||
|
public final long durationUs;
|
||
|
public final long endPositionUs;
|
||
|
public final MediaSource.MediaPeriodId id;
|
||
|
public final boolean isFinal;
|
||
|
public final boolean isFollowedByTransitionToSameStream;
|
||
|
public final boolean isLastInTimelinePeriod;
|
||
|
public final boolean isLastInTimelineWindow;
|
||
|
public final long requestedContentPositionUs;
|
||
|
public final long startPositionUs;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public MediaPeriodInfo(MediaSource.MediaPeriodId mediaPeriodId, long j, long j2, long j3, long j4, boolean z, boolean z2, boolean z3, boolean z4) {
|
||
|
boolean z5 = false;
|
||
|
Assertions.checkArgument(!z4 || z2);
|
||
|
Assertions.checkArgument(!z3 || z2);
|
||
|
if (!z || (!z2 && !z3 && !z4)) {
|
||
|
z5 = true;
|
||
|
}
|
||
|
Assertions.checkArgument(z5);
|
||
|
this.id = mediaPeriodId;
|
||
|
this.startPositionUs = j;
|
||
|
this.requestedContentPositionUs = j2;
|
||
|
this.endPositionUs = j3;
|
||
|
this.durationUs = j4;
|
||
|
this.isFollowedByTransitionToSameStream = z;
|
||
|
this.isLastInTimelinePeriod = z2;
|
||
|
this.isLastInTimelineWindow = z3;
|
||
|
this.isFinal = z4;
|
||
|
}
|
||
|
|
||
|
public MediaPeriodInfo copyWithStartPositionUs(long j) {
|
||
|
return j == this.startPositionUs ? this : new MediaPeriodInfo(this.id, j, this.requestedContentPositionUs, this.endPositionUs, this.durationUs, this.isFollowedByTransitionToSameStream, this.isLastInTimelinePeriod, this.isLastInTimelineWindow, this.isFinal);
|
||
|
}
|
||
|
|
||
|
public MediaPeriodInfo copyWithRequestedContentPositionUs(long j) {
|
||
|
return j == this.requestedContentPositionUs ? this : new MediaPeriodInfo(this.id, this.startPositionUs, j, this.endPositionUs, this.durationUs, this.isFollowedByTransitionToSameStream, this.isLastInTimelinePeriod, this.isLastInTimelineWindow, this.isFinal);
|
||
|
}
|
||
|
|
||
|
public boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (obj == null || getClass() != obj.getClass()) {
|
||
|
return false;
|
||
|
}
|
||
|
MediaPeriodInfo mediaPeriodInfo = (MediaPeriodInfo) obj;
|
||
|
return this.startPositionUs == mediaPeriodInfo.startPositionUs && this.requestedContentPositionUs == mediaPeriodInfo.requestedContentPositionUs && this.endPositionUs == mediaPeriodInfo.endPositionUs && this.durationUs == mediaPeriodInfo.durationUs && this.isFollowedByTransitionToSameStream == mediaPeriodInfo.isFollowedByTransitionToSameStream && this.isLastInTimelinePeriod == mediaPeriodInfo.isLastInTimelinePeriod && this.isLastInTimelineWindow == mediaPeriodInfo.isLastInTimelineWindow && this.isFinal == mediaPeriodInfo.isFinal && Util.areEqual(this.id, mediaPeriodInfo.id);
|
||
|
}
|
||
|
|
||
|
public int hashCode() {
|
||
|
return ((((((((((((((((527 + this.id.hashCode()) * 31) + ((int) this.startPositionUs)) * 31) + ((int) this.requestedContentPositionUs)) * 31) + ((int) this.endPositionUs)) * 31) + ((int) this.durationUs)) * 31) + (this.isFollowedByTransitionToSameStream ? 1 : 0)) * 31) + (this.isLastInTimelinePeriod ? 1 : 0)) * 31) + (this.isLastInTimelineWindow ? 1 : 0)) * 31) + (this.isFinal ? 1 : 0);
|
||
|
}
|
||
|
}
|