Address some TODOs

pull/506/head
Mattia Iavarone 6 years ago
parent 6f98ae268a
commit e6daaeca03
  1. 2
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/CameraUtilsTest.java
  2. 18
      cameraview/src/androidTest/java/com/otaliastudios/cameraview/engine/CameraIntegrationTest.java
  3. 1
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/AudioMediaEncoder.java
  4. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/video/encoding/MediaEncoder.java

@ -84,8 +84,6 @@ public class CameraUtilsTest extends BaseTest {
assertEquals(0, other.getPixel(0, h-1));
assertEquals(0, other.getPixel(w-1, 0));
assertEquals(0, other.getPixel(w-1, h-1));
// TODO: improve when we add EXIF writing to byte arrays
}

@ -549,11 +549,10 @@ public abstract class CameraIntegrationTest extends BaseTest {
@Test
public void testEndVideoSnapshot_withMaxSize() {
// TODO
// camera.setVideoMaxSize(3000*1000);
// waitForOpen(true);
// waitForVideoStart();
// waitForVideoEnd(true);
camera.setVideoMaxSize(3000*1000);
openSync(true);
takeVideoSnapshotSync(true);
waitForVideoResult(true);
}
@Test
@ -567,11 +566,10 @@ public abstract class CameraIntegrationTest extends BaseTest {
@Test
public void testEndVideoSnapshot_withMaxDuration() {
// TODO
// camera.setVideoMaxDuration(4000);
// waitForOpen(true);
// waitForVideoStart();
// waitForVideoEnd(true);
camera.setVideoMaxDuration(4000);
openSync(true);
takeVideoSnapshotSync(true);
waitForVideoResult(true);
}
//endregion

@ -339,7 +339,6 @@ public class AudioMediaEncoder extends MediaEncoder {
if (PERFORMANCE_DEBUG) {
// After latest changes, the count here is not so different between MONO and STEREO.
// We get about 400 frames in both cases (430 for MONO, but doesn't seem like a big issue).
// TODO CHECK: This reflects the count difference that we see in engine.write (MONO:200 STEREO:100).
LOG.e("EXECUTE DELAY MILLIS:", mAvgExecuteDelay, "COUNT:", mExecuteCount);
LOG.e("SEND DELAY MILLIS:", mAvgSendDelay, "COUNT:", mSendCount);
}

@ -298,7 +298,7 @@ public abstract class MediaEncoder {
@CallSuper
protected void onStopped() {
LOG.w(mName, "is being released. Notifying controller and releasing codecs.");
// TODO should we notify after this method?
// TODO should we call notifyStopped after this method ends?
mController.notifyStopped(mTrackIndex);
mMediaCodec.stop();
mMediaCodec.release();

Loading…
Cancel
Save