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

https://github.com/HelloHuDi/AndroidReverseNotes · Java · 130 lines · 110 code · 12 blank · 8 comment · 20 complexity · 85e01b4ee13d3fee9282b3a7437098db 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.p109g.C45035f.C8678a;
  5. import com.google.android.exoplayer2.p110h.C32056d;
  6. import com.google.android.exoplayer2.source.C41630o;
  7. import com.tencent.matrix.trace.core.AppMethodBeat;
  8. import com.tencent.tmassistantsdk.downloadservice.Downloads;
  9. /* renamed from: com.google.android.exoplayer2.g.a */
  10. public final class C32051a extends C8675b {
  11. private int biG = m52102al(Long.MIN_VALUE);
  12. private final C32056d boT;
  13. private final int boU;
  14. private final long boV;
  15. private final long boW;
  16. private final long boX;
  17. private final float boY;
  18. private int boZ = 1;
  19. /* renamed from: com.google.android.exoplayer2.g.a$a */
  20. public static final class C25537a implements C8678a {
  21. private final C32056d boT;
  22. private final int boU;
  23. private final float boY;
  24. private final int bpa;
  25. private final int bpb;
  26. private final int bpc;
  27. public C25537a(C32056d c32056d) {
  28. this(c32056d, (byte) 0);
  29. }
  30. private C25537a(C32056d c32056d, byte b) {
  31. this.boT = c32056d;
  32. this.boU = 800000;
  33. this.bpa = Downloads.MIN_WAIT_FOR_NETWORK;
  34. this.bpb = 25000;
  35. this.bpc = 25000;
  36. this.boY = 0.75f;
  37. }
  38. /* renamed from: a */
  39. public final /* synthetic */ C45035f mo19210a(C41630o c41630o, int[] iArr) {
  40. AppMethodBeat.m2504i(95757);
  41. C32051a c32051a = new C32051a(c41630o, iArr, this.boT, this.boU, (long) this.bpa, (long) this.bpb, (long) this.bpc, this.boY);
  42. AppMethodBeat.m2505o(95757);
  43. return c32051a;
  44. }
  45. }
  46. public C32051a(C41630o c41630o, int[] iArr, C32056d c32056d, int i, long j, long j2, long j3, float f) {
  47. super(c41630o, iArr);
  48. AppMethodBeat.m2504i(95758);
  49. this.boT = c32056d;
  50. this.boU = i;
  51. this.boV = 1000 * j;
  52. this.boW = 1000 * j2;
  53. this.boX = 1000 * j3;
  54. this.boY = f;
  55. AppMethodBeat.m2505o(95758);
  56. }
  57. /* renamed from: ag */
  58. public final void mo52334ag(long j) {
  59. AppMethodBeat.m2504i(95759);
  60. long elapsedRealtime = SystemClock.elapsedRealtime();
  61. int i = this.biG;
  62. this.biG = m52102al(elapsedRealtime);
  63. if (this.biG == i) {
  64. AppMethodBeat.m2505o(95759);
  65. return;
  66. }
  67. if (!mo19204j(i, elapsedRealtime)) {
  68. Format format = this.bhv[i];
  69. Format format2 = this.bhv[this.biG];
  70. if (format2.bitrate > format.bitrate && j < this.boV) {
  71. this.biG = i;
  72. } else if (format2.bitrate < format.bitrate && j >= this.boW) {
  73. this.biG = i;
  74. }
  75. }
  76. if (this.biG != i) {
  77. this.boZ = 3;
  78. }
  79. AppMethodBeat.m2505o(95759);
  80. }
  81. /* renamed from: su */
  82. public final int mo52335su() {
  83. return this.biG;
  84. }
  85. /* renamed from: sv */
  86. public final int mo52336sv() {
  87. return this.boZ;
  88. }
  89. /* renamed from: sw */
  90. public final Object mo52337sw() {
  91. return null;
  92. }
  93. /* renamed from: al */
  94. private int m52102al(long j) {
  95. int i = 0;
  96. AppMethodBeat.m2504i(95760);
  97. long tl = this.boT.mo52345tl();
  98. tl = tl == -1 ? (long) this.boU : (long) (((float) tl) * this.boY);
  99. int i2 = 0;
  100. while (true) {
  101. int i3 = i;
  102. if (i2 < this.length) {
  103. if (j != Long.MIN_VALUE && mo19204j(i2, j)) {
  104. i = i3;
  105. } else if (((long) this.bhv[i2].bitrate) <= tl) {
  106. AppMethodBeat.m2505o(95760);
  107. return i2;
  108. } else {
  109. i = i2;
  110. }
  111. i2++;
  112. } else {
  113. AppMethodBeat.m2505o(95760);
  114. return i3;
  115. }
  116. }
  117. }
  118. }