/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/google/android/exoplayer2/p109g/C8675b.java

https://github.com/HelloHuDi/AndroidReverseNotes · Java · 146 lines · 117 code · 18 blank · 11 comment · 26 complexity · 13f0fc29ade637c74c016faca6a4b04d MD5 · raw file

  1. package com.google.android.exoplayer2.p109g;
  2. import android.os.SystemClock;
  3. import com.google.android.exoplayer2.Format;
  4. import com.google.android.exoplayer2.p111i.C45039a;
  5. import com.google.android.exoplayer2.source.C41630o;
  6. import java.util.Arrays;
  7. import java.util.Comparator;
  8. /* renamed from: com.google.android.exoplayer2.g.b */
  9. public abstract class C8675b implements C45035f {
  10. private int aBR;
  11. final Format[] bhv;
  12. protected final C41630o bpd;
  13. protected final int[] bpe;
  14. private final long[] bpf;
  15. protected final int length;
  16. /* renamed from: com.google.android.exoplayer2.g.b$a */
  17. static final class C8676a implements Comparator<Format> {
  18. private C8676a() {
  19. }
  20. /* synthetic */ C8676a(byte b) {
  21. this();
  22. }
  23. public final /* bridge */ /* synthetic */ int compare(Object obj, Object obj2) {
  24. return ((Format) obj2).bitrate - ((Format) obj).bitrate;
  25. }
  26. }
  27. public C8675b(C41630o c41630o, int... iArr) {
  28. int i = 0;
  29. C45039a.checkState(iArr.length > 0);
  30. this.bpd = (C41630o) C45039a.checkNotNull(c41630o);
  31. this.length = iArr.length;
  32. this.bhv = new Format[this.length];
  33. for (int i2 = 0; i2 < iArr.length; i2++) {
  34. this.bhv[i2] = c41630o.bhv[iArr[i2]];
  35. }
  36. Arrays.sort(this.bhv, new C8676a());
  37. this.bpe = new int[this.length];
  38. while (i < this.length) {
  39. this.bpe[i] = c41630o.mo66765j(this.bhv[i]);
  40. i++;
  41. }
  42. this.bpf = new long[this.length];
  43. }
  44. /* renamed from: tf */
  45. public final C41630o mo19206tf() {
  46. return this.bpd;
  47. }
  48. public final int length() {
  49. return this.bpe.length;
  50. }
  51. /* renamed from: eG */
  52. public final Format mo19197eG(int i) {
  53. return this.bhv[i];
  54. }
  55. /* renamed from: eH */
  56. public final int mo19198eH(int i) {
  57. return this.bpe[i];
  58. }
  59. /* renamed from: j */
  60. public final int mo19203j(Format format) {
  61. for (int i = 0; i < this.length; i++) {
  62. if (this.bhv[i] == format) {
  63. return i;
  64. }
  65. }
  66. return -1;
  67. }
  68. public final int indexOf(int i) {
  69. for (int i2 = 0; i2 < this.length; i2++) {
  70. if (this.bpe[i2] == i) {
  71. return i2;
  72. }
  73. }
  74. return -1;
  75. }
  76. /* renamed from: tg */
  77. public final Format mo19207tg() {
  78. return this.bhv[mo52335su()];
  79. }
  80. /* renamed from: th */
  81. public final int mo19208th() {
  82. return this.bpe[mo52335su()];
  83. }
  84. /* renamed from: eI */
  85. public final boolean mo19199eI(int i) {
  86. long elapsedRealtime = SystemClock.elapsedRealtime();
  87. boolean j = mo19204j(i, elapsedRealtime);
  88. int i2 = 0;
  89. while (i2 < this.length && !j) {
  90. if (i2 == i || mo19204j(i2, elapsedRealtime)) {
  91. j = false;
  92. } else {
  93. j = true;
  94. }
  95. i2++;
  96. }
  97. if (!j) {
  98. return false;
  99. }
  100. long[] jArr = this.bpf;
  101. jArr[i] = Math.max(jArr[i], elapsedRealtime + 60000);
  102. return true;
  103. }
  104. /* Access modifiers changed, original: protected|final */
  105. /* renamed from: j */
  106. public final boolean mo19204j(int i, long j) {
  107. return this.bpf[i] > j;
  108. }
  109. public int hashCode() {
  110. if (this.aBR == 0) {
  111. this.aBR = (System.identityHashCode(this.bpd) * 31) + Arrays.hashCode(this.bpe);
  112. }
  113. return this.aBR;
  114. }
  115. public boolean equals(Object obj) {
  116. if (this == obj) {
  117. return true;
  118. }
  119. if (obj == null || getClass() != obj.getClass()) {
  120. return false;
  121. }
  122. C8675b c8675b = (C8675b) obj;
  123. if (this.bpd == c8675b.bpd && Arrays.equals(this.bpe, c8675b.bpe)) {
  124. return true;
  125. }
  126. return false;
  127. }
  128. }