Initial commit
This commit is contained in:
59
sources/com/hw/videoprocessor/util/VideoProgressAve.java
Normal file
59
sources/com/hw/videoprocessor/util/VideoProgressAve.java
Normal file
@@ -0,0 +1,59 @@
|
||||
package com.hw.videoprocessor.util;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class VideoProgressAve {
|
||||
private VideoProgressListener a;
|
||||
private float b;
|
||||
private float c;
|
||||
private int d;
|
||||
private int e;
|
||||
private Float f;
|
||||
|
||||
public VideoProgressAve(VideoProgressListener videoProgressListener) {
|
||||
this.a = videoProgressListener;
|
||||
}
|
||||
|
||||
public void a(long j) {
|
||||
if (this.a == null) {
|
||||
return;
|
||||
}
|
||||
Float f = this.f;
|
||||
if (f != null) {
|
||||
j = (long) (j * f.floatValue());
|
||||
}
|
||||
this.b = ((j / 1000.0f) - this.d) / (this.e - r3);
|
||||
float f2 = this.b;
|
||||
if (f2 < 0.0f) {
|
||||
f2 = 0.0f;
|
||||
}
|
||||
this.b = f2;
|
||||
float f3 = this.b;
|
||||
if (f3 > 1.0f) {
|
||||
f3 = 1.0f;
|
||||
}
|
||||
this.b = f3;
|
||||
this.a.onProgress((this.b + this.c) / 2.0f);
|
||||
CL.c("mEncodeProgress:" + this.b, new Object[0]);
|
||||
}
|
||||
|
||||
public void b(int i) {
|
||||
this.d = i;
|
||||
}
|
||||
|
||||
public void a(float f) {
|
||||
this.c = f;
|
||||
VideoProgressListener videoProgressListener = this.a;
|
||||
if (videoProgressListener != null) {
|
||||
videoProgressListener.onProgress((this.b + this.c) / 2.0f);
|
||||
}
|
||||
CL.c("mAudioProgress:" + this.c, new Object[0]);
|
||||
}
|
||||
|
||||
public void a(int i) {
|
||||
this.e = i;
|
||||
}
|
||||
|
||||
public void a(Float f) {
|
||||
this.f = f;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user