what-the-bank/sources/o/Wmv.java

93 lines
3.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.drew.metadata.MetadataException;
import java.io.IOException;
/* loaded from: classes.dex */
public final class Wmv implements InterfaceC16990suK {
private String c = "";
private final YZg e;
public Wmv(C16613piz c16613piz) {
YZg yZg = new YZg();
this.e = yZg;
c16613piz.c.add(yZg);
}
@Override // o.InterfaceC16990suK
public final boolean a(String str) {
return str.equals("WAVE");
}
@Override // o.InterfaceC16990suK
public final boolean d(String str) {
return str.equals("fmt ") || (this.c.equals("INFO") && YZg.c.containsKey(str)) || str.equals("data");
}
@Override // o.InterfaceC16990suK
public final boolean c(String str) {
if (str.equals("INFO")) {
this.c = "INFO";
return true;
}
this.c = "";
return false;
}
@Override // o.InterfaceC16990suK
public final void c(String str, byte[] bArr) {
try {
if (str.equals("fmt ")) {
C0925RrQ c0925RrQ = new C0925RrQ(bArr);
c0925RrQ.b = false;
short a = c0925RrQ.a(0);
short a2 = c0925RrQ.a(2);
int g = c0925RrQ.g(4);
int g2 = c0925RrQ.g(8);
short a3 = c0925RrQ.a(12);
if (a == 1) {
this.e.d(6, c0925RrQ.a(14));
this.e.e(1, YZg.d.get(Integer.valueOf(a)));
} else if (YZg.d.containsKey(Integer.valueOf(a))) {
this.e.e(1, YZg.d.get(Integer.valueOf(a)));
} else {
this.e.e(1, "Unknown");
}
this.e.d(2, a2);
this.e.d(3, g);
this.e.d(4, g2);
this.e.d(5, a3);
return;
}
if (str.equals("data")) {
try {
if (this.e.d(4)) {
double length = bArr.length / this.e.a();
int i = (int) length;
Integer valueOf = Integer.valueOf(i / ((int) Math.pow(60.0d, 2.0d)));
this.e.e(16, String.format("%1$02d:%2$02d:%3$02d", valueOf, Integer.valueOf((i / ((int) Math.pow(60.0d, 1.0d))) - (valueOf.intValue() * 60)), Integer.valueOf((int) Math.round((length / Math.pow(60.0d, 0.0d)) - (r2.intValue() * 60)))));
return;
}
return;
} catch (MetadataException unused) {
YZg yZg = this.e;
BrP.b(new Object[]{yZg, "Error calculating duration: bytes per second not found"}, -1786863991, 1786863992, System.identityHashCode(yZg));
return;
}
}
if (YZg.c.containsKey(str)) {
this.e.e(YZg.c.get(str).intValue(), new String(bArr).substring(0, bArr.length - 1));
}
} catch (IOException e) {
YZg yZg2 = this.e;
BrP.b(new Object[]{yZg2, e.getMessage()}, -1786863991, 1786863992, System.identityHashCode(yZg2));
}
}
@Override // o.InterfaceC16990suK
public final void b(String str) {
YZg yZg = this.e;
BrP.b(new Object[]{yZg, str}, -1786863991, 1786863992, System.identityHashCode(yZg));
}
}