- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
98 lines
3.8 KiB
Java
98 lines
3.8 KiB
Java
package com.google.android.exoplayer2.metadata.emsg;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import com.google.android.exoplayer2.Format;
|
|
import com.google.android.exoplayer2.metadata.Metadata;
|
|
import com.google.android.exoplayer2.util.Util;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
|
|
import java.util.Arrays;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class EventMessage implements Metadata.Entry {
|
|
public final long durationMs;
|
|
public int hashCode;
|
|
public final long id;
|
|
public final byte[] messageData;
|
|
public final String schemeIdUri;
|
|
public final String value;
|
|
public static final Format ID3_FORMAT = new Format.Builder().setSampleMimeType(MimeTypes.APPLICATION_ID3).build();
|
|
public static final Format SCTE35_FORMAT = new Format.Builder().setSampleMimeType(MimeTypes.APPLICATION_SCTE35).build();
|
|
public static final Parcelable.Creator<EventMessage> CREATOR = new Parcelable.Creator() { // from class: com.google.android.exoplayer2.metadata.emsg.EventMessage.1
|
|
@Override // android.os.Parcelable.Creator
|
|
public EventMessage createFromParcel(Parcel parcel) {
|
|
return new EventMessage(parcel);
|
|
}
|
|
|
|
@Override // android.os.Parcelable.Creator
|
|
public EventMessage[] newArray(int i) {
|
|
return new EventMessage[i];
|
|
}
|
|
};
|
|
|
|
@Override // android.os.Parcelable
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public EventMessage(Parcel parcel) {
|
|
this.schemeIdUri = (String) Util.castNonNull(parcel.readString());
|
|
this.value = (String) Util.castNonNull(parcel.readString());
|
|
this.durationMs = parcel.readLong();
|
|
this.id = parcel.readLong();
|
|
this.messageData = (byte[]) Util.castNonNull(parcel.createByteArray());
|
|
}
|
|
|
|
public int hashCode() {
|
|
if (this.hashCode == 0) {
|
|
String str = this.schemeIdUri;
|
|
int hashCode = (IronSourceError.ERROR_NON_EXISTENT_INSTANCE + (str != null ? str.hashCode() : 0)) * 31;
|
|
String str2 = this.value;
|
|
int hashCode2 = str2 != null ? str2.hashCode() : 0;
|
|
long j = this.durationMs;
|
|
int i = (((hashCode + hashCode2) * 31) + ((int) (j ^ (j >>> 32)))) * 31;
|
|
long j2 = this.id;
|
|
this.hashCode = ((i + ((int) (j2 ^ (j2 >>> 32)))) * 31) + Arrays.hashCode(this.messageData);
|
|
}
|
|
return this.hashCode;
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || EventMessage.class != obj.getClass()) {
|
|
return false;
|
|
}
|
|
EventMessage eventMessage = (EventMessage) obj;
|
|
return this.durationMs == eventMessage.durationMs && this.id == eventMessage.id && Util.areEqual(this.schemeIdUri, eventMessage.schemeIdUri) && Util.areEqual(this.value, eventMessage.value) && Arrays.equals(this.messageData, eventMessage.messageData);
|
|
}
|
|
|
|
public String toString() {
|
|
String str = this.schemeIdUri;
|
|
long j = this.id;
|
|
long j2 = this.durationMs;
|
|
String str2 = this.value;
|
|
StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 79 + String.valueOf(str2).length());
|
|
sb.append("EMSG: scheme=");
|
|
sb.append(str);
|
|
sb.append(", id=");
|
|
sb.append(j);
|
|
sb.append(", durationMs=");
|
|
sb.append(j2);
|
|
sb.append(", value=");
|
|
sb.append(str2);
|
|
return sb.toString();
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(Parcel parcel, int i) {
|
|
parcel.writeString(this.schemeIdUri);
|
|
parcel.writeString(this.value);
|
|
parcel.writeLong(this.durationMs);
|
|
parcel.writeLong(this.id);
|
|
parcel.writeByteArray(this.messageData);
|
|
}
|
|
}
|