2021-12-17 21:59:34 +00:00
package b.i.a.c.a3 ;
2021-11-05 06:48:17 +00:00
import android.net.Uri ;
import android.os.Handler ;
import android.os.Looper ;
import android.os.SystemClock ;
import androidx.annotation.Nullable ;
import androidx.recyclerview.widget.RecyclerView ;
2021-12-17 21:59:34 +00:00
import b.i.a.c.a3.b0 ;
import b.i.a.c.a3.h0 ;
import b.i.a.c.a3.s ;
import b.i.a.c.a3.x ;
import b.i.a.c.e3.h ;
import b.i.a.c.e3.l ;
import b.i.a.c.e3.n ;
import b.i.a.c.e3.o ;
import b.i.a.c.e3.w ;
import b.i.a.c.e3.y ;
import b.i.a.c.j1 ;
import b.i.a.c.j2 ;
import b.i.a.c.k1 ;
import b.i.a.c.w2.s ;
import b.i.a.c.w2.u ;
import b.i.a.c.x2.h0.f ;
import b.i.a.c.x2.i ;
import b.i.a.c.x2.j ;
import b.i.a.c.x2.t ;
2021-11-05 06:48:17 +00:00
import com.google.android.exoplayer2.ParserException ;
import com.google.android.exoplayer2.decoder.DecoderInputBuffer ;
import com.google.android.exoplayer2.drm.DrmSession ;
import com.google.android.exoplayer2.metadata.Metadata ;
import com.google.android.exoplayer2.metadata.icy.IcyHeaders ;
import com.google.android.exoplayer2.upstream.DataSourceException ;
import com.google.android.exoplayer2.upstream.HttpDataSource $CleartextNotPermittedException ;
import com.google.android.exoplayer2.upstream.Loader ;
import java.io.FileNotFoundException ;
import java.io.IOException ;
import java.io.InterruptedIOException ;
import java.util.Arrays ;
import java.util.Collections ;
import java.util.HashMap ;
import java.util.Map ;
import java.util.Objects ;
import org.checkerframework.checker.nullness.qual.EnsuresNonNull ;
/* compiled from: ProgressiveMediaPeriod */
public final class e0 implements x , j , Loader . b < a > , Loader . f , h0 . d {
2021-12-02 18:53:44 +00:00
public static final Map < String , String > j ;
public static final j1 k ;
public final Handler A ;
2021-11-05 06:48:17 +00:00
@Nullable
2021-12-02 18:53:44 +00:00
public x . a B ;
2021-11-05 06:48:17 +00:00
@Nullable
2021-12-02 18:53:44 +00:00
public IcyHeaders C ;
public h0 [ ] D ;
public d [ ] E ;
2021-11-05 06:48:17 +00:00
public boolean F ;
public boolean G ;
2021-12-02 18:53:44 +00:00
public boolean H ;
public e I ;
public t J ;
public long K ;
public boolean L ;
public int M ;
2021-11-05 06:48:17 +00:00
public boolean N ;
2021-12-02 18:53:44 +00:00
public boolean O ;
public int P ;
2021-11-05 06:48:17 +00:00
public long Q ;
public long R ;
2021-12-02 18:53:44 +00:00
public long S ;
public boolean T ;
public int U ;
2021-11-05 06:48:17 +00:00
public boolean V ;
2021-12-02 18:53:44 +00:00
public boolean W ;
public final Uri l ;
public final l m ;
public final u n ;
public final w o ;
public final b0 . a p ;
public final s . a q ;
public final b r ;
2021-11-05 06:48:17 +00:00
/* renamed from: s reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final o f806s ;
2021-12-02 18:53:44 +00:00
@Nullable
public final String t ;
public final long u ;
public final Loader v = new Loader ( " ProgressiveMediaPeriod " ) ;
public final d0 w ;
2021-11-05 06:48:17 +00:00
/* renamed from: x reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final b . i . a . c . f3 . j f807x ;
2021-11-05 06:48:17 +00:00
/* renamed from: y reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final Runnable f808y ;
2021-11-05 06:48:17 +00:00
/* renamed from: z reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final Runnable f809z ;
2021-11-05 06:48:17 +00:00
/* compiled from: ProgressiveMediaPeriod */
public final class a implements Loader . e , s . a {
public final long a = t . a . getAndIncrement ( ) ;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final Uri f810b ;
2021-12-17 21:59:34 +00:00
public final y c ;
2021-11-05 06:48:17 +00:00
public final d0 d ;
public final j e ;
2021-12-17 21:59:34 +00:00
public final b . i . a . c . f3 . j f ;
public final b . i . a . c . x2 . s g = new b . i . a . c . x2 . s ( ) ;
2021-11-05 06:48:17 +00:00
public volatile boolean h ;
public boolean i = true ;
public long j ;
public n k = a ( 0 ) ;
public long l = - 1 ;
@Nullable
2021-12-17 21:59:34 +00:00
public b . i . a . c . x2 . w m ;
2021-11-05 06:48:17 +00:00
public boolean n ;
2021-12-17 21:59:34 +00:00
public a ( Uri uri , l lVar , d0 d0Var , j jVar , b . i . a . c . f3 . j jVar2 ) {
2022-01-27 07:52:47 +00:00
this . f810b = uri ;
2021-12-17 21:59:34 +00:00
this . c = new y ( lVar ) ;
2021-11-05 06:48:17 +00:00
this . d = d0Var ;
this . e = jVar ;
this . f = jVar2 ;
}
public final n a ( long j ) {
Collections . emptyMap ( ) ;
2022-01-27 07:52:47 +00:00
Uri uri = this . f810b ;
2021-12-02 18:53:44 +00:00
String str = e0 . this . t ;
Map < String , String > map = e0 . j ;
2021-11-05 06:48:17 +00:00
if ( uri ! = null ) {
return new n ( uri , 0 , 1 , null , map , j , - 1 , str , 6 , null ) ;
}
throw new IllegalStateException ( " The uri must be set. " ) ;
}
public void b ( ) throws IOException {
h hVar ;
int i ;
int i2 = 0 ;
while ( i2 = = 0 & & ! this . h ) {
try {
long j = this . g . a ;
n a = a ( j ) ;
this . k = a ;
2021-12-17 21:59:34 +00:00
long a2 = this . c . a ( a ) ;
2021-11-05 06:48:17 +00:00
this . l = a2 ;
if ( a2 ! = - 1 ) {
this . l = a2 + j ;
}
2021-12-17 21:59:34 +00:00
e0 . this . C = IcyHeaders . a ( this . c . j ( ) ) ;
y yVar = this . c ;
2021-12-02 18:53:44 +00:00
IcyHeaders icyHeaders = e0 . this . C ;
if ( icyHeaders = = null | | ( i = icyHeaders . o ) = = - 1 ) {
2021-11-05 06:48:17 +00:00
hVar = yVar ;
} else {
hVar = new s ( yVar , i , this ) ;
2021-12-17 21:59:34 +00:00
b . i . a . c . x2 . w B = e0 . this . B ( new d ( 0 , true ) ) ;
2021-11-05 06:48:17 +00:00
this . m = B ;
2021-12-02 18:53:44 +00:00
( ( h0 ) B ) . e ( e0 . k ) ;
2021-11-05 06:48:17 +00:00
}
long j2 = j ;
2022-01-27 07:52:47 +00:00
( ( m ) this . d ) . b ( hVar , this . f810b , this . c . j ( ) , j , this . l , this . e ) ;
2021-12-02 18:53:44 +00:00
if ( e0 . this . C ! = null ) {
2022-01-27 07:52:47 +00:00
b . i . a . c . x2 . h hVar2 = ( ( m ) this . d ) . f825b ;
2021-11-05 06:48:17 +00:00
if ( hVar2 instanceof f ) {
2022-01-27 07:52:47 +00:00
( ( f ) hVar2 ) . f1203s = true ;
2021-11-05 06:48:17 +00:00
}
}
if ( this . i ) {
d0 d0Var = this . d ;
long j3 = this . j ;
2022-01-27 07:52:47 +00:00
b . i . a . c . x2 . h hVar3 = ( ( m ) d0Var ) . f825b ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( hVar3 ) ;
hVar3 . g ( j2 , j3 ) ;
this . i = false ;
}
while ( true ) {
while ( i2 = = 0 & & ! this . h ) {
try {
2021-12-17 21:59:34 +00:00
b . i . a . c . f3 . j jVar = this . f ;
2021-11-05 06:48:17 +00:00
synchronized ( jVar ) {
2022-01-27 07:52:47 +00:00
while ( ! jVar . f968b ) {
2021-11-05 06:48:17 +00:00
jVar . wait ( ) ;
}
}
d0 d0Var2 = this . d ;
2021-12-17 21:59:34 +00:00
b . i . a . c . x2 . s sVar = this . g ;
2021-11-05 06:48:17 +00:00
m mVar = ( m ) d0Var2 ;
2022-01-27 07:52:47 +00:00
b . i . a . c . x2 . h hVar4 = mVar . f825b ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( hVar4 ) ;
2021-12-17 21:59:34 +00:00
i iVar = mVar . c ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( iVar ) ;
i2 = hVar4 . e ( iVar , sVar ) ;
j2 = ( ( m ) this . d ) . a ( ) ;
2021-12-02 18:53:44 +00:00
if ( j2 > e0 . this . u + j2 ) {
2021-11-05 06:48:17 +00:00
this . f . a ( ) ;
e0 e0Var = e0 . this ;
2022-01-27 07:52:47 +00:00
e0Var . A . post ( e0Var . f809z ) ;
2021-11-05 06:48:17 +00:00
}
} catch ( InterruptedException unused ) {
throw new InterruptedIOException ( ) ;
}
}
}
if ( i2 = = 1 ) {
i2 = 0 ;
} else if ( ( ( m ) this . d ) . a ( ) ! = - 1 ) {
this . g . a = ( ( m ) this . d ) . a ( ) ;
}
2021-12-17 21:59:34 +00:00
y yVar2 = this . c ;
2021-11-05 06:48:17 +00:00
if ( yVar2 ! = null ) {
try {
yVar2 . a . close ( ) ;
} catch ( IOException unused2 ) {
}
}
} catch ( Throwable th ) {
if ( ! ( i2 = = 1 | | ( ( m ) this . d ) . a ( ) = = - 1 ) ) {
this . g . a = ( ( m ) this . d ) . a ( ) ;
}
2021-12-17 21:59:34 +00:00
y yVar3 = this . c ;
2021-11-05 06:48:17 +00:00
if ( yVar3 ! = null ) {
try {
yVar3 . a . close ( ) ;
} catch ( IOException unused3 ) {
}
}
throw th ;
}
}
}
}
/* compiled from: ProgressiveMediaPeriod */
public interface b {
}
/* compiled from: ProgressiveMediaPeriod */
public final class c implements i0 {
public final int a ;
public c ( int i ) {
this . a = i ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.i0
2021-11-05 06:48:17 +00:00
public int a ( k1 k1Var , DecoderInputBuffer decoderInputBuffer , int i ) {
int i2 ;
e0 e0Var = e0 . this ;
int i3 = this . a ;
if ( e0Var . D ( ) ) {
return - 3 ;
}
e0Var . y ( i3 ) ;
2021-12-02 18:53:44 +00:00
h0 h0Var = e0Var . D [ i3 ] ;
boolean z2 = e0Var . V ;
2021-11-05 06:48:17 +00:00
boolean z3 = false ;
boolean z4 = ( i & 2 ) ! = 0 ;
2022-01-27 07:52:47 +00:00
h0 . b bVar = h0Var . f816b ;
2021-11-05 06:48:17 +00:00
synchronized ( h0Var ) {
2021-12-02 18:53:44 +00:00
decoderInputBuffer . m = false ;
2021-11-05 06:48:17 +00:00
i2 = - 5 ;
if ( ! h0Var . o ( ) ) {
if ( ! z2 ) {
2022-01-27 07:52:47 +00:00
if ( ! h0Var . f818x ) {
2021-11-05 06:48:17 +00:00
j1 j1Var = h0Var . B ;
if ( j1Var ! = null & & ( z4 | | j1Var ! = h0Var . h ) ) {
h0Var . r ( j1Var , k1Var ) ;
}
}
}
2021-12-02 18:53:44 +00:00
decoderInputBuffer . j = 4 ;
2021-11-05 06:48:17 +00:00
i2 = - 4 ;
} else {
2021-12-17 21:59:34 +00:00
j1 j1Var2 = h0Var . c . b ( h0Var . k ( ) ) . a ;
2021-11-05 06:48:17 +00:00
if ( z4 | | j1Var2 ! = h0Var . h ) {
h0Var . r ( j1Var2 , k1Var ) ;
} else {
int l = h0Var . l ( h0Var . t ) ;
if ( ! h0Var . q ( l ) ) {
2021-12-02 18:53:44 +00:00
decoderInputBuffer . m = true ;
2021-11-05 06:48:17 +00:00
} else {
2021-12-02 18:53:44 +00:00
decoderInputBuffer . j = h0Var . n [ l ] ;
2021-11-05 06:48:17 +00:00
long j = h0Var . o [ l ] ;
2021-12-02 18:53:44 +00:00
decoderInputBuffer . n = j ;
2021-11-05 06:48:17 +00:00
if ( j < h0Var . u ) {
decoderInputBuffer . j ( Integer . MIN_VALUE ) ;
}
bVar . a = h0Var . m [ l ] ;
2022-01-27 07:52:47 +00:00
bVar . f821b = h0Var . l [ l ] ;
2021-12-17 21:59:34 +00:00
bVar . c = h0Var . p [ l ] ;
2021-11-05 06:48:17 +00:00
i2 = - 4 ;
}
}
}
i2 = - 3 ;
}
if ( i2 = = - 4 & & ! decoderInputBuffer . n ( ) ) {
if ( ( i & 1 ) ! = 0 ) {
z3 = true ;
}
if ( ( i & 4 ) = = 0 ) {
if ( z3 ) {
g0 g0Var = h0Var . a ;
2022-01-27 07:52:47 +00:00
g0 . f ( g0Var . e , decoderInputBuffer , h0Var . f816b , g0Var . c ) ;
2021-11-05 06:48:17 +00:00
} else {
g0 g0Var2 = h0Var . a ;
2022-01-27 07:52:47 +00:00
g0Var2 . e = g0 . f ( g0Var2 . e , decoderInputBuffer , h0Var . f816b , g0Var2 . c ) ;
2021-11-05 06:48:17 +00:00
}
}
if ( ! z3 ) {
h0Var . t + + ;
}
}
if ( i2 = = - 3 ) {
e0Var . z ( i3 ) ;
}
return i2 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.i0
2021-11-05 06:48:17 +00:00
public void b ( ) throws IOException {
e0 e0Var = e0 . this ;
2021-12-02 18:53:44 +00:00
h0 h0Var = e0Var . D [ this . a ] ;
2021-11-05 06:48:17 +00:00
DrmSession drmSession = h0Var . i ;
if ( drmSession = = null | | drmSession . getState ( ) ! = 1 ) {
e0Var . A ( ) ;
return ;
}
DrmSession . DrmSessionException f = h0Var . i . f ( ) ;
Objects . requireNonNull ( f ) ;
throw f ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.i0
2021-11-05 06:48:17 +00:00
public int c ( long j ) {
int i ;
e0 e0Var = e0 . this ;
int i2 = this . a ;
boolean z2 = false ;
if ( e0Var . D ( ) ) {
return 0 ;
}
e0Var . y ( i2 ) ;
2021-12-02 18:53:44 +00:00
h0 h0Var = e0Var . D [ i2 ] ;
boolean z3 = e0Var . V ;
2021-11-05 06:48:17 +00:00
synchronized ( h0Var ) {
int l = h0Var . l ( h0Var . t ) ;
if ( h0Var . o ( ) ) {
if ( j > = h0Var . o [ l ] ) {
if ( j < = h0Var . w | | ! z3 ) {
i = h0Var . i ( l , h0Var . q - h0Var . t , j , true ) ;
if ( i = = - 1 ) {
i = 0 ;
}
} else {
i = h0Var . q - h0Var . t ;
}
}
}
i = 0 ;
}
synchronized ( h0Var ) {
if ( i > = 0 ) {
if ( h0Var . t + i < = h0Var . q ) {
z2 = true ;
}
}
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . j ( z2 ) ;
2021-11-05 06:48:17 +00:00
h0Var . t + = i ;
}
if ( i = = 0 ) {
e0Var . z ( i2 ) ;
}
return i ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.i0
2021-11-05 06:48:17 +00:00
public boolean d ( ) {
e0 e0Var = e0 . this ;
2021-12-02 18:53:44 +00:00
return ! e0Var . D ( ) & & e0Var . D [ this . a ] . p ( e0Var . V ) ;
2021-11-05 06:48:17 +00:00
}
}
/* compiled from: ProgressiveMediaPeriod */
public static final class d {
public final int a ;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final boolean f812b ;
2021-11-05 06:48:17 +00:00
public d ( int i , boolean z2 ) {
this . a = i ;
2022-01-27 07:52:47 +00:00
this . f812b = z2 ;
2021-11-05 06:48:17 +00:00
}
public boolean equals ( @Nullable Object obj ) {
if ( this = = obj ) {
return true ;
}
if ( obj = = null | | d . class ! = obj . getClass ( ) ) {
return false ;
}
d dVar = ( d ) obj ;
2022-01-27 07:52:47 +00:00
return this . a = = dVar . a & & this . f812b = = dVar . f812b ;
2021-11-05 06:48:17 +00:00
}
public int hashCode ( ) {
2022-01-27 07:52:47 +00:00
return ( this . a * 31 ) + ( this . f812b ? 1 : 0 ) ;
2021-11-05 06:48:17 +00:00
}
}
/* compiled from: ProgressiveMediaPeriod */
public static final class e {
public final o0 a ;
2021-12-17 21:59:34 +00:00
/* renamed from: b reason: collision with root package name */
2022-01-27 07:52:47 +00:00
public final boolean [ ] f813b ;
2021-12-17 21:59:34 +00:00
public final boolean [ ] c ;
2021-11-05 06:48:17 +00:00
public final boolean [ ] d ;
public e ( o0 o0Var , boolean [ ] zArr ) {
this . a = o0Var ;
2022-01-27 07:52:47 +00:00
this . f813b = zArr ;
2021-12-02 18:53:44 +00:00
int i = o0Var . k ;
2021-12-17 21:59:34 +00:00
this . c = new boolean [ i ] ;
2021-11-05 06:48:17 +00:00
this . d = new boolean [ i ] ;
}
}
static {
HashMap hashMap = new HashMap ( ) ;
hashMap . put ( " Icy-MetaData " , " 1 " ) ;
2021-12-02 18:53:44 +00:00
j = Collections . unmodifiableMap ( hashMap ) ;
2021-11-05 06:48:17 +00:00
j1 . b bVar = new j1 . b ( ) ;
bVar . a = " icy " ;
bVar . k = " application/x-icy " ;
2021-12-02 18:53:44 +00:00
k = bVar . a ( ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
public e0 ( Uri uri , l lVar , d0 d0Var , u uVar , s . a aVar , w wVar , b0 . a aVar2 , b bVar , o oVar , @Nullable String str , int i ) {
this . l = uri ;
this . m = lVar ;
this . n = uVar ;
this . q = aVar ;
this . o = wVar ;
this . p = aVar2 ;
this . r = bVar ;
2022-01-27 07:52:47 +00:00
this . f806s = oVar ;
2021-12-02 18:53:44 +00:00
this . t = str ;
this . u = ( long ) i ;
this . w = d0Var ;
2022-01-27 07:52:47 +00:00
this . f807x = new b . i . a . c . f3 . j ( ) ;
this . f808y = new g ( this ) ;
this . f809z = new i ( this ) ;
2021-12-17 21:59:34 +00:00
this . A = b . i . a . c . f3 . e0 . j ( ) ;
2021-12-02 18:53:44 +00:00
this . E = new d [ 0 ] ;
this . D = new h0 [ 0 ] ;
this . S = - 9223372036854775807L ;
this . Q = - 1 ;
this . K = - 9223372036854775807L ;
this . M = 1 ;
2021-11-05 06:48:17 +00:00
}
public void A ( ) throws IOException {
2021-12-02 18:53:44 +00:00
Loader loader = this . v ;
2021-12-17 21:59:34 +00:00
int a2 = ( ( b . i . a . c . e3 . s ) this . o ) . a ( this . M ) ;
2021-11-05 06:48:17 +00:00
IOException iOException = loader . e ;
if ( iOException = = null ) {
Loader . d < ? extends Loader . e > dVar = loader . d ;
if ( dVar ! = null ) {
if ( a2 = = Integer . MIN_VALUE ) {
2021-12-02 18:53:44 +00:00
a2 = dVar . j ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
IOException iOException2 = dVar . n ;
if ( iOException2 ! = null & & dVar . o > a2 ) {
2021-11-05 06:48:17 +00:00
throw iOException2 ;
}
return ;
}
return ;
}
throw iOException ;
}
2021-12-17 21:59:34 +00:00
public final b . i . a . c . x2 . w B ( d dVar ) {
2021-12-02 18:53:44 +00:00
int length = this . D . length ;
for ( int i = 0 ; i < length ; i + + ) {
if ( dVar . equals ( this . E [ i ] ) ) {
return this . D [ i ] ;
2021-11-05 06:48:17 +00:00
}
}
2022-01-27 07:52:47 +00:00
o oVar = this . f806s ;
2021-12-02 18:53:44 +00:00
Looper looper = this . A . getLooper ( ) ;
u uVar = this . n ;
s . a aVar = this . q ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( looper ) ;
Objects . requireNonNull ( uVar ) ;
Objects . requireNonNull ( aVar ) ;
h0 h0Var = new h0 ( oVar , looper , uVar , aVar ) ;
h0Var . g = this ;
2021-12-02 18:53:44 +00:00
int i2 = length + 1 ;
d [ ] dVarArr = ( d [ ] ) Arrays . copyOf ( this . E , i2 ) ;
2021-11-05 06:48:17 +00:00
dVarArr [ length ] = dVar ;
2021-12-17 21:59:34 +00:00
int i3 = b . i . a . c . f3 . e0 . a ;
2021-12-02 18:53:44 +00:00
this . E = dVarArr ;
h0 [ ] h0VarArr = ( h0 [ ] ) Arrays . copyOf ( this . D , i2 ) ;
2021-11-05 06:48:17 +00:00
h0VarArr [ length ] = h0Var ;
2021-12-02 18:53:44 +00:00
this . D = h0VarArr ;
2021-11-05 06:48:17 +00:00
return h0Var ;
}
public final void C ( ) {
2022-01-27 07:52:47 +00:00
a aVar = new a ( this . l , this . m , this . w , this , this . f807x ) ;
2021-12-02 18:53:44 +00:00
if ( this . G ) {
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . D ( w ( ) ) ;
2021-12-02 18:53:44 +00:00
long j2 = this . K ;
if ( j2 = = - 9223372036854775807L | | this . S < = j2 ) {
t tVar = this . J ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( tVar ) ;
2021-12-17 21:59:34 +00:00
long j3 = tVar . h ( this . S ) . a . c ;
2021-12-02 18:53:44 +00:00
long j4 = this . S ;
2021-11-05 06:48:17 +00:00
aVar . g . a = j3 ;
aVar . j = j4 ;
aVar . i = true ;
aVar . n = false ;
2021-12-02 18:53:44 +00:00
for ( h0 h0Var : this . D ) {
h0Var . u = this . S ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
this . S = - 9223372036854775807L ;
2021-11-05 06:48:17 +00:00
} else {
2021-12-02 18:53:44 +00:00
this . V = true ;
this . S = - 9223372036854775807L ;
2021-11-05 06:48:17 +00:00
return ;
}
}
2021-12-02 18:53:44 +00:00
this . U = u ( ) ;
Loader loader = this . v ;
2021-12-17 21:59:34 +00:00
int a2 = ( ( b . i . a . c . e3 . s ) this . o ) . a ( this . M ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( loader ) ;
Looper myLooper = Looper . myLooper ( ) ;
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . H ( myLooper ) ;
2021-11-05 06:48:17 +00:00
loader . e = null ;
long elapsedRealtime = SystemClock . elapsedRealtime ( ) ;
new Loader . d ( myLooper , aVar , this , a2 , elapsedRealtime ) . b ( 0 ) ;
n nVar = aVar . k ;
2021-12-02 18:53:44 +00:00
b0 . a aVar2 = this . p ;
aVar2 . f ( new t ( aVar . a , nVar , elapsedRealtime ) , new w ( 1 , - 1 , null , 0 , null , aVar2 . a ( aVar . j ) , aVar2 . a ( this . K ) ) ) ;
2021-11-05 06:48:17 +00:00
}
public final boolean D ( ) {
2021-12-02 18:53:44 +00:00
return this . O | | w ( ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.x2.j
2021-11-05 06:48:17 +00:00
public void a ( t tVar ) {
2021-12-02 18:53:44 +00:00
this . A . post ( new h ( this , tVar ) ) ;
2021-11-05 06:48:17 +00:00
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.google.android.exoplayer2.upstream.Loader$e, long, long, boolean] */
@Override // com.google.android.exoplayer2.upstream.Loader.b
public void b ( a aVar , long j2 , long j3 , boolean z2 ) {
a aVar2 = aVar ;
2021-12-17 21:59:34 +00:00
y yVar = aVar2 . c ;
2022-01-27 07:52:47 +00:00
t tVar = new t ( aVar2 . a , aVar2 . k , yVar . c , yVar . d , j2 , j3 , yVar . f953b ) ;
2021-12-02 18:53:44 +00:00
Objects . requireNonNull ( this . o ) ;
b0 . a aVar3 = this . p ;
aVar3 . c ( tVar , new w ( 1 , - 1 , null , 0 , null , aVar3 . a ( aVar2 . j ) , aVar3 . a ( this . K ) ) ) ;
2021-11-05 06:48:17 +00:00
if ( ! z2 ) {
2021-12-02 18:53:44 +00:00
if ( this . Q = = - 1 ) {
this . Q = aVar2 . l ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
for ( h0 h0Var : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var . s ( false ) ;
}
2021-12-02 18:53:44 +00:00
if ( this . P > 0 ) {
x . a aVar4 = this . B ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( aVar4 ) ;
aVar4 . a ( this ) ;
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public long c ( ) {
2021-12-02 18:53:44 +00:00
if ( this . P = = 0 ) {
2021-11-05 06:48:17 +00:00
return Long . MIN_VALUE ;
}
return q ( ) ;
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.google.android.exoplayer2.upstream.Loader$e, long, long] */
@Override // com.google.android.exoplayer2.upstream.Loader.b
public void d ( a aVar , long j2 , long j3 ) {
t tVar ;
a aVar2 = aVar ;
2021-12-02 18:53:44 +00:00
if ( this . K = = - 9223372036854775807L & & ( tVar = this . J ) ! = null ) {
2021-11-05 06:48:17 +00:00
boolean c2 = tVar . c ( ) ;
long v = v ( ) ;
long j4 = v = = Long . MIN_VALUE ? 0 : v + 10000 ;
2021-12-02 18:53:44 +00:00
this . K = j4 ;
( ( f0 ) this . r ) . u ( j4 , c2 , this . L ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
y yVar = aVar2 . c ;
2022-01-27 07:52:47 +00:00
t tVar2 = new t ( aVar2 . a , aVar2 . k , yVar . c , yVar . d , j2 , j3 , yVar . f953b ) ;
2021-12-02 18:53:44 +00:00
Objects . requireNonNull ( this . o ) ;
b0 . a aVar3 = this . p ;
aVar3 . d ( tVar2 , new w ( 1 , - 1 , null , 0 , null , aVar3 . a ( aVar2 . j ) , aVar3 . a ( this . K ) ) ) ;
if ( this . Q = = - 1 ) {
this . Q = aVar2 . l ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
this . V = true ;
x . a aVar4 = this . B ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( aVar4 ) ;
aVar4 . a ( this ) ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public void e ( ) throws IOException {
A ( ) ;
2021-12-02 18:53:44 +00:00
if ( this . V & & ! this . G ) {
2021-11-05 06:48:17 +00:00
throw ParserException . a ( " Loading finished before preparation is complete. " , null ) ;
}
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public long f ( long j2 ) {
boolean z2 ;
t ( ) ;
2022-01-27 07:52:47 +00:00
boolean [ ] zArr = this . I . f813b ;
2021-12-02 18:53:44 +00:00
if ( ! this . J . c ( ) ) {
2021-11-05 06:48:17 +00:00
j2 = 0 ;
}
2021-12-02 18:53:44 +00:00
this . O = false ;
this . R = j2 ;
2021-11-05 06:48:17 +00:00
if ( w ( ) ) {
2021-12-02 18:53:44 +00:00
this . S = j2 ;
2021-11-05 06:48:17 +00:00
return j2 ;
}
2021-12-02 18:53:44 +00:00
if ( this . M ! = 7 ) {
int length = this . D . length ;
int i = 0 ;
2021-11-05 06:48:17 +00:00
while ( true ) {
2021-12-02 18:53:44 +00:00
if ( i > = length ) {
2021-11-05 06:48:17 +00:00
z2 = true ;
break ;
2021-12-02 18:53:44 +00:00
} else if ( this . D [ i ] . t ( j2 , false ) | | ( ! zArr [ i ] & & this . H ) ) {
i + + ;
2021-11-05 06:48:17 +00:00
}
}
z2 = false ;
if ( z2 ) {
return j2 ;
}
}
2021-12-02 18:53:44 +00:00
this . T = false ;
this . S = j2 ;
this . V = false ;
if ( this . v . b ( ) ) {
for ( h0 h0Var : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var . h ( ) ;
}
2021-12-02 18:53:44 +00:00
Loader . d < ? extends Loader . e > dVar = this . v . d ;
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . H ( dVar ) ;
2021-11-05 06:48:17 +00:00
dVar . a ( false ) ;
} else {
2021-12-02 18:53:44 +00:00
this . v . e = null ;
for ( h0 h0Var2 : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var2 . s ( false ) ;
}
}
return j2 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public boolean g ( long j2 ) {
2021-12-02 18:53:44 +00:00
if ( ! this . V ) {
if ( ! ( this . v . e ! = null ) & & ! this . T & & ( ! this . G | | this . P ! = 0 ) ) {
2022-01-27 07:52:47 +00:00
boolean b2 = this . f807x . b ( ) ;
2021-12-02 18:53:44 +00:00
if ( this . v . b ( ) ) {
2021-11-05 06:48:17 +00:00
return b2 ;
}
C ( ) ;
return true ;
}
}
return false ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public boolean h ( ) {
boolean z2 ;
2021-12-02 18:53:44 +00:00
if ( this . v . b ( ) ) {
2022-01-27 07:52:47 +00:00
b . i . a . c . f3 . j jVar = this . f807x ;
2021-11-05 06:48:17 +00:00
synchronized ( jVar ) {
2022-01-27 07:52:47 +00:00
z2 = jVar . f968b ;
2021-11-05 06:48:17 +00:00
}
if ( z2 ) {
return true ;
}
}
return false ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public long i ( long j2 , j2 j2Var ) {
t ( ) ;
2021-12-02 18:53:44 +00:00
if ( ! this . J . c ( ) ) {
2021-11-05 06:48:17 +00:00
return 0 ;
}
2021-12-02 18:53:44 +00:00
t . a h = this . J . h ( j2 ) ;
2022-01-27 07:52:47 +00:00
long j3 = h . a . f1295b ;
long j4 = h . f1293b . f1295b ;
2021-12-17 21:59:34 +00:00
long j5 = j2Var . c ;
2021-11-05 06:48:17 +00:00
if ( j5 = = 0 & & j2Var . d = = 0 ) {
return j2 ;
}
long j6 = Long . MIN_VALUE ;
2021-12-17 21:59:34 +00:00
int i = b . i . a . c . f3 . e0 . a ;
2021-11-05 06:48:17 +00:00
long j7 = j2 - j5 ;
if ( ( ( j5 ^ j2 ) & ( j2 ^ j7 ) ) > = 0 ) {
j6 = j7 ;
}
long j8 = j2Var . d ;
long j9 = RecyclerView . FOREVER_NS ;
long j10 = j2 + j8 ;
if ( ( ( j8 ^ j10 ) & ( j2 ^ j10 ) ) > = 0 ) {
j9 = j10 ;
}
boolean z2 = false ;
boolean z3 = j6 < = j3 & & j3 < = j9 ;
if ( j6 < = j4 & & j4 < = j9 ) {
z2 = true ;
}
if ( ! z3 | | ! z2 ) {
if ( z3 ) {
return j3 ;
}
if ( ! z2 ) {
return j6 ;
}
} else if ( Math . abs ( j3 - j2 ) < = Math . abs ( j4 - j2 ) ) {
return j3 ;
}
return j4 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.x2.j
2021-11-05 06:48:17 +00:00
public void j ( ) {
2021-12-02 18:53:44 +00:00
this . F = true ;
2022-01-27 07:52:47 +00:00
this . A . post ( this . f808y ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public long k ( ) {
2021-12-02 18:53:44 +00:00
if ( ! this . O ) {
2021-11-05 06:48:17 +00:00
return - 9223372036854775807L ;
}
2021-12-02 18:53:44 +00:00
if ( ! this . V & & u ( ) < = this . U ) {
2021-11-05 06:48:17 +00:00
return - 9223372036854775807L ;
}
2021-12-02 18:53:44 +00:00
this . O = false ;
return this . R ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public void l ( x . a aVar , long j2 ) {
2021-12-02 18:53:44 +00:00
this . B = aVar ;
2022-01-27 07:52:47 +00:00
this . f807x . b ( ) ;
2021-11-05 06:48:17 +00:00
C ( ) ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
public long m ( b . i . a . c . c3 . j [ ] jVarArr , boolean [ ] zArr , i0 [ ] i0VarArr , boolean [ ] zArr2 , long j2 ) {
2021-11-05 06:48:17 +00:00
t ( ) ;
2021-12-02 18:53:44 +00:00
e eVar = this . I ;
2021-11-05 06:48:17 +00:00
o0 o0Var = eVar . a ;
2021-12-17 21:59:34 +00:00
boolean [ ] zArr3 = eVar . c ;
2021-12-02 18:53:44 +00:00
int i = this . P ;
for ( int i2 = 0 ; i2 < jVarArr . length ; i2 + + ) {
if ( i0VarArr [ i2 ] ! = null & & ( jVarArr [ i2 ] = = null | | ! zArr [ i2 ] ) ) {
int i3 = ( ( c ) i0VarArr [ i2 ] ) . a ;
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . D ( zArr3 [ i3 ] ) ;
2021-12-02 18:53:44 +00:00
this . P - - ;
zArr3 [ i3 ] = false ;
i0VarArr [ i2 ] = null ;
2021-11-05 06:48:17 +00:00
}
}
2021-12-02 18:53:44 +00:00
boolean z2 = ! this . N ? j2 ! = 0 : i = = 0 ;
for ( int i4 = 0 ; i4 < jVarArr . length ; i4 + + ) {
if ( i0VarArr [ i4 ] = = null & & jVarArr [ i4 ] ! = null ) {
2021-12-17 21:59:34 +00:00
b . i . a . c . c3 . j jVar = jVarArr [ i4 ] ;
b . c . a . a0 . d . D ( jVar . length ( ) = = 1 ) ;
b . c . a . a0 . d . D ( jVar . f ( 0 ) = = 0 ) ;
2021-11-05 06:48:17 +00:00
int a2 = o0Var . a ( jVar . a ( ) ) ;
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . D ( ! zArr3 [ a2 ] ) ;
2021-12-02 18:53:44 +00:00
this . P + + ;
2021-11-05 06:48:17 +00:00
zArr3 [ a2 ] = true ;
2021-12-02 18:53:44 +00:00
i0VarArr [ i4 ] = new c ( a2 ) ;
zArr2 [ i4 ] = true ;
2021-11-05 06:48:17 +00:00
if ( ! z2 ) {
2021-12-02 18:53:44 +00:00
h0 h0Var = this . D [ a2 ] ;
2021-11-05 06:48:17 +00:00
z2 = ! h0Var . t ( j2 , true ) & & h0Var . k ( ) ! = 0 ;
}
}
}
2021-12-02 18:53:44 +00:00
if ( this . P = = 0 ) {
this . T = false ;
this . O = false ;
if ( this . v . b ( ) ) {
for ( h0 h0Var2 : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var2 . h ( ) ;
}
2021-12-02 18:53:44 +00:00
Loader . d < ? extends Loader . e > dVar = this . v . d ;
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . H ( dVar ) ;
2021-11-05 06:48:17 +00:00
dVar . a ( false ) ;
} else {
2021-12-02 18:53:44 +00:00
for ( h0 h0Var3 : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var3 . s ( false ) ;
}
}
} else if ( z2 ) {
j2 = f ( j2 ) ;
2021-12-02 18:53:44 +00:00
for ( int i5 = 0 ; i5 < i0VarArr . length ; i5 + + ) {
if ( i0VarArr [ i5 ] ! = null ) {
zArr2 [ i5 ] = true ;
2021-11-05 06:48:17 +00:00
}
}
}
2021-12-02 18:53:44 +00:00
this . N = true ;
2021-11-05 06:48:17 +00:00
return j2 ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public o0 n ( ) {
t ( ) ;
2021-12-02 18:53:44 +00:00
return this . I . a ;
2021-11-05 06:48:17 +00:00
}
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.google.android.exoplayer2.upstream.Loader$e, long, long, java.io.IOException, int] */
/* JADX WARNING: Removed duplicated region for block: B:25:0x007f */
/* JADX WARNING: Removed duplicated region for block: B:26:0x0082 */
/* JADX WARNING: Removed duplicated region for block: B:48:0x00d6 */
/* JADX WARNING: Removed duplicated region for block: B:49:0x00db */
/* JADX WARNING: Removed duplicated region for block: B:56:0x0107 */
@Override // com.google.android.exoplayer2.upstream.Loader.b
2021-12-02 18:53:44 +00:00
public Loader . c o ( a aVar , long j2 , long j3 , IOException iOException , int i ) {
2021-11-05 06:48:17 +00:00
long j4 ;
Loader . c cVar ;
boolean z2 ;
boolean z3 ;
t tVar ;
boolean z4 ;
a aVar2 = aVar ;
2021-12-02 18:53:44 +00:00
if ( this . Q = = - 1 ) {
this . Q = aVar2 . l ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
y yVar = aVar2 . c ;
2022-01-27 07:52:47 +00:00
t tVar2 = new t ( aVar2 . a , aVar2 . k , yVar . c , yVar . d , j2 , j3 , yVar . f953b ) ;
2021-12-17 21:59:34 +00:00
b . i . a . c . f3 . e0 . M ( aVar2 . j ) ;
b . i . a . c . f3 . e0 . M ( this . K ) ;
b . i . a . c . e3 . s sVar = ( b . i . a . c . e3 . s ) this . o ;
2021-11-05 06:48:17 +00:00
boolean z5 = false ;
if ( ! ( iOException instanceof ParserException ) & & ! ( iOException instanceof FileNotFoundException ) & & ! ( iOException instanceof HttpDataSource$CleartextNotPermittedException ) & & ! ( iOException instanceof Loader . UnexpectedLoaderException ) ) {
2021-12-02 18:53:44 +00:00
int i2 = DataSourceException . j ;
2021-11-05 06:48:17 +00:00
Throwable th = iOException ;
while ( true ) {
if ( th = = null ) {
z4 = false ;
break ;
}
if ( ( th instanceof DataSourceException ) & & ( ( DataSourceException ) th ) . reason = = 2008 ) {
z4 = true ;
break ;
}
th = th . getCause ( ) ;
}
if ( ! z4 ) {
2021-12-02 18:53:44 +00:00
j4 = ( long ) Math . min ( ( i - 1 ) * 1000 , 5000 ) ;
2021-11-05 06:48:17 +00:00
if ( j4 ! = - 9223372036854775807L ) {
2022-01-29 08:08:32 +00:00
cVar = Loader . f2955b ;
2021-11-05 06:48:17 +00:00
} else {
int u = u ( ) ;
2021-12-02 18:53:44 +00:00
boolean z6 = u > this . U ;
if ( this . Q ! = - 1 | | ( ( tVar = this . J ) ! = null & & tVar . i ( ) ! = - 9223372036854775807L ) ) {
this . U = u ;
} else if ( ! this . G | | D ( ) ) {
this . O = this . G ;
this . R = 0 ;
this . U = 0 ;
for ( h0 h0Var : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var . s ( false ) ;
}
aVar2 . g . a = 0 ;
aVar2 . j = 0 ;
aVar2 . i = true ;
aVar2 . n = false ;
} else {
2021-12-02 18:53:44 +00:00
this . T = true ;
2021-11-05 06:48:17 +00:00
z3 = false ;
cVar = ! z3 ? Loader . a ( z6 , j4 ) : Loader . a ;
}
z3 = true ;
if ( ! z3 ) {
}
}
2021-12-02 18:53:44 +00:00
int i3 = cVar . a ;
if ( i3 = = 0 | | i3 = = 1 ) {
2021-11-05 06:48:17 +00:00
z5 = true ;
}
z2 = ! z5 ;
2021-12-02 18:53:44 +00:00
b0 . a aVar3 = this . p ;
aVar3 . e ( tVar2 , new w ( 1 , - 1 , null , 0 , null , aVar3 . a ( aVar2 . j ) , aVar3 . a ( this . K ) ) , iOException , z2 ) ;
2021-11-05 06:48:17 +00:00
if ( z2 ) {
2021-12-02 18:53:44 +00:00
Objects . requireNonNull ( this . o ) ;
2021-11-05 06:48:17 +00:00
}
return cVar ;
}
}
j4 = - 9223372036854775807L ;
if ( j4 ! = - 9223372036854775807L ) {
}
2021-12-02 18:53:44 +00:00
int i3 = cVar . a ;
2021-11-05 06:48:17 +00:00
z5 = true ;
z2 = ! z5 ;
2021-12-02 18:53:44 +00:00
b0 . a aVar3 = this . p ;
aVar3 . e ( tVar2 , new w ( 1 , - 1 , null , 0 , null , aVar3 . a ( aVar2 . j ) , aVar3 . a ( this . K ) ) , iOException , z2 ) ;
2021-11-05 06:48:17 +00:00
if ( z2 ) {
}
return cVar ;
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.x2.j
public b . i . a . c . x2 . w p ( int i , int i2 ) {
2021-12-02 18:53:44 +00:00
return B ( new d ( i , false ) ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public long q ( ) {
long j2 ;
boolean z2 ;
long j3 ;
t ( ) ;
2022-01-27 07:52:47 +00:00
boolean [ ] zArr = this . I . f813b ;
2021-12-02 18:53:44 +00:00
if ( this . V ) {
2021-11-05 06:48:17 +00:00
return Long . MIN_VALUE ;
}
if ( w ( ) ) {
2021-12-02 18:53:44 +00:00
return this . S ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
if ( this . H ) {
int length = this . D . length ;
2021-11-05 06:48:17 +00:00
j2 = Long . MAX_VALUE ;
2021-12-02 18:53:44 +00:00
for ( int i = 0 ; i < length ; i + + ) {
if ( zArr [ i ] ) {
h0 h0Var = this . D [ i ] ;
2021-11-05 06:48:17 +00:00
synchronized ( h0Var ) {
2022-01-27 07:52:47 +00:00
z2 = h0Var . f818x ;
2021-11-05 06:48:17 +00:00
}
if ( ! z2 ) {
2021-12-02 18:53:44 +00:00
h0 h0Var2 = this . D [ i ] ;
2021-11-05 06:48:17 +00:00
synchronized ( h0Var2 ) {
j3 = h0Var2 . w ;
}
j2 = Math . min ( j2 , j3 ) ;
} else {
continue ;
}
}
}
} else {
j2 = Long . MAX_VALUE ;
}
if ( j2 = = RecyclerView . FOREVER_NS ) {
j2 = v ( ) ;
}
2021-12-02 18:53:44 +00:00
return j2 = = Long . MIN_VALUE ? this . R : j2 ;
2021-11-05 06:48:17 +00:00
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public void r ( long j2 , boolean z2 ) {
long j3 ;
2021-12-02 18:53:44 +00:00
int i ;
2021-11-05 06:48:17 +00:00
t ( ) ;
if ( ! w ( ) ) {
2021-12-17 21:59:34 +00:00
boolean [ ] zArr = this . I . c ;
2021-12-02 18:53:44 +00:00
int length = this . D . length ;
for ( int i2 = 0 ; i2 < length ; i2 + + ) {
h0 h0Var = this . D [ i2 ] ;
boolean z3 = zArr [ i2 ] ;
2021-11-05 06:48:17 +00:00
g0 g0Var = h0Var . a ;
synchronized ( h0Var ) {
2021-12-02 18:53:44 +00:00
int i3 = h0Var . q ;
2021-11-05 06:48:17 +00:00
j3 = - 1 ;
2021-12-02 18:53:44 +00:00
if ( i3 ! = 0 ) {
2021-11-05 06:48:17 +00:00
long [ ] jArr = h0Var . o ;
2022-01-27 07:52:47 +00:00
int i4 = h0Var . f817s ;
2021-12-02 18:53:44 +00:00
if ( j2 > = jArr [ i4 ] ) {
int i5 = h0Var . i ( i4 , ( ! z3 | | ( i = h0Var . t ) = = i3 ) ? i3 : i + 1 , j2 , z2 ) ;
if ( i5 ! = - 1 ) {
j3 = h0Var . g ( i5 ) ;
2021-11-05 06:48:17 +00:00
}
}
}
}
g0Var . a ( j3 ) ;
}
}
}
2021-12-17 21:59:34 +00:00
@Override // b.i.a.c.a3.x
2021-11-05 06:48:17 +00:00
public void s ( long j2 ) {
}
@EnsuresNonNull ( { " trackState " , " seekMap " } )
public final void t ( ) {
2021-12-17 21:59:34 +00:00
b . c . a . a0 . d . D ( this . G ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( this . I ) ;
2021-12-02 18:53:44 +00:00
Objects . requireNonNull ( this . J ) ;
2021-11-05 06:48:17 +00:00
}
public final int u ( ) {
2021-12-02 18:53:44 +00:00
int i = 0 ;
for ( h0 h0Var : this . D ) {
i + = h0Var . n ( ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
return i ;
2021-11-05 06:48:17 +00:00
}
public final long v ( ) {
long j2 ;
2021-12-02 18:53:44 +00:00
h0 [ ] h0VarArr = this . D ;
2021-11-05 06:48:17 +00:00
long j3 = Long . MIN_VALUE ;
for ( h0 h0Var : h0VarArr ) {
synchronized ( h0Var ) {
j2 = h0Var . w ;
}
j3 = Math . max ( j3 , j2 ) ;
}
return j3 ;
}
public final boolean w ( ) {
2021-12-02 18:53:44 +00:00
return this . S ! = - 9223372036854775807L ;
2021-11-05 06:48:17 +00:00
}
public final void x ( ) {
2021-12-02 18:53:44 +00:00
if ( ! ( this . W | | this . G | | ! this . F | | this . J = = null ) ) {
for ( h0 h0Var : this . D ) {
2021-11-05 06:48:17 +00:00
if ( h0Var . m ( ) = = null ) {
return ;
}
}
2022-01-27 07:52:47 +00:00
this . f807x . a ( ) ;
2021-12-02 18:53:44 +00:00
int length = this . D . length ;
2021-11-05 06:48:17 +00:00
n0 [ ] n0VarArr = new n0 [ length ] ;
boolean [ ] zArr = new boolean [ length ] ;
2021-12-02 18:53:44 +00:00
for ( int i = 0 ; i < length ; i + + ) {
j1 m = this . D [ i ] . m ( ) ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( m ) ;
2021-12-02 18:53:44 +00:00
String str = m . w ;
2021-12-17 21:59:34 +00:00
boolean h = b . i . a . c . f3 . t . h ( str ) ;
boolean z2 = h | | b . i . a . c . f3 . t . j ( str ) ;
2021-12-02 18:53:44 +00:00
zArr [ i ] = z2 ;
this . H = z2 | this . H ;
IcyHeaders icyHeaders = this . C ;
2021-11-05 06:48:17 +00:00
if ( icyHeaders ! = null ) {
2022-01-27 07:52:47 +00:00
if ( h | | this . E [ i ] . f812b ) {
2021-12-02 18:53:44 +00:00
Metadata metadata = m . u ;
2021-11-05 06:48:17 +00:00
Metadata metadata2 = metadata = = null ? new Metadata ( icyHeaders ) : metadata . a ( icyHeaders ) ;
j1 . b a2 = m . a ( ) ;
a2 . i = metadata2 ;
m = a2 . a ( ) ;
}
2021-12-02 18:53:44 +00:00
if ( h & & m . q = = - 1 & & m . r = = - 1 & & icyHeaders . j ! = - 1 ) {
2021-11-05 06:48:17 +00:00
j1 . b a3 = m . a ( ) ;
2021-12-02 18:53:44 +00:00
a3 . f = icyHeaders . j ;
2021-11-05 06:48:17 +00:00
m = a3 . a ( ) ;
}
}
2021-12-02 18:53:44 +00:00
int d2 = this . n . d ( m ) ;
2021-11-05 06:48:17 +00:00
j1 . b a4 = m . a ( ) ;
a4 . D = d2 ;
2021-12-02 18:53:44 +00:00
n0VarArr [ i ] = new n0 ( a4 . a ( ) ) ;
2021-11-05 06:48:17 +00:00
}
2021-12-02 18:53:44 +00:00
this . I = new e ( new o0 ( n0VarArr ) , zArr ) ;
this . G = true ;
x . a aVar = this . B ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( aVar ) ;
aVar . b ( this ) ;
}
}
2021-12-02 18:53:44 +00:00
public final void y ( int i ) {
2021-11-05 06:48:17 +00:00
t ( ) ;
2021-12-02 18:53:44 +00:00
e eVar = this . I ;
2021-11-05 06:48:17 +00:00
boolean [ ] zArr = eVar . d ;
2021-12-02 18:53:44 +00:00
if ( ! zArr [ i ] ) {
j1 j1Var = eVar . a . l [ i ] . l [ 0 ] ;
b0 . a aVar = this . p ;
2021-12-17 21:59:34 +00:00
aVar . b ( new w ( 1 , b . i . a . c . f3 . t . g ( j1Var . w ) , j1Var , 0 , null , aVar . a ( this . R ) , - 9223372036854775807L ) ) ;
2021-12-02 18:53:44 +00:00
zArr [ i ] = true ;
2021-11-05 06:48:17 +00:00
}
}
2021-12-02 18:53:44 +00:00
public final void z ( int i ) {
2021-11-05 06:48:17 +00:00
t ( ) ;
2022-01-27 07:52:47 +00:00
boolean [ ] zArr = this . I . f813b ;
2021-12-02 18:53:44 +00:00
if ( this . T & & zArr [ i ] & & ! this . D [ i ] . p ( false ) ) {
this . S = 0 ;
this . T = false ;
this . O = true ;
2021-11-05 06:48:17 +00:00
this . R = 0 ;
2021-12-02 18:53:44 +00:00
this . U = 0 ;
for ( h0 h0Var : this . D ) {
2021-11-05 06:48:17 +00:00
h0Var . s ( false ) ;
}
2021-12-02 18:53:44 +00:00
x . a aVar = this . B ;
2021-11-05 06:48:17 +00:00
Objects . requireNonNull ( aVar ) ;
aVar . a ( this ) ;
}
}
}