导航菜单

页面标题

页面副标题

jsgt v4.8.1 - k0.java 源代码

正在查看: jsgt v4.8.1 应用的 k0.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package j0;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.TextureView;
import androidx.annotation.Nullable;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.source.TrackGroupArray;
import d2.d0;
import e2.f;
import f2.a;
import j0.a;
import j0.c;
import j0.f0;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArraySet;
import k0.a;
import k0.b;
import p1.k;

public final class k0 extends d implements f0.c, f0.b {

    @Nullable
    public f A;

    @Nullable
    public a B;
    public boolean C;
    public final h0[] b;
    public final r c;
    public final Handler d;
    public final b e;
    public final CopyOnWriteArraySet<e2.h> f;

    public final CopyOnWriteArraySet<l0.d> f704g;

    public final CopyOnWriteArraySet<k> f705h;
    public final CopyOnWriteArraySet<a1.d> i;

    public final CopyOnWriteArraySet<e2.l> f706j;
    public final CopyOnWriteArraySet<l0.k> k;
    public final b2.d l;
    public final k0.a m;
    public final a n;

    public final c f707o;
    public final m0 p;

    @Nullable
    public Surface q;

    public boolean f708r;

    @Nullable
    public SurfaceHolder s;

    @Nullable
    public TextureView t;
    public int u;
    public int v;

    public int f709w;

    public float f710x;

    @Nullable
    public h1.m y;

    public List<p1.b> f711z;

    public final class b implements e2.l, l0.k, k, a1.d, SurfaceHolder.Callback, TextureView.SurfaceTextureListener, c.b, a.b, f0.a {
        public b() {
        }

        public final void onAudioDecoderInitialized(String str, long j4, long j5) {
            Iterator<l0.k> it = k0.this.k.iterator();
            while (it.hasNext()) {
                it.next().onAudioDecoderInitialized(str, j4, j5);
            }
        }

        public final void onAudioDisabled(m0.e eVar) {
            k0 k0Var = k0.this;
            Iterator<l0.k> it = k0Var.k.iterator();
            while (it.hasNext()) {
                it.next().onAudioDisabled(eVar);
            }
            k0Var.f709w = 0;
        }

        public final void onAudioEnabled(m0.e eVar) {
            k0 k0Var = k0.this;
            k0Var.getClass();
            Iterator<l0.k> it = k0Var.k.iterator();
            while (it.hasNext()) {
                it.next().onAudioEnabled(eVar);
            }
        }

        public final void onAudioInputFormatChanged(Format format) {
            k0 k0Var = k0.this;
            k0Var.getClass();
            Iterator<l0.k> it = k0Var.k.iterator();
            while (it.hasNext()) {
                it.next().onAudioInputFormatChanged(format);
            }
        }

        public final void onAudioSessionId(int i) {
            CopyOnWriteArraySet<l0.k> copyOnWriteArraySet;
            k0 k0Var = k0.this;
            if (k0Var.f709w == i) {
                return;
            }
            k0Var.f709w = i;
            Iterator<l0.d> it = k0Var.f704g.iterator();
            while (true) {
                boolean hasNext = it.hasNext();
                copyOnWriteArraySet = k0Var.k;
                if (!hasNext) {
                    break;
                }
                l0.d next = it.next();
                if (!copyOnWriteArraySet.contains(next)) {
                    next.onAudioSessionId(i);
                }
            }
            Iterator<l0.k> it2 = copyOnWriteArraySet.iterator();
            while (it2.hasNext()) {
                it2.next().onAudioSessionId(i);
            }
        }

        public final void onAudioSinkUnderrun(int i, long j4, long j5) {
            Iterator<l0.k> it = k0.this.k.iterator();
            while (it.hasNext()) {
                it.next().onAudioSinkUnderrun(i, j4, j5);
            }
        }

        public final void onCues(List<p1.b> list) {
            k0 k0Var = k0.this;
            k0Var.f711z = list;
            Iterator<k> it = k0Var.f705h.iterator();
            while (it.hasNext()) {
                it.next().onCues(list);
            }
        }

        public final void onDroppedFrames(int i, long j4) {
            Iterator<e2.l> it = k0.this.f706j.iterator();
            while (it.hasNext()) {
                it.next().onDroppedFrames(i, j4);
            }
        }

        public final void onIsPlayingChanged(boolean z5) {
        }

        public final void onLoadingChanged(boolean z5) {
            k0.this.getClass();
        }

        public final void onMetadata(Metadata metadata) {
            Iterator<a1.d> it = k0.this.i.iterator();
            while (it.hasNext()) {
                it.next().onMetadata(metadata);
            }
        }

