Simplify ScreenEncoder
Do not handle iFrameInterval field and parameter, it is never used
dynamically.
@@ -27,19 +27,13 @@ public class ScreenEncoder implements Device.RotationListener {
private int bitRate;
private int maxFps;
- private int iFrameInterval;
private boolean sendFrameMeta;
private long ptsOrigin;
- public ScreenEncoder(boolean sendFrameMeta, int bitRate, int maxFps, int iFrameInterval) {
+ public ScreenEncoder(boolean sendFrameMeta, int bitRate, int maxFps) {
this.sendFrameMeta = sendFrameMeta;
this.bitRate = bitRate;
this.maxFps = maxFps;
- this.iFrameInterval = iFrameInterval;
- }
-
- public ScreenEncoder(boolean sendFrameMeta, int bitRate, int maxFps) {
- this(sendFrameMeta, bitRate, maxFps, DEFAULT_I_FRAME_INTERVAL);
}
@Override
@@ -55,7 +49,7 @@ public class ScreenEncoder implements Device.RotationListener {
Workarounds.prepareMainLooper();
Workarounds.fillAppInfo();
- MediaFormat format = createFormat(bitRate, maxFps, iFrameInterval);
+ MediaFormat format = createFormat(bitRate, maxFps, DEFAULT_I_FRAME_INTERVAL);
device.setRotationListener(this);
boolean alive;
try {
