package c2;

import androidx.annotation.Nullable;
import androidx.media3.common.Format;
import androidx.media3.common.Metadata;
import androidx.media3.common.MimeTypes;
import java.util.Arrays;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public final class a implements Metadata.Entry {

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static final Format f4859g = new Format.Builder().setSampleMimeType(MimeTypes.APPLICATION_ID3).build();

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public static final Format f4860h = new Format.Builder().setSampleMimeType(MimeTypes.APPLICATION_SCTE35).build();

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final String f4861a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final String f4862b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final long f4863c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final long f4864d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final byte[] f4865e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f4866f;

    public a(String str, String str2, long j10, long j11, byte[] bArr) {
        this.f4861a = str;
        this.f4862b = str2;
        this.f4863c = j10;
        this.f4864d = j11;
        this.f4865e = bArr;
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || a.class != obj.getClass()) {
            return false;
        }
        a aVar = (a) obj;
        return this.f4863c == aVar.f4863c && this.f4864d == aVar.f4864d && Objects.equals(this.f4861a, aVar.f4861a) && Objects.equals(this.f4862b, aVar.f4862b) && Arrays.equals(this.f4865e, aVar.f4865e);
    }

    @Override // androidx.media3.common.Metadata.Entry
    @Nullable
    public byte[] getWrappedMetadataBytes() {
        if (getWrappedMetadataFormat() != null) {
            return this.f4865e;
        }
        return null;
    }

    @Override // androidx.media3.common.Metadata.Entry
    @Nullable
    public Format getWrappedMetadataFormat() {
        String str = this.f4861a;
        str.getClass();
        switch (str) {
            case "urn:scte:scte35:2014:bin":
                return f4860h;
            case "https://aomedia.org/emsg/ID3":
            case "https://developer.apple.com/streaming/emsg-id3":
                return f4859g;
            default:
                return null;
        }
    }

    public final int hashCode() {
        if (this.f4866f == 0) {
            String str = this.f4861a;
            int iHashCode = (527 + (str != null ? str.hashCode() : 0)) * 31;
            String str2 = this.f4862b;
            int iHashCode2 = (iHashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
            long j10 = this.f4863c;
            int i10 = (iHashCode2 + ((int) (j10 ^ (j10 >>> 32)))) * 31;
            long j11 = this.f4864d;
            this.f4866f = Arrays.hashCode(this.f4865e) + ((i10 + ((int) (j11 ^ (j11 >>> 32)))) * 31);
        }
        return this.f4866f;
    }

    public final String toString() {
        return "EMSG: scheme=" + this.f4861a + ", id=" + this.f4864d + ", durationMs=" + this.f4863c + ", value=" + this.f4862b;
    }
}
