package xyz.netfly.mobile.player;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
import xyz.stream.api.entity.BaseEntity;
import xyz.stream.api.entity.VideoInfoEntity;

/* JADX INFO: loaded from: classes3.dex */
public final class p implements xyz.stream.api.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f34999a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ AtomicReference f35000b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ CountDownLatch f35001c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ Object f35002d;

    public /* synthetic */ p(Object obj, AtomicReference atomicReference, CountDownLatch countDownLatch, int i10) {
        this.f34999a = i10;
        this.f35002d = obj;
        this.f35000b = atomicReference;
        this.f35001c = countDownLatch;
    }

    @Override // xyz.stream.api.e
    public final void a(String str) {
        int i10 = this.f34999a;
        CountDownLatch countDownLatch = this.f35001c;
        switch (i10) {
            case 0:
                countDownLatch.countDown();
                break;
            default:
                countDownLatch.countDown();
                break;
        }
    }

    public final void b(BaseEntity baseEntity) {
        int i10 = this.f34999a;
        AtomicReference atomicReference = this.f35000b;
        CountDownLatch countDownLatch = this.f35001c;
        switch (i10) {
            case 0:
                if (baseEntity != null) {
                    try {
                        if (baseEntity.getData() != null) {
                            atomicReference.set((VideoInfoEntity) xyz.stream.utils.m.f36162a.fromJson(baseEntity.getData(), VideoInfoEntity.class));
                            break;
                        }
                    } finally {
                    }
                }
                return;
            default:
                if (baseEntity != null) {
                    try {
                        if (baseEntity.getData() != null) {
                            atomicReference.set((VideoInfoEntity) xyz.stream.utils.m.f36162a.fromJson(baseEntity.getData(), VideoInfoEntity.class));
                            break;
                        }
                    } finally {
                    }
                }
                return;
        }
    }

    @Override // xyz.stream.api.e
    public final /* bridge */ /* synthetic */ void onSuccess(Object obj) {
        switch (this.f34999a) {
            case 0:
                b((BaseEntity) obj);
                break;
            default:
                b((BaseEntity) obj);
                break;
        }
    }
}