        public final void onPlaybackParametersChanged(d0 d0Var) {
        }

        public final void onPlaybackSuppressionReasonChanged(int i) {
        }

        public final void onPlayerError(k kVar) {
        }

        public final void onPlayerStateChanged(boolean z5, int i) {
            k0 k0Var = k0.this;
            if (i != 1) {
                if (i == 2 || i == 3) {
                    k0Var.p.getClass();
                    return;
                } else if (i != 4) {
                    return;
                }
            }
            k0Var.p.getClass();
        }

        public final void onPositionDiscontinuity(int i) {
        }

        public final void onRenderedFirstFrame(Surface surface) {
            k0 k0Var = k0.this;
            if (k0Var.q == surface) {
                Iterator<e2.h> it = k0Var.f.iterator();
                while (it.hasNext()) {
                    it.next().b();
                }
            }
            Iterator<e2.l> it2 = k0Var.f706j.iterator();
            while (it2.hasNext()) {
                it2.next().onRenderedFirstFrame(surface);
            }
        }

        public final void onRepeatModeChanged(int i) {
        }

        public final void onSeekProcessed() {
        }

        public final void onShuffleModeEnabledChanged(boolean z5) {
        }

        @Override
        public final void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) {
            Surface surface = new Surface(surfaceTexture);
            k0 k0Var = k0.this;
            k0Var.O(surface, true);
            k0Var.G(i, i2);
        }

        @Override
        public final boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
            k0 k0Var = k0.this;
            k0Var.O(null, true);
            k0Var.G(0, 0);
            return true;
        }

        @Override
        public final void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i2) {
            k0.this.G(i, i2);
        }

        @Override
        public final void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
        }

        public final void onTimelineChanged(l0 l0Var, int i) {
            aa.a.c(this, l0Var, i);
        }

        public final void onTracksChanged(TrackGroupArray trackGroupArray, y1.c cVar) {
        }

        public final void onVideoDecoderInitialized(String str, long j4, long j5) {
            Iterator<e2.l> it = k0.this.f706j.iterator();
            while (it.hasNext()) {
                it.next().onVideoDecoderInitialized(str, j4, j5);
            }
        }

        public final void onVideoDisabled(m0.e eVar) {
            Iterator<e2.l> it = k0.this.f706j.iterator();
            while (it.hasNext()) {
                it.next().onVideoDisabled(eVar);
            }
        }

        public final void onVideoEnabled(m0.e eVar) {
            k0 k0Var = k0.this;
            k0Var.getClass();
            Iterator<e2.l> it = k0Var.f706j.iterator();
            while (it.hasNext()) {
                it.next().onVideoEnabled(eVar);
            }
        }

        public final void onVideoInputFormatChanged(Format format) {
            k0 k0Var = k0.this;
            k0Var.getClass();
            Iterator<e2.l> it = k0Var.f706j.iterator();
            while (it.hasNext()) {
                it.next().onVideoInputFormatChanged(format);
            }
        }

        public final void onVideoSizeChanged(int i, int i2, int i4, float f) {
            CopyOnWriteArraySet<e2.l> copyOnWriteArraySet;
            k0 k0Var = k0.this;
            Iterator<e2.h> it = k0Var.f.iterator();
            while (true) {
                boolean hasNext = it.hasNext();
                copyOnWriteArraySet = k0Var.f706j;
                if (!hasNext) {
                    break;
                }
                e2.h next = it.next();
                if (!copyOnWriteArraySet.contains(next)) {
                    next.onVideoSizeChanged(i, i2, i4, f);
                }
            }
            Iterator<e2.l> it2 = copyOnWriteArraySet.iterator();
            while (it2.hasNext()) {
                it2.next().onVideoSizeChanged(i, i2, i4, f);
            }
        }

        @Override
        public final void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i4) {
            k0.this.G(i2, i4);
        }

        @Override
        public final void surfaceCreated(SurfaceHolder surfaceHolder) {
            k0.this.O(surfaceHolder.getSurface(), false);
        }

        @Override
        public final void surfaceDestroyed(SurfaceHolder surfaceHolder) {
            k0 k0Var = k0.this;
            k0Var.O(null, false);
            k0Var.G(0, 0);
        }

        public final void onTimelineChanged(l0 l0Var, Object obj, int i) {
        }
    }

    public k0(android.content.Context r26, j0.j r27, y1.d r28, j0.x r29, b2.d r30, k0.a r31, d2.c r32, android.os.Looper r33) {
        throw new UnsupportedOperationException("Method not decompiled: j0.k0.<init>(android.content.Context, j0.j, y1.d, j0.x, b2.d, k0.a, d2.c, android.os.Looper):void");
    }

    public final void A(f0.a aVar) {
        S();
        this.c.A(aVar);
    }

    public final long B() {
        S();
        return this.c.B();
    }

    public final y1.c C() {
        S();
        return this.c.C();
    }

    public final int D(int i) {
        S();
        return this.c.D(i);
    }

    @Nullable
    public final f0.b E() {
        return this;
    }

    public final void G(int i, int i2) {
        if (i == this.u && i2 == this.v) {
            return;
        }
        this.u = i;
        this.v = i2;
        Iterator<e2.h> it = this.f.iterator();
        while (it.hasNext()) {
            it.next().c(i, i2);
        }
    }

    public final void H() {
        String str;
        S();
        a aVar = this.n;
        BroadcastReceiver broadcastReceiver = aVar.b;
        Context context = aVar.a;
        if (aVar.c) {
            context.unregisterReceiver(broadcastReceiver);
            aVar.c = false;
        }
        this.f707o.a();
        this.p.getClass();
        r rVar = this.c;
        rVar.getClass();
        StringBuilder sb = new StringBuilder("Release ");
        sb.append(Integer.toHexString(System.identityHashCode(rVar)));
        sb.append(" [ExoPlayerLib/2.11.3] [");
        sb.append(d0.e);
        sb.append("] [");
        HashSet hashSet = u.a;
        synchronized (u.class) {
            str = u.b;
        }
        sb.append(str);
        sb.append("]");
        Log.i("ExoPlayerImpl", sb.toString());
        rVar.f.r();
        rVar.e.removeCallbacksAndMessages(null);
        rVar.v = rVar.H(false, false, false, 1);
        I();
        Surface surface = this.q;
        if (surface != null) {
            if (this.f708r) {
                surface.release();
            }
            this.q = null;
        }
        h1.m mVar = this.y;
        if (mVar != null) {
            mVar.h(this.m);
            this.y = null;
        }
        this.l.e(this.m);
        this.f711z = Collections.emptyList();
    }

    public final void I() {
        TextureView textureView = this.t;
        b bVar = this.e;
        if (textureView != null) {
            if (textureView.getSurfaceTextureListener() != bVar) {
                Log.w("SimpleExoPlayer", "SurfaceTextureListener already unset or replaced.");
            } else {
                this.t.setSurfaceTextureListener(null);
            }
            this.t = null;
        }
        SurfaceHolder surfaceHolder = this.s;
        if (surfaceHolder != null) {
            surfaceHolder.removeCallback(bVar);
            this.s = null;
        }
    }

    public final void J() {
        float f = this.f710x * this.f707o.e;
        for (h0 h0Var : this.b) {
            if (h0Var.getTrackType() == 1) {
                g0 G = this.c.G(h0Var);
                G.d(2);
                G.c(Float.valueOf(f));
                G.b();
            }
        }
    }

    public final void K(@Nullable d0 d0Var) {
        S();
        r rVar = this.c;
        if (d0Var == null) {
            rVar.getClass();
            d0Var = d0.e;
        }
        if (rVar.t.equals(d0Var)) {
            return;
        }
        rVar.s++;
        rVar.t = d0Var;
        rVar.f.f720g.a(4, d0Var).sendToTarget();
        rVar.I(new n(d0Var));
    }

    public final void L(@Nullable e2.d dVar) {
        for (h0 h0Var : this.b) {
            if (h0Var.getTrackType() == 2) {
                g0 G = this.c.G(h0Var);
                G.d(8);
                G.c(dVar);
                G.b();
            }
        }
    }

    public final void M(@Nullable Surface surface) {
        S();
        I();
        if (surface != null) {
            S();
            L(null);
        }
        O(surface, false);
        int i = surface != null ? -1 : 0;
        G(i, i);
    }

    public final void N(@Nullable SurfaceHolder surfaceHolder) {
        S();
        I();
        if (surfaceHolder != null) {
            S();
            L(null);
        }
        this.s = surfaceHolder;
        if (surfaceHolder == null) {
            O(null, false);
            G(0, 0);
            return;
        }
        surfaceHolder.addCallback(this.e);
        Surface surface = surfaceHolder.getSurface();
        if (surface == null || !surface.isValid()) {
            O(null, false);
            G(0, 0);
        } else {
            O(surface, false);
            Rect surfaceFrame = surfaceHolder.getSurfaceFrame();
            G(surfaceFrame.width(), surfaceFrame.height());
        }
    }

    public final void O(@Nullable Surface surface, boolean z5) {
        ArrayList arrayList = new ArrayList();
        for (h0 h0Var : this.b) {
            if (h0Var.getTrackType() == 2) {
                g0 G = this.c.G(h0Var);
                G.d(1);
                G.c(surface);
                G.b();
                arrayList.add(G);
            }
        }
        Surface surface2 = this.q;
        if (surface2 != null && surface2 != surface) {
            try {
                Iterator it = arrayList.iterator();
                while (it.hasNext()) {
                    g0 g0Var = (g0) it.next();
                    synchronized (g0Var) {
                        d2.a.e(g0Var.f);
                        d2.a.e(g0Var.e.getLooper().getThread() != Thread.currentThread());
                        while (!g0Var.g) {
                            g0Var.wait();
                        }
                    }
                }
            } catch (InterruptedException unused) {
                Thread.currentThread().interrupt();
            }
            if (this.f708r) {
                this.q.release();
            }
        }
        this.q = surface;
        this.f708r = z5;
    }

    public final void P(@Nullable TextureView textureView) {
        S();
        I();
        if (textureView != null) {
            S();
            L(null);
        }
        this.t = textureView;
        if (textureView == null) {
            O(null, true);
            G(0, 0);
            return;
        }
        if (textureView.getSurfaceTextureListener() != null) {
            Log.w("SimpleExoPlayer", "Replacing existing SurfaceTextureListener.");
        }
        textureView.setSurfaceTextureListener(this.e);
        SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture() : null;
        if (surfaceTexture == null) {
            O(null, true);
            G(0, 0);
        } else {
            O(new Surface(surfaceTexture), true);
            G(textureView.getWidth(), textureView.getHeight());
        }
    }

    public final void Q() {
        S();
        r rVar = this.c;
        c0 H = rVar.H(false, false, false, 1);
        rVar.p++;
        rVar.f.f720g.a.obtainMessage(6, 0, 0).sendToTarget();
        rVar.M(H, false, 4, 1, false);
        h1.m mVar = this.y;
        if (mVar != null) {
            k0.a aVar = this.m;
            mVar.h(aVar);
            aVar.i();
        }
        this.f707o.a();
        this.f711z = Collections.emptyList();
    }

    public final void R(int i, boolean z5) {
        int i2 = 0;
        boolean z6 = z5 && i != -1;
        if (z6 && i != 1) {
            i2 = 1;
        }
        this.c.K(i2, z6);
    }

    public final void S() {
        if (Looper.myLooper() != y()) {
            Log.w("SimpleExoPlayer", "Player is accessed on the wrong thread. See https://exoplayer.dev/issues/player-accessed-on-wrong-thread", this.C ? null : new IllegalStateException());
            this.C = true;
        }
    }

    public final void a(f0.a aVar) {
        S();
        this.c.a(aVar);
    }

    public final boolean b() {
        S();
        return this.c.b();
    }

    public final d0 c() {
        S();
        return this.c.t;
    }

    public final long d() {
        S();
        return this.c.d();
    }

    public final void e(int i, long j4) {
        S();
        k0.a aVar = this.m;
        a.b bVar = aVar.c;
        if (!bVar.h) {
            b.a g2 = aVar.g();
            bVar.h = true;
            Iterator<k0.b> it = aVar.a.iterator();
            while (it.hasNext()) {
                it.next().onSeekStarted(g2);
            }
        }
        this.c.e(i, j4);
    }

    public final boolean f() {
        S();
        return this.c.l;
    }

    public final void g(boolean z5) {
        S();
        this.c.g(z5);
    }

    public final long getCurrentPosition() {
        S();
        return this.c.getCurrentPosition();
    }

    public final long getDuration() {
        S();
        return this.c.getDuration();
    }

    @Nullable
    public final k h() {
        S();
        return this.c.v.f;
    }

    public final int j() {
        S();
        return this.c.j();
    }

    public final int k() {
        S();
        return this.c.k();
    }

    public final void l(boolean r4) {
        throw new UnsupportedOperationException("Method not decompiled: j0.k0.l(boolean):void");
    }

    @Nullable
    public final f0.c m() {
        return this;
    }

    public final long n() {
        S();
        return this.c.n();
    }

    public final long p() {
        S();
        return this.c.p();
    }

    public final int q() {
        S();
        return this.c.v.e;
    }

    public final int r() {
        S();
        return this.c.r();
    }

    public final void s(int i) {
        S();
        this.c.s(i);
    }

    public final int u() {
        S();
        return this.c.m;
    }

    public final TrackGroupArray v() {
        S();
        return this.c.v.h;
    }

    public final int w() {
        S();
        return this.c.n;
    }

    public final l0 x() {
        S();
        return this.c.v.a;
    }

    public final Looper y() {
        return this.c.y();
    }

    public final boolean z() {
        S();
        return this.c.f716o;
    }
}